Class KubernetesConnectionConfiguration


  • public class KubernetesConnectionConfiguration
    extends Object
    Configuration for Kubernetes connection.
    • Constructor Detail

      • KubernetesConnectionConfiguration

        public KubernetesConnectionConfiguration()
    • Method Detail

      • setServiceName

        public 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:
        this for chaining.
      • getServiceName

        public String getServiceName()
        Returns:
        Kubernetes service name.
      • setNamespace

        public 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:
        this for chaining.
      • getNamespace

        public String getNamespace()
        Returns:
        Kubernetes namespace.
      • setMasterUrl

        public 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:
        this for chaining.
      • getMaster

        public String getMaster()
        Returns:
        Kubernetes master url.
      • setAccountToken

        public 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:
        this for chaining.
      • getAccountToken

        public String getAccountToken()
        Returns:
        Kubernetes account token.
      • setIncludeNotReadyAddresses

        public 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:
        this for chaining.
      • getIncludeNotReadyAddresses

        public boolean getIncludeNotReadyAddresses()
        Returns:
        Flag include not ready addresses.
      • setDiscoveryPort

        public 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:
        this for chaining.
      • getDiscoveryPort

        public int getDiscoveryPort()
        Returns:
        Kubernetes IP Finder port.
      • verify

        public void verify()
        Verify that configuration is valid.