Class ConsulSDConfig

  • All Implemented Interfaces:
    io.fabric8.kubernetes.api.builder.Editable<ConsulSDConfigBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource, Serializable

    @Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator")
    public class ConsulSDConfig
    extends Object
    implements io.fabric8.kubernetes.api.builder.Editable<ConsulSDConfigBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
    ConsulSDConfig defines a Consul service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config
    See Also:
    Serialized Form
    • Method Detail

      • getAllowStale

        public Boolean getAllowStale()
        Allow stale Consul results (see https://www.consul.io/api/features/consistency.html). Will reduce load on Consul. If unset, Prometheus uses its default value.
      • setAllowStale

        public void setAllowStale​(Boolean allowStale)
        Allow stale Consul results (see https://www.consul.io/api/features/consistency.html). Will reduce load on Consul. If unset, Prometheus uses its default value.
      • getAuthorization

        public SafeAuthorization getAuthorization()
        ConsulSDConfig defines a Consul service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config
      • setAuthorization

        public void setAuthorization​(SafeAuthorization authorization)
        ConsulSDConfig defines a Consul service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config
      • getBasicAuth

        public BasicAuth getBasicAuth()
        ConsulSDConfig defines a Consul service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config
      • setBasicAuth

        public void setBasicAuth​(BasicAuth basicAuth)
        ConsulSDConfig defines a Consul service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config
      • getDatacenter

        public String getDatacenter()
        Consul Datacenter name, if not provided it will use the local Consul Agent Datacenter.
      • setDatacenter

        public void setDatacenter​(String datacenter)
        Consul Datacenter name, if not provided it will use the local Consul Agent Datacenter.
      • getEnableHTTP2

        public Boolean getEnableHTTP2()
        Whether to enable HTTP2. If unset, Prometheus uses its default value.
      • setEnableHTTP2

        public void setEnableHTTP2​(Boolean enableHTTP2)
        Whether to enable HTTP2. If unset, Prometheus uses its default value.
      • getFilter

        public String getFilter()
        Filter expression used to filter the catalog results. See https://www.consul.io/api-docs/catalog#list-services It requires Prometheus >= 3.0.0.
      • setFilter

        public void setFilter​(String filter)
        Filter expression used to filter the catalog results. See https://www.consul.io/api-docs/catalog#list-services It requires Prometheus >= 3.0.0.
      • getFollowRedirects

        public Boolean getFollowRedirects()
        Configure whether HTTP requests follow HTTP 3xx redirects. If unset, Prometheus uses its default value.
      • setFollowRedirects

        public void setFollowRedirects​(Boolean followRedirects)
        Configure whether HTTP requests follow HTTP 3xx redirects. If unset, Prometheus uses its default value.
      • getNamespace

        public String getNamespace()
        Namespaces are only supported in Consul Enterprise.


        It requires Prometheus >= 2.28.0.

      • setNamespace

        public void setNamespace​(String namespace)
        Namespaces are only supported in Consul Enterprise.


        It requires Prometheus >= 2.28.0.

      • getNoProxy

        public String getNoProxy()
        `noProxy` is a comma-separated string that can contain IPs, CIDR notation, domain names that should be excluded from proxying. IP and domain names can contain port numbers.


        It requires Prometheus >= v2.43.0, Alertmanager >= v0.25.0 or Thanos >= v0.32.0.

      • setNoProxy

        public void setNoProxy​(String noProxy)
        `noProxy` is a comma-separated string that can contain IPs, CIDR notation, domain names that should be excluded from proxying. IP and domain names can contain port numbers.


        It requires Prometheus >= v2.43.0, Alertmanager >= v0.25.0 or Thanos >= v0.32.0.

      • getNodeMeta

        public Map<String,​String> getNodeMeta()
        Node metadata key/value pairs to filter nodes for a given service. Starting with Consul 1.14, it is recommended to use `filter` with the `NodeMeta` selector instead.
      • setNodeMeta

        public void setNodeMeta​(Map<String,​String> nodeMeta)
        Node metadata key/value pairs to filter nodes for a given service. Starting with Consul 1.14, it is recommended to use `filter` with the `NodeMeta` selector instead.
      • getOauth2

        public OAuth2 getOauth2()
        ConsulSDConfig defines a Consul service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config
      • setOauth2

        public void setOauth2​(OAuth2 oauth2)
        ConsulSDConfig defines a Consul service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config
      • getPartition

        public String getPartition()
        Admin Partitions are only supported in Consul Enterprise.
      • setPartition

        public void setPartition​(String partition)
        Admin Partitions are only supported in Consul Enterprise.
      • getPathPrefix

        public String getPathPrefix()
        Prefix for URIs for when consul is behind an API gateway (reverse proxy).


        It requires Prometheus >= 2.45.0.

      • setPathPrefix

        public void setPathPrefix​(String pathPrefix)
        Prefix for URIs for when consul is behind an API gateway (reverse proxy).


        It requires Prometheus >= 2.45.0.

      • getProxyConnectHeader

        public Map<String,​List<io.fabric8.kubernetes.api.model.SecretKeySelector>> getProxyConnectHeader()
        ProxyConnectHeader optionally specifies headers to send to proxies during CONNECT requests.


        It requires Prometheus >= v2.43.0, Alertmanager >= v0.25.0 or Thanos >= v0.32.0.

      • setProxyConnectHeader

        public void setProxyConnectHeader​(Map<String,​List<io.fabric8.kubernetes.api.model.SecretKeySelector>> proxyConnectHeader)
        ProxyConnectHeader optionally specifies headers to send to proxies during CONNECT requests.


        It requires Prometheus >= v2.43.0, Alertmanager >= v0.25.0 or Thanos >= v0.32.0.

      • getProxyFromEnvironment

        public Boolean getProxyFromEnvironment()
        Whether to use the proxy configuration defined by environment variables (HTTP_PROXY, HTTPS_PROXY, and NO_PROXY).


        It requires Prometheus >= v2.43.0, Alertmanager >= v0.25.0 or Thanos >= v0.32.0.

      • setProxyFromEnvironment

        public void setProxyFromEnvironment​(Boolean proxyFromEnvironment)
        Whether to use the proxy configuration defined by environment variables (HTTP_PROXY, HTTPS_PROXY, and NO_PROXY).


        It requires Prometheus >= v2.43.0, Alertmanager >= v0.25.0 or Thanos >= v0.32.0.

      • getProxyUrl

        public String getProxyUrl()
        `proxyURL` defines the HTTP proxy server to use.
      • setProxyUrl

        public void setProxyUrl​(String proxyUrl)
        `proxyURL` defines the HTTP proxy server to use.
      • getRefreshInterval

        public String getRefreshInterval()
        The time after which the provided names are refreshed. On large setup it might be a good idea to increase this value because the catalog will change all the time. If unset, Prometheus uses its default value.
      • setRefreshInterval

        public void setRefreshInterval​(String refreshInterval)
        The time after which the provided names are refreshed. On large setup it might be a good idea to increase this value because the catalog will change all the time. If unset, Prometheus uses its default value.
      • getScheme

        public String getScheme()
        HTTP Scheme default "http"
      • setScheme

        public void setScheme​(String scheme)
        HTTP Scheme default "http"
      • getServer

        public String getServer()
        Consul server address. A valid string consisting of a hostname or IP followed by an optional port number.
      • setServer

        public void setServer​(String server)
        Consul server address. A valid string consisting of a hostname or IP followed by an optional port number.
      • getServices

        public List<String> getServices()
        A list of services for which targets are retrieved. If omitted, all services are scraped.
      • setServices

        public void setServices​(List<String> services)
        A list of services for which targets are retrieved. If omitted, all services are scraped.
      • getTagSeparator

        public String getTagSeparator()
        The string by which Consul tags are joined into the tag label. If unset, Prometheus uses its default value.
      • setTagSeparator

        public void setTagSeparator​(String tagSeparator)
        The string by which Consul tags are joined into the tag label. If unset, Prometheus uses its default value.
      • getTags

        public List<String> getTags()
        An optional list of tags used to filter nodes for a given service. Services must contain all tags in the list. Starting with Consul 1.14, it is recommended to use `filter` with the `ServiceTags` selector instead.
      • setTags

        public void setTags​(List<String> tags)
        An optional list of tags used to filter nodes for a given service. Services must contain all tags in the list. Starting with Consul 1.14, it is recommended to use `filter` with the `ServiceTags` selector instead.
      • getTlsConfig

        public SafeTLSConfig getTlsConfig()
        ConsulSDConfig defines a Consul service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config
      • setTlsConfig

        public void setTlsConfig​(SafeTLSConfig tlsConfig)
        ConsulSDConfig defines a Consul service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config
      • getTokenRef

        public io.fabric8.kubernetes.api.model.SecretKeySelector getTokenRef()
        ConsulSDConfig defines a Consul service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config
      • setTokenRef

        public void setTokenRef​(io.fabric8.kubernetes.api.model.SecretKeySelector tokenRef)
        ConsulSDConfig defines a Consul service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config
      • getAdditionalProperties

        public Map<String,​Object> getAdditionalProperties()
      • setAdditionalProperty

        public void setAdditionalProperty​(String name,
                                          Object value)
      • setAdditionalProperties

        public void setAdditionalProperties​(Map<String,​Object> additionalProperties)