Class KubernetesConnectionConfiguration
- java.lang.Object
- 
- org.apache.ignite.kubernetes.configuration.KubernetesConnectionConfiguration
 
- 
 public class KubernetesConnectionConfiguration extends Object Configuration for Kubernetes connection.
- 
- 
Constructor SummaryConstructors Constructor Description KubernetesConnectionConfiguration()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAccountToken()intgetDiscoveryPort()booleangetIncludeNotReadyAddresses()StringgetMaster()StringgetNamespace()StringgetServiceName()KubernetesConnectionConfigurationsetAccountToken(String accountToken)Specifies the path to the service token file.KubernetesConnectionConfigurationsetDiscoveryPort(int discoveryPort)Specifies the port which is returned to the caller to use for service discovery.KubernetesConnectionConfigurationsetIncludeNotReadyAddresses(boolean includeNotReadyAddresses)Determines whether addresses of not-ready pods should be included.KubernetesConnectionConfigurationsetMasterUrl(String master)Sets the host name of the Kubernetes API server.KubernetesConnectionConfigurationsetNamespace(String namespace)Sets the namespace the Kubernetes service belongs to.KubernetesConnectionConfigurationsetServiceName(String service)Sets the name of Kubernetes service for Ignite pods' IP addresses lookup.voidverify()Verify that configuration is valid.
 
- 
- 
- 
Method Detail- 
setServiceNamepublic KubernetesConnectionConfiguration setServiceName(String service) Sets the name of Kubernetes service for Ignite pods' IP addresses lookup. The name of the service must be equal to the name set in service's Kubernetes configuration. If this parameter is not changed then the name of the service has to be set to 'ignite' in the corresponding Kubernetes configuration.- Parameters:
- service- Kubernetes service name for IP addresses lookup. If it's not set then 'ignite' is used by default.
- Returns:
- thisfor chaining.
 
 - 
getServiceNamepublic String getServiceName() - Returns:
- Kubernetes service name.
 
 - 
setNamespacepublic KubernetesConnectionConfiguration setNamespace(String namespace) Sets the namespace the Kubernetes service belongs to. By default, it's supposed that the service is running under Kubernetes `default` namespace.- Parameters:
- namespace- The Kubernetes service namespace for IP addresses lookup.
- Returns:
- thisfor chaining.
 
 - 
getNamespacepublic String getNamespace() - Returns:
- Kubernetes namespace.
 
 - 
setMasterUrlpublic KubernetesConnectionConfiguration setMasterUrl(String master) Sets the host name of the Kubernetes API server. By default the following host name is used: 'https://kubernetes.default.svc.cluster.local:443'.- Parameters:
- master- The host name of the Kubernetes API server.
- Returns:
- thisfor chaining.
 
 - 
getMasterpublic String getMaster() - Returns:
- Kubernetes master url.
 
 - 
setAccountTokenpublic KubernetesConnectionConfiguration setAccountToken(String accountToken) Specifies the path to the service token file. By default the following account token is used: '/var/run/secrets/kubernetes.io/serviceaccount/token'.- Parameters:
- accountToken- The path to the service token file.
- Returns:
- thisfor chaining.
 
 - 
getAccountTokenpublic String getAccountToken() - Returns:
- Kubernetes account token.
 
 - 
setIncludeNotReadyAddressespublic KubernetesConnectionConfiguration setIncludeNotReadyAddresses(boolean includeNotReadyAddresses) Determines whether addresses of not-ready pods should be included. Default is false.- Parameters:
- includeNotReadyAddresses- Flag to include not-ready pods.
- Returns:
- thisfor chaining.
 
 - 
getIncludeNotReadyAddressespublic boolean getIncludeNotReadyAddresses() - Returns:
- Flag include not ready addresses.
 
 - 
setDiscoveryPortpublic KubernetesConnectionConfiguration setDiscoveryPort(int discoveryPort) Specifies the port which is returned to the caller to use for service discovery. Defaults to 0.- Parameters:
- discoveryPort- Port to use for Kubernetes IP Finder
- Returns:
- thisfor chaining.
 
 - 
getDiscoveryPortpublic int getDiscoveryPort() - Returns:
- Kubernetes IP Finder port.
 
 - 
verifypublic void verify() Verify that configuration is valid.
 
- 
 
-