Record Class KubernetesClientProperties

java.lang.Object
java.lang.Record
org.springframework.cloud.kubernetes.commons.KubernetesClientProperties

@ConfigurationProperties("spring.cloud.kubernetes.client") public record KubernetesClientProperties(Boolean trustCerts, String masterUrl, String apiVersion, String namespace, String caCertFile, String caCertData, String clientCertFile, String clientCertData, String clientKeyFile, String clientKeyData, String clientKeyAlgo, String clientKeyPassphrase, String username, String password, Duration watchReconnectInterval, Duration watchReconnectLimit, Duration connectionTimeout, Duration requestTimeout, Duration loggingInterval, String httpProxy, String httpsProxy, String proxyUsername, String proxyPassword, String oauthToken, String[] noProxy, String serviceAccountNamespacePath, String userAgent) extends Record
Kubernetes client properties.
Author:
Ioannis Canellos
  • Field Details

    • PREFIX

      public static final String PREFIX
      Configuration properties prefix.
      See Also:
    • DEFAULT_USER_AGENT

      public static final String DEFAULT_USER_AGENT
      Default user-agent for kubernetes client.
      See Also:
    • SERVICE_ACCOUNT_NAMESPACE_PATH

      public static final String SERVICE_ACCOUNT_NAMESPACE_PATH
      Default path for namespace file.
      See Also:
  • Constructor Details

    • KubernetesClientProperties

      public KubernetesClientProperties(Boolean trustCerts, String masterUrl, String apiVersion, String namespace, String caCertFile, String caCertData, String clientCertFile, String clientCertData, String clientKeyFile, String clientKeyData, String clientKeyAlgo, String clientKeyPassphrase, String username, String password, Duration watchReconnectInterval, Duration watchReconnectLimit, Duration connectionTimeout, Duration requestTimeout, Duration loggingInterval, String httpProxy, String httpsProxy, String proxyUsername, String proxyPassword, String oauthToken, String[] noProxy, @DefaultValue("/var/run/secrets/kubernetes.io/serviceaccount/namespace") String serviceAccountNamespacePath, @DefaultValue("Spring-Cloud-Kubernetes-Application") String userAgent)
      Creates an instance of a KubernetesClientProperties record class.
      Parameters:
      trustCerts - the value for the trustCerts record component
      masterUrl - the value for the masterUrl record component
      apiVersion - the value for the apiVersion record component
      namespace - the value for the namespace record component
      caCertFile - the value for the caCertFile record component
      caCertData - the value for the caCertData record component
      clientCertFile - the value for the clientCertFile record component
      clientCertData - the value for the clientCertData record component
      clientKeyFile - the value for the clientKeyFile record component
      clientKeyData - the value for the clientKeyData record component
      clientKeyAlgo - the value for the clientKeyAlgo record component
      clientKeyPassphrase - the value for the clientKeyPassphrase record component
      username - the value for the username record component
      password - the value for the password record component
      watchReconnectInterval - the value for the watchReconnectInterval record component
      watchReconnectLimit - the value for the watchReconnectLimit record component
      connectionTimeout - the value for the connectionTimeout record component
      requestTimeout - the value for the requestTimeout record component
      loggingInterval - the value for the loggingInterval record component
      httpProxy - the value for the httpProxy record component
      httpsProxy - the value for the httpsProxy record component
      proxyUsername - the value for the proxyUsername record component
      proxyPassword - the value for the proxyPassword record component
      oauthToken - the value for the oauthToken record component
      noProxy - the value for the noProxy record component
      serviceAccountNamespacePath - the value for the serviceAccountNamespacePath record component
      userAgent - the value for the userAgent record component
  • Method Details

    • withNamespace

      public KubernetesClientProperties withNamespace(String namespace)
      copy constructor that only changes the namespace.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • trustCerts

      public Boolean trustCerts()
      Returns the value of the trustCerts record component.
      Returns:
      the value of the trustCerts record component
    • masterUrl

      public String masterUrl()
      Returns the value of the masterUrl record component.
      Returns:
      the value of the masterUrl record component
    • apiVersion

      public String apiVersion()
      Returns the value of the apiVersion record component.
      Returns:
      the value of the apiVersion record component
    • namespace

      public String namespace()
      Returns the value of the namespace record component.
      Returns:
      the value of the namespace record component
    • caCertFile

      public String caCertFile()
      Returns the value of the caCertFile record component.
      Returns:
      the value of the caCertFile record component
    • caCertData

      public String caCertData()
      Returns the value of the caCertData record component.
      Returns:
      the value of the caCertData record component
    • clientCertFile

      public String clientCertFile()
      Returns the value of the clientCertFile record component.
      Returns:
      the value of the clientCertFile record component
    • clientCertData

      public String clientCertData()
      Returns the value of the clientCertData record component.
      Returns:
      the value of the clientCertData record component
    • clientKeyFile

      public String clientKeyFile()
      Returns the value of the clientKeyFile record component.
      Returns:
      the value of the clientKeyFile record component
    • clientKeyData

      public String clientKeyData()
      Returns the value of the clientKeyData record component.
      Returns:
      the value of the clientKeyData record component
    • clientKeyAlgo

      public String clientKeyAlgo()
      Returns the value of the clientKeyAlgo record component.
      Returns:
      the value of the clientKeyAlgo record component
    • clientKeyPassphrase

      public String clientKeyPassphrase()
      Returns the value of the clientKeyPassphrase record component.
      Returns:
      the value of the clientKeyPassphrase record component
    • username

      public String username()
      Returns the value of the username record component.
      Returns:
      the value of the username record component
    • password

      public String password()
      Returns the value of the password record component.
      Returns:
      the value of the password record component
    • watchReconnectInterval

      public Duration watchReconnectInterval()
      Returns the value of the watchReconnectInterval record component.
      Returns:
      the value of the watchReconnectInterval record component
    • watchReconnectLimit

      public Duration watchReconnectLimit()
      Returns the value of the watchReconnectLimit record component.
      Returns:
      the value of the watchReconnectLimit record component
    • connectionTimeout

      public Duration connectionTimeout()
      Returns the value of the connectionTimeout record component.
      Returns:
      the value of the connectionTimeout record component
    • requestTimeout

      public Duration requestTimeout()
      Returns the value of the requestTimeout record component.
      Returns:
      the value of the requestTimeout record component
    • loggingInterval

      public Duration loggingInterval()
      Returns the value of the loggingInterval record component.
      Returns:
      the value of the loggingInterval record component
    • httpProxy

      public String httpProxy()
      Returns the value of the httpProxy record component.
      Returns:
      the value of the httpProxy record component
    • httpsProxy

      public String httpsProxy()
      Returns the value of the httpsProxy record component.
      Returns:
      the value of the httpsProxy record component
    • proxyUsername

      public String proxyUsername()
      Returns the value of the proxyUsername record component.
      Returns:
      the value of the proxyUsername record component
    • proxyPassword

      public String proxyPassword()
      Returns the value of the proxyPassword record component.
      Returns:
      the value of the proxyPassword record component
    • oauthToken

      public String oauthToken()
      Returns the value of the oauthToken record component.
      Returns:
      the value of the oauthToken record component
    • noProxy

      public String[] noProxy()
      Returns the value of the noProxy record component.
      Returns:
      the value of the noProxy record component
    • serviceAccountNamespacePath

      public String serviceAccountNamespacePath()
      Returns the value of the serviceAccountNamespacePath record component.
      Returns:
      the value of the serviceAccountNamespacePath record component
    • userAgent

      public String userAgent()
      Returns the value of the userAgent record component.
      Returns:
      the value of the userAgent record component