You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2017/08/08 14:43:20 UTC

[02/14] camel git commit: CAMEL-11331: Adding connection timeout as parameter (auto-computed)

CAMEL-11331: Adding connection timeout as parameter (auto-computed)


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a722355b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a722355b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a722355b

Branch: refs/heads/master
Commit: a722355b04684b97f733c9d9845902097a77f4cf
Parents: b073923
Author: Nicola Ferraro <ni...@gmail.com>
Authored: Tue Aug 8 12:05:59 2017 +0200
Committer: Nicola Ferraro <ni...@gmail.com>
Committed: Tue Aug 8 16:39:43 2017 +0200

----------------------------------------------------------------------
 .../kubernetes-build-configs-component.adoc     |  3 +-
 .../main/docs/kubernetes-builds-component.adoc  |  3 +-
 .../src/main/docs/kubernetes-component.adoc     |  3 +-
 .../docs/kubernetes-config-maps-component.adoc  |  3 +-
 .../docs/kubernetes-deployments-component.adoc  |  3 +-
 .../docs/kubernetes-namespaces-component.adoc   |  3 +-
 .../main/docs/kubernetes-nodes-component.adoc   |  3 +-
 ...tes-persistent-volumes-claims-component.adoc |  3 +-
 ...kubernetes-persistent-volumes-component.adoc |  3 +-
 .../main/docs/kubernetes-pods-component.adoc    |  3 +-
 ...netes-replication-controllers-component.adoc |  3 +-
 .../kubernetes-resources-quota-component.adoc   |  3 +-
 .../main/docs/kubernetes-secrets-component.adoc |  3 +-
 .../docs/kubernetes-services-component.adoc     |  3 +-
 .../kubernetes/KubernetesConfiguration.java     | 16 ++++++++++-
 .../component/kubernetes/KubernetesHelper.java  |  3 ++
 .../kubernetes/ha/KubernetesClusterService.java | 30 ++++++++++++++++++--
 17 files changed, 73 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a722355b/components/camel-kubernetes/src/main/docs/kubernetes-build-configs-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-build-configs-component.adoc b/components/camel-kubernetes/src/main/docs/kubernetes-build-configs-component.adoc
index d0029aa..5acd8c3 100644
--- a/components/camel-kubernetes/src/main/docs/kubernetes-build-configs-component.adoc
+++ b/components/camel-kubernetes/src/main/docs/kubernetes-build-configs-component.adoc
@@ -30,7 +30,7 @@ with the following path and query parameters:
 | **masterUrl** | *Required* Kubernetes Master url |  | String
 |=======================================================================
 
-#### Query Parameters (18 parameters):
+#### Query Parameters (19 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -40,6 +40,7 @@ with the following path and query parameters:
 | **kubernetesClient** (producer) | Default KubernetesClient to use if provided |  | KubernetesClient
 | **operation** (producer) | Producer operation to do on Kubernetes |  | String
 | **portName** (producer) | The port name used for ServiceCall EIP |  | String
+| **connectionTimeout** (advanced) | Connection timeout in milliseconds to use when making requests to the kubernetes API. |  | Integer
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **caCertData** (security) | The CA Cert Data |  | String
 | **caCertFile** (security) | The CA Cert File |  | String

http://git-wip-us.apache.org/repos/asf/camel/blob/a722355b/components/camel-kubernetes/src/main/docs/kubernetes-builds-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-builds-component.adoc b/components/camel-kubernetes/src/main/docs/kubernetes-builds-component.adoc
index 61714a7..e5c73ed 100644
--- a/components/camel-kubernetes/src/main/docs/kubernetes-builds-component.adoc
+++ b/components/camel-kubernetes/src/main/docs/kubernetes-builds-component.adoc
@@ -30,7 +30,7 @@ with the following path and query parameters:
 | **masterUrl** | *Required* Kubernetes Master url |  | String
 |=======================================================================
 
-#### Query Parameters (18 parameters):
+#### Query Parameters (19 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -40,6 +40,7 @@ with the following path and query parameters:
 | **kubernetesClient** (producer) | Default KubernetesClient to use if provided |  | KubernetesClient
 | **operation** (producer) | Producer operation to do on Kubernetes |  | String
 | **portName** (producer) | The port name used for ServiceCall EIP |  | String
