Class KubernetesConfiguration

  • All Implemented Interfaces:
    io.smallrye.stork.api.config.ConfigWithType

    public class KubernetesConfiguration
    extends Object
    implements io.smallrye.stork.api.config.ConfigWithType
    Configuration for the KubernetesServiceDiscoveryProvider ServiceDiscovery.
    • Constructor Detail

      • KubernetesConfiguration

        public KubernetesConfiguration​(Map<String,​String> params)
        Creates a new KubernetesConfiguration
        Parameters:
        params - the parameters, must not be null
      • KubernetesConfiguration

        public KubernetesConfiguration()
        Creates a new KubernetesConfiguration
    • Method Detail

      • type

        public String type()
        Specified by:
        type in interface io.smallrye.stork.api.config.ConfigWithType
        Returns:
        the type
      • parameters

        public Map<String,​String> parameters()
        Specified by:
        parameters in interface io.smallrye.stork.api.config.ConfigWithType
        Returns:
        the parameters
      • getK8sHost

        public String getK8sHost()
        The Kubernetes API host.
        Returns:
        the configured k8s-host, @{code null} if not set
      • withK8sHost

        public KubernetesConfiguration withK8sHost​(String value)
        Set the 'k8s-host' attribute.
        Parameters:
        value - the value for k8s-host
        Returns:
        the current KubernetesConfiguration to chain calls
      • getK8sNamespace

        public String getK8sNamespace()
        The namespace of the service. Use all to discover all namespaces.
        Returns:
        the configured k8s-namespace, @{code null} if not set
      • withK8sNamespace

        public KubernetesConfiguration withK8sNamespace​(String value)
        Set the 'k8s-namespace' attribute.
        Parameters:
        value - the value for k8s-namespace
        Returns:
        the current KubernetesConfiguration to chain calls
      • getApplication

        public String getApplication()
        The Kubernetes application Id; if not defined Stork service name will be used.
        Returns:
        the configured application, @{code null} if not set
      • withApplication

        public KubernetesConfiguration withApplication​(String value)
        Set the 'application' attribute.
        Parameters:
        value - the value for application
        Returns:
        the current KubernetesConfiguration to chain calls
      • getPortName

        public String getPortName()
        The Kubernetes application port name. If not defined, when exposing multiple ports, Stork will use the first one.
        Returns:
        the configured port-name, @{code null} if not set
      • withPortName

        public KubernetesConfiguration withPortName​(String value)
        Set the 'port-name' attribute.
        Parameters:
        value - the value for port-name
        Returns:
        the current KubernetesConfiguration to chain calls
      • getRefreshPeriod

        public String getRefreshPeriod()
        Service discovery cache refresh period. By default: 5M
        Returns:
        the configured refresh-period, 5M if not set
      • withRefreshPeriod

        public KubernetesConfiguration withRefreshPeriod​(String value)
        Set the 'refresh-period' attribute. Default is 5M.
        Parameters:
        value - the value for refresh-period
        Returns:
        the current KubernetesConfiguration to chain calls
      • getSecure

        public String getSecure()
        Whether the connection with the service should be encrypted with TLS.
        Returns:
        the configured secure, @{code null} if not set
      • withSecure

        public KubernetesConfiguration withSecure​(String value)
        Set the 'secure' attribute.
        Parameters:
        value - the value for secure
        Returns:
        the current KubernetesConfiguration to chain calls