ScrapeConfig.spec.dockerSwarmSDConfigs[].oauth2.tlsConfig.ca.spec.kubernetesSDConfigs
kubernetesSDConfigs defines a list of Kubernetes service discovery configurations.
| Field / Type | Description |
|---|---|
apiServer | apiServer defines the API server address consisting of a hostname or IP address followed by an optional port number. If left empty, Prometheus is assumed to run inside of the cluster. It will discover API servers automatically and use the pod's CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/.
|
attachMetadata defines the metadata to attach to discovered targets. It requires Prometheus >= v2.35.0 when using the `Pod` role and Prometheus >= v2.37.0 for `Endpoints` and `Endpointslice` roles. | |
authorization defines the authorization header to use on every scrape request. Cannot be set at the same time as `basicAuth`, or `oauth2`. | |
basicAuth defines information to use on every scrape request. Cannot be set at the same time as `authorization`, or `oauth2`. | |
enableHTTP2 | enableHTTP2 defines whether to enable HTTP2. |
followRedirects | followRedirects defines whether HTTP requests follow HTTP 3xx redirects. |
namespaces defines the namespace discovery. If omitted, Prometheus discovers targets across all namespaces. | |
noProxy | noProxy defines 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. |
oauth2 defines the optional OAuth 2.0 configuration to authenticate against the target HTTP endpoint. Cannot be set at the same time as `authorization`, or `basicAuth`. | |
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.
| |
proxyFromEnvironment | proxyFromEnvironment defines 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. |
proxyUrl | proxyUrl defines the HTTP proxy server to use.
|
role | role defines the Kubernetes role of the entities that should be discovered. Role `Endpointslice` requires Prometheus >= v2.21.0
|
selectors defines the selector to select objects. It requires Prometheus >= v2.17.0
| |
tlsConfig defines the TLS configuration to connect to the Kubernetes API. |