+| **connectionTimeout** (advanced) | Connection timeout in milliseconds to use when making requests to the kubernetes API. |  | Integer
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **caCertData** (security) | The CA Cert Data |  | String
 | **caCertFile** (security) | The CA Cert File |  | String

http://git-wip-us.apache.org/repos/asf/camel/blob/a722355b/components/camel-kubernetes/src/main/docs/kubernetes-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-component.adoc b/components/camel-kubernetes/src/main/docs/kubernetes-component.adoc
index 8c6551b..91a7ad1 100644
--- a/components/camel-kubernetes/src/main/docs/kubernetes-component.adoc
+++ b/components/camel-kubernetes/src/main/docs/kubernetes-component.adoc
@@ -78,7 +78,7 @@ with the following path and query parameters:
 | **masterUrl** | *Required* Kubernetes Master url |  | String
 |=======================================================================
 
-#### Query Parameters (27 parameters):
+#### Query Parameters (28 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -97,6 +97,7 @@ with the following path and query parameters:
 | **exceptionHandler** (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN or ERROR level and ignored. |  | ExceptionHandler
 | **exchangePattern** (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
 | **operation** (producer) | Producer operation to do on Kubernetes |  | String
+| **connectionTimeout** (advanced) | Connection timeout in milliseconds to use when making requests to the kubernetes API. |  | Integer
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **caCertData** (security) | The CA Cert Data |  | String
 | **caCertFile** (security) | The CA Cert File |  | String

http://git-wip-us.apache.org/repos/asf/camel/blob/a722355b/components/camel-kubernetes/src/main/docs/kubernetes-config-maps-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-config-maps-component.adoc b/components/camel-kubernetes/src/main/docs/kubernetes-config-maps-component.adoc
index f1feefa..d424b59 100644
--- a/components/camel-kubernetes/src/main/docs/kubernetes-config-maps-component.adoc
+++ b/components/camel-kubernetes/src/main/docs/kubernetes-config-maps-component.adoc
@@ -30,7 +30,7 @@ with the following path and query parameters:
 | **masterUrl** | *Required* Kubernetes Master url |  | String
 |=======================================================================
 
-#### Query Parameters (18 parameters):
+#### Query Parameters (19 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -40,6 +40,7 @@ with the following path and query parameters:
 | **kubernetesClient** (producer) | Default KubernetesClient to use if provided |  | KubernetesClient
 | **operation** (producer) | Producer operation to do on Kubernetes |  | String
 | **portName** (producer) | The port name used for ServiceCall EIP |  | String
+| **connectionTimeout** (advanced) | Connection timeout in milliseconds to use when making requests to the kubernetes API. |  | Integer
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **caCertData** (security) | The CA Cert Data |  | String
 | **caCertFile** (security) | The CA Cert File |  | String

http://git-wip-us.apache.org/repos/asf/camel/blob/a722355b/components/camel-kubernetes/src/main/docs/kubernetes-deployments-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-deployments-component.adoc b/components/camel-kubernetes/src/main/docs/kubernetes-deployments-component.adoc
index 938635a..8e9a0c1 100644
--- a/components/camel-kubernetes/src/main/docs/kubernetes-deployments-component.adoc
+++ b/components/camel-kubernetes/src/main/docs/kubernetes-deployments-component.adoc
@@ -31,7 +31,7 @@ with the following path and query parameters:
 | **masterUrl** | *Required* Kubernetes Master url |  | String
 |=======================================================================
 
-#### Query Parameters (26 parameters):
+#### Query Parameters (27 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -49,6 +49,7 @@ with the following path and query parameters:
 | **exceptionHandler** (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN or ERROR level and ignored. |  | ExceptionHandler
 | **exchangePattern** (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
 | **operation** (producer) | Producer operation to do on Kubernetes |  | String
+| **connectionTimeout** (advanced) | Connection timeout in milliseconds to use when making requests to the kubernetes API. |  | Integer
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **caCertData** (security) | The CA Cert Data |  | String
 | **caCertFile** (security) | The CA Cert File |  | String

http://git-wip-us.apache.org/repos/asf/camel/blob/a722355b/components/camel-kubernetes/src/main/docs/kubernetes-namespaces-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-namespaces-component.adoc b/components/camel-kubernetes/src/main/docs/kubernetes-namespaces-component.adoc
index 8c2546f..1d15a94 100644
--- a/components/camel-kubernetes/src/main/docs/kubernetes-namespaces-component.adoc
+++ b/components/camel-kubernetes/src/main/docs/kubernetes-namespaces-component.adoc
@@ -32,7 +32,7 @@ with the following path and query parameters:
 | **masterUrl** | *Required* Kubernetes Master url |  | String
 |=======================================================================
 
-#### Query Parameters (26 parameters):
+#### Query Parameters (27 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -50,6 +50,7 @@ with the following path and query parameters:
 | **exceptionHandler** (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN or ERROR level and ignored. |  | ExceptionHandler
 | **exchangePattern** (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
 | **operation** (producer) | Producer operation to do on Kubernetes |  | String
+| **connectionTimeout** (advanced) | Connection timeout in milliseconds to use when making requests to the kubernetes API. |  | Integer
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **caCertData** (security) | The CA Cert Data |  | String
 | **caCertFile** (security) | The CA Cert File |  | String

http://git-wip-us.apache.org/repos/asf/camel/blob/a722355b/components/camel-kubernetes/src/main/docs/kubernetes-nodes-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-nodes-component.adoc b/components/camel-kubernetes/src/main/docs/kubernetes-nodes-component.adoc
index 0e76719..04b938c 100644
--- a/components/camel-kubernetes/src/main/docs/kubernetes-nodes-component.adoc
+++ b/components/camel-kubernetes/src/main/docs/kubernetes-nodes-component.adoc
@@ -32,7 +32,7 @@ with the following path and query parameters:
 | **masterUrl** | *Required* Kubernetes Master url |  | String
 |=======================================================================
 
-#### Query Parameters (26 parameters):
+#### Query Parameters (27 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -50,6 +50,7 @@ with the following path and query parameters:
 | **exceptionHandler** (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN or ERROR level and ignored. |  | ExceptionHandler
 | **exchangePattern** (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
 | **operation** (producer) | Producer operation to do on Kubernetes |  | String
+| **connectionTimeout** (advanced) | Connection timeout in milliseconds to use when making requests to the kubernetes API. |  | Integer
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **caCertData** (security) | The CA Cert Data |  | String
 | **caCertFile** (security) | The CA Cert File |  | String

http://git-wip-us.apache.org/repos/asf/camel/blob/a722355b/components/camel-kubernetes/src/main/docs/kubernetes-persistent-volumes-claims-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-persistent-volumes-claims-component.adoc b/components/camel-kubernetes/src/main/docs/kubernetes-persistent-volumes-claims-component.adoc
index cc3f73c..46b4ecf 100644
--- a/components/camel-kubernetes/src/main/docs/kubernetes-persistent-volumes-claims-component.adoc
+++ b/components/camel-kubernetes/src/main/docs/kubernetes-persistent-volumes-claims-component.adoc
@@ -31,7 +31,7 @@ with the following path and query parameters:
 | **masterUrl** | *Required* Kubernetes Master url |  | String
 |=======================================================================
 
-#### Query Parameters (18 parameters):
+#### Query Parameters (19 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -41,6 +41,7 @@ with the following path and query parameters:
 | **kubernetesClient** (producer) | Default KubernetesClient to use if provided |  | KubernetesClient
 | **operation** (producer) | Producer operation to do on Kubernetes |  | String
 | **portName** (producer) | The port name used for ServiceCall EIP |  | String
+| **connectionTimeout** (advanced) | Connection timeout in milliseconds to use when making requests to the kubernetes API. |  | Integer
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **caCertData** (security) | The CA Cert Data |  | String
 | **caCertFile** (security) | The CA Cert File |  | String

http://git-wip-us.apache.org/repos/asf/camel/blob/a722355b/components/camel-kubernetes/src/main/docs/kubernetes-persistent-volumes-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-persistent-volumes-component.adoc b/components/camel-kubernetes/src/main/docs/kubernetes-persistent-volumes-component.adoc
index e60f116..a2e3826 100644
--- a/components/camel-kubernetes/src/main/docs/kubernetes-persistent-volumes-component.adoc
+++ b/components/camel-kubernetes/src/main/docs/kubernetes-persistent-volumes-component.adoc
@@ -31,7 +31,7 @@ with the following path and query parameters:
 | **masterUrl** | *Required* Kubernetes Master url |  | String
 |=======================================================================
 
-#### Query Parameters (18 parameters):
+#### Query Parameters (19 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -41,6 +41,7 @@ with the following path and query parameters:
 | **kubernetesClient** (producer) | Default KubernetesClient to use if provided |  | KubernetesClient
 | **operation** (producer) | Producer operation to do on Kubernetes |  | String
 | **portName** (producer) | The port name used for ServiceCall EIP |  | String
+| **connectionTimeout** (advanced) | Connection timeout in milliseconds to use when making requests to the kubernetes API. |  | Integer
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **caCertData** (security) | The CA Cert Data |  | String
 | **caCertFile** (security) | The CA Cert File |  | String

http://git-wip-us.apache.org/repos/asf/camel/blob/a722355b/components/camel-kubernetes/src/main/docs/kubernetes-pods-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-pods-component.adoc b/components/camel-kubernetes/src/main/docs/kubernetes-pods-component.adoc
index 45d3407..988e3da 100644
--- a/components/camel-kubernetes/src/main/docs/kubernetes-pods-component.adoc
+++ b/components/camel-kubernetes/src/main/docs/kubernetes-pods-component.adoc
@@ -31,7 +31,7 @@ with the following path and query parameters:
 | **masterUrl** | *Required* Kubernetes Master url |  | String
 |=======================================================================
 
-#### Query Parameters (26 parameters):
+#### Query Parameters (27 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -49,6 +49,7 @@ with the following path and query parameters:
 | **exceptionHandler** (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN or ERROR level and ignored. |  | ExceptionHandler
 | **exchangePattern** (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
 | **operation** (producer) | Producer operation to do on Kubernetes |  | String
+| **connectionTimeout** (advanced) | Connection timeout in milliseconds to use when making requests to the kubernetes API. |  | Integer
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **caCertData** (security) | The CA Cert Data |  | String
 | **caCertFile** (security) | The CA Cert File |  | String

http://git-wip-us.apache.org/repos/asf/camel/blob/a722355b/components/camel-kubernetes/src/main/docs/kubernetes-replication-controllers-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-replication-controllers-component.adoc b/components/camel-kubernetes/src/main/docs/kubernetes-replication-controllers-component.adoc
index 937f49a..184ba3f 100644
--- a/components/camel-kubernetes/src/main/docs/kubernetes-replication-controllers-component.adoc
+++ b/components/camel-kubernetes/src/main/docs/kubernetes-replication-controllers-component.adoc
@@ -32,7 +32,7 @@ with the following path and query parameters:
 | **masterUrl** | *Required* Kubernetes Master url |  | String
 |=======================================================================
 
-#### Query Parameters (26 parameters):
+#### Query Parameters (27 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -50,6 +50,7 @@ with the following path and query parameters:
 | **exceptionHandler** (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN or ERROR level and ignored. |  | ExceptionHandler
 | **exchangePattern** (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
 | **operation** (producer) | Producer operation to do on Kubernetes |  | String
+| **connectionTimeout** (advanced) | Connection timeout in milliseconds to use when making requests to the kubernetes API. |  | Integer
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **caCertData** (security) | The CA Cert Data |  | String
 | **caCertFile** (security) | The CA Cert File |  | String

http://git-wip-us.apache.org/repos/asf/camel/blob/a722355b/components/camel-kubernetes/src/main/docs/kubernetes-resources-quota-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-resources-quota-component.adoc b/components/camel-kubernetes/src/main/docs/kubernetes-resources-quota-component.adoc
index c89027e..400c086 100644
--- a/components/camel-kubernetes/src/main/docs/kubernetes-resources-quota-component.adoc
+++ b/components/camel-kubernetes/src/main/docs/kubernetes-resources-quota-component.adoc
@@ -31,7 +31,7 @@ with the following path and query parameters:
 | **masterUrl** | *Required* Kubernetes Master url |  | String
 |=======================================================================
 
-#### Query Parameters (18 parameters):
+#### Query Parameters (19 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -41,6 +41,7 @@ with the following path and query parameters:
 | **kubernetesClient** (producer) | Default KubernetesClient to use if provided |  | KubernetesClient
 | **operation** (producer) | Producer operation to do on Kubernetes |  | String
 | **portName** (producer) | The port name used for ServiceCall EIP |  | String
+| **connectionTimeout** (advanced) | Connection timeout in milliseconds to use when making requests to the kubernetes API. |  | Integer
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **caCertData** (security) | The CA Cert Data |  | String
 | **caCertFile** (security) | The CA Cert File |  | String

http://git-wip-us.apache.org/repos/asf/camel/blob/a722355b/components/camel-kubernetes/src/main/docs/kubernetes-secrets-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-secrets-component.adoc b/components/camel-kubernetes/src/main/docs/kubernetes-secrets-component.adoc
index 7e0dc79..ac734c4 100644
--- a/components/camel-kubernetes/src/main/docs/kubernetes-secrets-component.adoc
+++ b/components/camel-kubernetes/src/main/docs/kubernetes-secrets-component.adoc
@@ -31,7 +31,7 @@ with the following path and query parameters:
 | **masterUrl** | *Required* Kubernetes Master url |  | String
 |=======================================================================
 
-#### Query Parameters (18 parameters):
+#### Query Parameters (19 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -41,6 +41,7 @@ with the following path and query parameters:
 | **kubernetesClient** (producer) | Default KubernetesClient to use if provided |  | KubernetesClient
 | **operation** (producer) | Producer operation to do on Kubernetes |  | String
 | **portName** (producer) | The port name used for ServiceCall EIP |  | String
+| **connectionTimeout** (advanced) | Connection timeout in milliseconds to use when making requests to the kubernetes API. |  | Integer
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **caCertData** (security) | The CA Cert Data |  | String
 | **caCertFile** (security) | The CA Cert File |  | String

http://git-wip-us.apache.org/repos/asf/camel/blob/a722355b/components/camel-kubernetes/src/main/docs/kubernetes-services-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-services-component.adoc b/components/camel-kubernetes/src/main/docs/kubernetes-services-component.adoc
index 8970059..4713ab0 100644
--- a/components/camel-kubernetes/src/main/docs/kubernetes-services-component.adoc
+++ b/components/camel-kubernetes/src/main/docs/kubernetes-services-component.adoc
@@ -32,7 +32,7 @@ with the following path and query parameters:
 | **masterUrl** | *Required* Kubernetes Master url |  | String
 |=======================================================================
 
-#### Query Parameters (26 parameters):
+#### Query Parameters (27 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |=======================================================================
@@ -50,6 +50,7 @@ with the following path and query parameters:
 | **exceptionHandler** (consumer) | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN or ERROR level and ignored. |  | ExceptionHandler
 | **exchangePattern** (consumer) | Sets the exchange pattern when the consumer creates an exchange. |  | ExchangePattern
 | **operation** (producer) | Producer operation to do on Kubernetes |  | String
+| **connectionTimeout** (advanced) | Connection timeout in milliseconds to use when making requests to the kubernetes API. |  | Integer
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **caCertData** (security) | The CA Cert Data |  | String
 | **caCertFile** (security) | The CA Cert File |  | String

http://git-wip-us.apache.org/repos/asf/camel/blob/a722355b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/KubernetesConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/KubernetesConfiguration.java b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/KubernetesConfiguration.java
index 271ef71..51bd839 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/KubernetesConfiguration.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/KubernetesConfiguration.java
@@ -115,6 +115,9 @@ public class KubernetesConfiguration implements Cloneable {
     @UriParam(label = "consumer", defaultValue = "1")
     private int poolSize = 1;
 
+    @UriParam(label = "advanced")
+    private Integer connectionTimeout;
+
     /**
      * Kubernetes Master url
      */
@@ -396,6 +399,17 @@ public class KubernetesConfiguration implements Cloneable {
         this.resourceName = resourceName;
     }
 
+    public Integer getConnectionTimeout() {
+        return connectionTimeout;
+    }
+
+    /**
+     * Connection timeout in milliseconds to use when making requests to the Kubernetes API server.
+     */
+    public void setConnectionTimeout(Integer connectionTimeout) {
+        this.connectionTimeout = connectionTimeout;
+    }
+
     // ****************************************
     // Copy
     // ****************************************
@@ -418,7 +432,7 @@ public class KubernetesConfiguration implements Cloneable {
                 + ", clientKeyPassphrase=" + clientKeyPassphrase + ", oauthToken=" + oauthToken + ", trustCerts="
                 + trustCerts + ", namespace=" + namespace + ", labelKey=" + labelKey + ", labelValue=" + labelValue
                 + ", resourceName=" + resourceName + ", portName=" + portName + ", dnsDomain=" + dnsDomain
-                + ", poolSize=" + poolSize + "]";
+                + ", poolSize=" + poolSize + ", connectionTimeout=" + connectionTimeout + "]";
     }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/a722355b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/KubernetesHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/KubernetesHelper.java b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/KubernetesHelper.java
index 62235ad..213fd5c 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/KubernetesHelper.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/KubernetesHelper.java
@@ -90,6 +90,9 @@ public final class KubernetesHelper {
         if (ObjectHelper.isNotEmpty(configuration.getTrustCerts())) {
             builder.withTrustCerts(configuration.getTrustCerts());
         }
+        if (ObjectHelper.isNotEmpty(configuration.getConnectionTimeout())) {
+            builder.withConnectionTimeout(configuration.getConnectionTimeout());
+        }
 
         Config conf = builder.build();
         return new DefaultKubernetesClient(conf);

http://git-wip-us.apache.org/repos/asf/camel/blob/a722355b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/ha/KubernetesClusterService.java
----------------------------------------------------------------------
diff --git a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/ha/KubernetesClusterService.java b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/ha/KubernetesClusterService.java
index 08ebb70..1c95b22 100644
--- a/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/ha/KubernetesClusterService.java
+++ b/components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/ha/KubernetesClusterService.java
@@ -55,11 +55,24 @@ public class KubernetesClusterService extends AbstractCamelClusterService<Kubern
 
     @Override
     protected KubernetesClusterView createView(String namespace) throws Exception {
-        KubernetesLockConfiguration lockConfig = configWithGroupNameAndDefaults(namespace);
-        return new KubernetesClusterView(this, configuration, lockConfig);
+        KubernetesLockConfiguration lockConfig = lockConfigWithGroupNameAndDefaults(namespace);
+        KubernetesConfiguration config = setConfigDefaults(this.configuration.copy(), lockConfig);
+        return new KubernetesClusterView(this, config, lockConfig);
+    }
+
+    protected KubernetesConfiguration setConfigDefaults(KubernetesConfiguration configuration, KubernetesLockConfiguration lockConfiguration) {
+        if (configuration.getConnectionTimeout() == null) {
+            // Set the connection timeout to be much lower than the renewal deadline,
+            // to avoid losing the leadership in case of stale connections
+            int timeout = (int) (lockConfiguration.getRenewDeadlineMillis() / 3);
+            timeout = Math.max(timeout, 3000);
+            timeout = Math.min(timeout, 30000);
+            configuration.setConnectionTimeout(timeout);
+        }
+        return configuration;
     }
 
-    protected KubernetesLockConfiguration configWithGroupNameAndDefaults(String groupName) {
+    protected KubernetesLockConfiguration lockConfigWithGroupNameAndDefaults(String groupName) {
         KubernetesLockConfiguration config = this.lockConfiguration.copy();
 
         config.setGroupName(ObjectHelper.notNull(groupName, "groupName"));
@@ -114,6 +127,17 @@ public class KubernetesClusterService extends AbstractCamelClusterService<Kubern
         configuration.setMasterUrl(masterUrl);
     }
 
+    public Integer getConnectionTimeout() {
+        return configuration.getConnectionTimeout();
+    }
+
+    /**
+     * Connection timeout in milliseconds to use when making requests to the Kubernetes API server.
+     */
+    public void setConnectionTimeout(Integer connectionTimeout) {
+        configuration.setConnectionTimeout(connectionTimeout);
+    }
+
     public String getKubernetesNamespace() {
         return this.lockConfiguration.getKubernetesResourcesNamespace();
     }