Class KubernetesServiceConfiguration

java.lang.Object
io.micronaut.kubernetes.discovery.KubernetesServiceConfiguration

@EachProperty("kubernetes.client.discovery.services") public class KubernetesServiceConfiguration extends Object
Discovery configuration for Kubernetes service.
Since:
2.2
  • Field Details

  • Constructor Details

    • KubernetesServiceConfiguration

      @Inject public KubernetesServiceConfiguration(@Parameter String serviceId)
    • KubernetesServiceConfiguration

      public KubernetesServiceConfiguration(String serviceId, boolean manual)
    • KubernetesServiceConfiguration

      public KubernetesServiceConfiguration(String serviceId, String name, String namespace)
    • KubernetesServiceConfiguration

      public KubernetesServiceConfiguration(String serviceId, String name, String namespace, String mode, String port, boolean manual)
  • Method Details

    • getServiceId

      public String getServiceId()
      Returns:
      service id
    • setServiceId

      public void setServiceId(String serviceId)
      Set service id.
      Parameters:
      serviceId - the service id
    • getName

      public Optional<String> getName()
      Returns:
      the service name
    • setName

      public void setName(String name)
      Set service name.
      Parameters:
      name - the service name
    • getNamespace

      public Optional<String> getNamespace()
      Namespace of service. If null then default configured namespace is used.
      Returns:
      namespace the namespace
    • setNamespace

      public void setNamespace(String namespace)
      Service namespace.
      Parameters:
      namespace - the namespace
    • getMode

      public Optional<String> getMode()
      Returns:
      service discovery mode
    • setMode

      public void setMode(String mode)
      Set service discovery mode.
      Parameters:
      mode - mode
    • getPort

      public Optional<String> getPort()
      Port configuration in case of multi-port resource.
      Returns:
      port number
    • setPort

      public void setPort(String port)
      Sets port number. Required in case of multi-port resource.
      Parameters:
      port - port number
    • isManual

      public boolean isManual()
      This field is for inner use to mark manually configured services. All configurations on PREFIX are manually configured.
      Returns:
      true if manually configured otherwise false
    • toString

      public String toString()
      Overrides:
      toString in class Object