Class Endpoint

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

    @Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator")
    public class Endpoint
    extends Object
    implements io.fabric8.kubernetes.api.builder.Editable<EndpointBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
    Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
    See Also:
    Serialized Form
    • Method Detail

      • getAuthorization

        public SafeAuthorization getAuthorization()
        Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
      • setAuthorization

        public void setAuthorization​(SafeAuthorization authorization)
        Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
      • getBasicAuth

        public BasicAuth getBasicAuth()
        Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
      • setBasicAuth

        public void setBasicAuth​(BasicAuth basicAuth)
        Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
      • getBearerTokenFile

        public String getBearerTokenFile()
        File to read bearer token for scraping the target.


        Deprecated: use `authorization` instead.

      • setBearerTokenFile

        public void setBearerTokenFile​(String bearerTokenFile)
        File to read bearer token for scraping the target.


        Deprecated: use `authorization` instead.

      • getBearerTokenSecret

        public io.fabric8.kubernetes.api.model.SecretKeySelector getBearerTokenSecret()
        Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
      • setBearerTokenSecret

        public void setBearerTokenSecret​(io.fabric8.kubernetes.api.model.SecretKeySelector bearerTokenSecret)
        Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
      • getEnableHttp2

        public Boolean getEnableHttp2()
        `enableHttp2` can be used to disable HTTP2 when scraping the target.
      • setEnableHttp2

        public void setEnableHttp2​(Boolean enableHttp2)
        `enableHttp2` can be used to disable HTTP2 when scraping the target.
      • getFilterRunning

        public Boolean getFilterRunning()
        When true, the pods which are not running (e.g. either in Failed or Succeeded state) are dropped during the target discovery.


        If unset, the filtering is enabled.


        More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase

      • setFilterRunning

        public void setFilterRunning​(Boolean filterRunning)
        When true, the pods which are not running (e.g. either in Failed or Succeeded state) are dropped during the target discovery.


        If unset, the filtering is enabled.


        More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase

      • getFollowRedirects

        public Boolean getFollowRedirects()
        `followRedirects` defines whether the scrape requests should follow HTTP 3xx redirects.
      • setFollowRedirects

        public void setFollowRedirects​(Boolean followRedirects)
        `followRedirects` defines whether the scrape requests should follow HTTP 3xx redirects.
      • getHonorLabels

        public Boolean getHonorLabels()
        When true, `honorLabels` preserves the metric's labels when they collide with the target's labels.
      • setHonorLabels

        public void setHonorLabels​(Boolean honorLabels)
        When true, `honorLabels` preserves the metric's labels when they collide with the target's labels.
      • getHonorTimestamps

        public Boolean getHonorTimestamps()
        `honorTimestamps` controls whether Prometheus preserves the timestamps when exposed by the target.
      • setHonorTimestamps

        public void setHonorTimestamps​(Boolean honorTimestamps)
        `honorTimestamps` controls whether Prometheus preserves the timestamps when exposed by the target.
      • getInterval

        public String getInterval()
        Interval at which Prometheus scrapes the metrics from the target.


        If empty, Prometheus uses the global scrape interval.

      • setInterval

        public void setInterval​(String interval)
        Interval at which Prometheus scrapes the metrics from the target.


        If empty, Prometheus uses the global scrape interval.

      • getMetricRelabelings

        public List<RelabelConfig> getMetricRelabelings()
        `metricRelabelings` configures the relabeling rules to apply to the samples before ingestion.
      • setMetricRelabelings

        public void setMetricRelabelings​(List<RelabelConfig> metricRelabelings)
        `metricRelabelings` configures the relabeling rules to apply to the samples before ingestion.
      • 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.

      • getOauth2

        public OAuth2 getOauth2()
        Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
      • setOauth2

        public void setOauth2​(OAuth2 oauth2)
        Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
      • getParams

        public Map<String,​List<String>> getParams()
        params define optional HTTP URL parameters.
      • setParams

        public void setParams​(Map<String,​List<String>> params)
        params define optional HTTP URL parameters.
      • getPath

        public String getPath()
        HTTP path from which to scrape for metrics.


        If empty, Prometheus uses the default value (e.g. `/metrics`).

      • setPath

        public void setPath​(String path)
        HTTP path from which to scrape for metrics.


        If empty, Prometheus uses the default value (e.g. `/metrics`).

      • getPort

        public String getPort()
        Name of the Service port which this endpoint refers to.


        It takes precedence over `targetPort`.

      • setPort

        public void setPort​(String port)
        Name of the Service port which this endpoint refers to.


        It takes precedence over `targetPort`.

      • 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.
      • getRelabelings

        public List<RelabelConfig> getRelabelings()
        `relabelings` configures the relabeling rules to apply the target's metadata labels.


        The Operator automatically adds relabelings for a few standard Kubernetes fields.


        The original scrape job's name is available via the `__tmp_prometheus_job_name` label.


        More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config

      • setRelabelings

        public void setRelabelings​(List<RelabelConfig> relabelings)
        `relabelings` configures the relabeling rules to apply the target's metadata labels.


        The Operator automatically adds relabelings for a few standard Kubernetes fields.


        The original scrape job's name is available via the `__tmp_prometheus_job_name` label.


        More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config

      • getScheme

        public String getScheme()
        HTTP scheme to use for scraping.


        `http` and `https` are the expected values unless you rewrite the `__scheme__` label via relabeling.


        If empty, Prometheus uses the default value `http`.

      • setScheme

        public void setScheme​(String scheme)
        HTTP scheme to use for scraping.


        `http` and `https` are the expected values unless you rewrite the `__scheme__` label via relabeling.


        If empty, Prometheus uses the default value `http`.

      • getScrapeTimeout

        public String getScrapeTimeout()
        Timeout after which Prometheus considers the scrape to be failed.


        If empty, Prometheus uses the global scrape timeout unless it is less than the target's scrape interval value in which the latter is used. The value cannot be greater than the scrape interval otherwise the operator will reject the resource.

      • setScrapeTimeout

        public void setScrapeTimeout​(String scrapeTimeout)
        Timeout after which Prometheus considers the scrape to be failed.


        If empty, Prometheus uses the global scrape timeout unless it is less than the target's scrape interval value in which the latter is used. The value cannot be greater than the scrape interval otherwise the operator will reject the resource.

      • getTargetPort

        public io.fabric8.kubernetes.api.model.IntOrString getTargetPort()
        Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
      • setTargetPort

        public void setTargetPort​(io.fabric8.kubernetes.api.model.IntOrString targetPort)
        Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
      • getTlsConfig

        public TLSConfig getTlsConfig()
        Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
      • setTlsConfig

        public void setTlsConfig​(TLSConfig tlsConfig)
        Endpoint defines an endpoint serving Prometheus metrics to be scraped by Prometheus.
      • getTrackTimestampsStaleness

        public Boolean getTrackTimestampsStaleness()
        `trackTimestampsStaleness` defines whether Prometheus tracks staleness of the metrics that have an explicit timestamp present in scraped data. Has no effect if `honorTimestamps` is false.


        It requires Prometheus >= v2.48.0.

      • setTrackTimestampsStaleness

        public void setTrackTimestampsStaleness​(Boolean trackTimestampsStaleness)
        `trackTimestampsStaleness` defines whether Prometheus tracks staleness of the metrics that have an explicit timestamp present in scraped data. Has no effect if `honorTimestamps` is false.


        It requires Prometheus >= v2.48.0.

      • getAdditionalProperties

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

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

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