public class KubernetesClusterService extends org.apache.camel.impl.cluster.AbstractCamelClusterService<KubernetesClusterView>
Constructor and Description |
---|
KubernetesClusterService() |
KubernetesClusterService(org.apache.camel.CamelContext camelContext,
KubernetesConfiguration configuration) |
KubernetesClusterService(KubernetesConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
void |
addToClusterLabels(String key,
String value) |
protected KubernetesClusterView |
createView(String namespace) |
Map<String,String> |
getClusterLabels() |
String |
getConfigMapName() |
Integer |
getConnectionTimeoutMillis() |
double |
getJitterFactor() |
String |
getKubernetesNamespace() |
long |
getLeaseDurationMillis() |
String |
getMasterUrl() |
String |
getPodName() |
long |
getRenewDeadlineMillis() |
long |
getRetryPeriodMillis() |
protected KubernetesLockConfiguration |
lockConfigWithGroupNameAndDefaults(String groupName) |
void |
setClusterLabels(Map<String,String> clusterLabels)
Set the labels used to identify the pods composing the cluster.
|
protected KubernetesConfiguration |
setConfigDefaults(KubernetesConfiguration configuration,
KubernetesLockConfiguration lockConfiguration) |
void |
setConfigMapName(String configMapName)
Set the name of the ConfigMap used to do optimistic locking (defaults to 'leaders').
|
void |
setConnectionTimeoutMillis(Integer connectionTimeout)
Connection timeout in milliseconds to use when making requests to the Kubernetes API server.
|
void |
setJitterFactor(double jitterFactor)
A jitter factor to apply in order to prevent all pods to call Kubernetes APIs in the same instant.
|
void |
setKubernetesNamespace(String kubernetesNamespace)
Set the name of the Kubernetes namespace containing the pods and the configmap (autodetected by default)
|
void |
setLeaseDurationMillis(long leaseDurationMillis)
The default duration of the lease for the current leader.
|
void |
setMasterUrl(String masterUrl)
Set the URL of the Kubernetes master (read from Kubernetes client properties by default).
|
void |
setPodName(String podName)
Set the name of the current pod (autodetected from container host name by default).
|
void |
setRenewDeadlineMillis(long renewDeadlineMillis)
The deadline after which the leader must stop its services because it may have lost the leadership.
|
void |
setRetryPeriodMillis(long retryPeriodMillis)
The time between two subsequent attempts to check and acquire the leadership.
|
doStart, doStop, getAttributes, getCamelContext, getId, getNamespaces, getOrder, getView, isLeader, releaseView, setAttribute, setAttributes, setCamelContext, setId, setOrder, startView, stopView
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public KubernetesClusterService()
public KubernetesClusterService(KubernetesConfiguration configuration)
public KubernetesClusterService(org.apache.camel.CamelContext camelContext, KubernetesConfiguration configuration)
protected KubernetesClusterView createView(String namespace) throws Exception
createView
in class org.apache.camel.impl.cluster.AbstractCamelClusterService<KubernetesClusterView>
Exception
protected KubernetesConfiguration setConfigDefaults(KubernetesConfiguration configuration, KubernetesLockConfiguration lockConfiguration)
protected KubernetesLockConfiguration lockConfigWithGroupNameAndDefaults(String groupName)
public String getMasterUrl()
public void setMasterUrl(String masterUrl)
public Integer getConnectionTimeoutMillis()
public void setConnectionTimeoutMillis(Integer connectionTimeout)
public String getKubernetesNamespace()
public void setKubernetesNamespace(String kubernetesNamespace)
public String getConfigMapName()
public void setConfigMapName(String configMapName)
public String getPodName()
public void setPodName(String podName)
public void setClusterLabels(Map<String,String> clusterLabels)
public double getJitterFactor()
public void setJitterFactor(double jitterFactor)
public long getLeaseDurationMillis()
public void setLeaseDurationMillis(long leaseDurationMillis)
public long getRenewDeadlineMillis()
public void setRenewDeadlineMillis(long renewDeadlineMillis)
public long getRetryPeriodMillis()
public void setRetryPeriodMillis(long retryPeriodMillis)
Apache Camel