This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new f73b29545d Add more detail to Kubernetes extension configuration 
documentation
f73b29545d is described below

commit f73b29545d4c5b0c41566323601a179f3713c976
Author: James Netherton <[email protected]>
AuthorDate: Thu Feb 13 08:52:01 2025 +0000

    Add more detail to Kubernetes extension configuration documentation
---
 .../pages/reference/extensions/kubernetes.adoc     | 53 ++++++++++++++++++++--
 .../runtime/src/main/doc/configuration.adoc        | 52 +++++++++++++++++++--
 2 files changed, 99 insertions(+), 6 deletions(-)

diff --git a/docs/modules/ROOT/pages/reference/extensions/kubernetes.adoc 
b/docs/modules/ROOT/pages/reference/extensions/kubernetes.adoc
index 22d9161e58..ee216f0181 100644
--- a/docs/modules/ROOT/pages/reference/extensions/kubernetes.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/kubernetes.adoc
@@ -72,10 +72,21 @@ endif::[]
 
 The extension automatically registers a Kubernetes Client bean named 
`kubernetesClient`. You can reference the bean in your routes like this:
 
-    from("direct:pods")
-        
.to("kubernetes-pods:///?kubernetesClient=#kubernetesClient&operation=listPods")
+[source,java]
+----
+from("direct:pods")
+    
.to("kubernetes-pods:///?kubernetesClient=#kubernetesClient&operation=listPods")
+----
 
-By default the client is configured from the local kubeconfig file. You can 
customize the client configuration via properties within 
`application.properties`:
+Or you can omit referring to the client bean entirely and the Kubernetes 
component will automatically use the Kubernetes client that was autowired.
+
+[source,java]
+----
+from("direct:pods")
+    .to("kubernetes-pods:local?operation=listPods")
+----
+
+By default, the client is configured from the local kubeconfig file. You can 
customize the client configuration via properties within 
`application.properties`:
 
 [source,properties]
 ----
@@ -85,6 +96,42 @@ quarkus.kubernetes-client.namespace=my-namespace
 
 The full set of configuration options are documented in the 
https://quarkus.io/guides/kubernetes-client#quarkus-kubernetes-client_configuration[Quarkus
 Kubernetes Client guide].
 
+If you want to suppress this behavior, you can disable autowiring and all 
configuration will be driven from the documented component and endpoint options.
+
+To disable autowiring at the component level, add the following configuration 
to `application.properties`.
+
+[source,properties]
+----
+camel.component.kubernetes-pods.autowired-enabled=false
+----
+
+To disable autowiring at the endpoint level.
+
+[source,java]
+----
+from("direct:pods")
+    
.to("kubernetes-pods:https://my.cluster.host?autowiredEnabled=false&operation=listPods";)
+----
+
+[id="extensions-kubernetes-configuration-openshift-specific-components"]
+=== OpenShift specific components
+
+When using any of the OpenShift specific components:
+
+* `openenshift-build-configs`
+* `openenshift-builds`
+* `openshift-deploymentconfigs`
+
+You must add the following dependency to your application.
+
+[source,xml]
+----
+<dependency>
+    <groupId>io.quarkus</groupId>
+    <artifactId>quarkus-openshift-client</artifactId>
+</dependency>
+----
+
 
[id="extensions-kubernetes-configuration-having-only-a-single-consumer-in-a-cluster-consuming-from-a-given-endpoint"]
 === Having only a single consumer in a cluster consuming from a given endpoint
 
diff --git a/extensions/kubernetes/runtime/src/main/doc/configuration.adoc 
b/extensions/kubernetes/runtime/src/main/doc/configuration.adoc
index 9addb9721e..20a7d040d7 100644
--- a/extensions/kubernetes/runtime/src/main/doc/configuration.adoc
+++ b/extensions/kubernetes/runtime/src/main/doc/configuration.adoc
@@ -2,10 +2,21 @@
 
 The extension automatically registers a Kubernetes Client bean named 
`kubernetesClient`. You can reference the bean in your routes like this:
 
-    from("direct:pods")
-        
.to("kubernetes-pods:///?kubernetesClient=#kubernetesClient&operation=listPods")
+[source,java]
+----
+from("direct:pods")
+    
.to("kubernetes-pods:///?kubernetesClient=#kubernetesClient&operation=listPods")
+----
+
+Or you can omit referring to the client bean entirely and the Kubernetes 
component will automatically use the Kubernetes client that was autowired.
+
+[source,java]
+----
+from("direct:pods")
+    .to("kubernetes-pods:local?operation=listPods")
+----
 
-By default the client is configured from the local kubeconfig file. You can 
customize the client configuration via properties within 
`application.properties`:
+By default, the client is configured from the local kubeconfig file. You can 
customize the client configuration via properties within 
`application.properties`:
 
 [source,properties]
 ----
@@ -15,6 +26,41 @@ quarkus.kubernetes-client.namespace=my-namespace
 
 The full set of configuration options are documented in the 
https://quarkus.io/guides/kubernetes-client#quarkus-kubernetes-client_configuration[Quarkus
 Kubernetes Client guide].
 
+If you want to suppress this behavior, you can disable autowiring and all 
configuration will be driven from the documented component and endpoint options.
+
+To disable autowiring at the component level, add the following configuration 
to `application.properties`.
+
+[source,properties]
+----
+camel.component.kubernetes-pods.autowired-enabled=false
+----
+
+To disable autowiring at the endpoint level.
+
+[source,java]
+----
+from("direct:pods")
+    
.to("kubernetes-pods:https://my.cluster.host?autowiredEnabled=false&operation=listPods";)
+----
+
+=== OpenShift specific components
+
+When using any of the OpenShift specific components:
+
+* `openenshift-build-configs`
+* `openenshift-builds`
+* `openshift-deploymentconfigs`
+
+You must add the following dependency to your application.
+
+[source,xml]
+----
+<dependency>
+    <groupId>io.quarkus</groupId>
+    <artifactId>quarkus-openshift-client</artifactId>
+</dependency>
+----
+
 === Having only a single consumer in a cluster consuming from a given endpoint
 
 This functionality is provided by the 
`camel-quarkus-kubernetes-cluster-service` extension.

Reply via email to