From be41f0f010cbfc43eecfe113da2dd852a498acac Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Sat, 29 Jul 2023 09:41:01 +0200 Subject: [PATCH] feat(Prometheus Operator): Move to independant dir and add scraping --- manifests/kustomization.yaml | 1 + .../bundle.yaml | 929 +++++++++++++++++- .../prometheus-operator/kustomization.yaml | 3 + .../prometheus-operator/servicemonitor.yaml | 14 + manifests/prometheus/kustomization.yaml | 1 - 5 files changed, 935 insertions(+), 13 deletions(-) rename manifests/{prometheus => prometheus-operator}/bundle.yaml (97%) create mode 100644 manifests/prometheus-operator/kustomization.yaml create mode 100644 manifests/prometheus-operator/servicemonitor.yaml diff --git a/manifests/kustomization.yaml b/manifests/kustomization.yaml index 42a52cd..2819b69 100644 --- a/manifests/kustomization.yaml +++ b/manifests/kustomization.yaml @@ -3,6 +3,7 @@ kind: Kustomization resources: - namespace.yaml + - prometheus-operator - promtail - loki - prometheus diff --git a/manifests/prometheus/bundle.yaml b/manifests/prometheus-operator/bundle.yaml similarity index 97% rename from manifests/prometheus/bundle.yaml rename to manifests/prometheus-operator/bundle.yaml index 1f4bd13..e3d60ab 100644 --- a/manifests/prometheus/bundle.yaml +++ b/manifests/prometheus-operator/bundle.yaml @@ -211,6 +211,394 @@ spec: items: description: Receiver defines one or more notification integrations. properties: + discordConfigs: + description: List of Discord configurations. + items: + description: DiscordConfig configures notifications via Discord. + See https://prometheus.io/docs/alerting/latest/configuration/#discord_config + properties: + apiURL: + description: The secret's key that contains the Discord + webhook URL. The secret needs to be in the same namespace + as the AlertmanagerConfig object and accessible by the + Prometheus Operator. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + httpConfig: + description: HTTP client configuration. + properties: + authorization: + description: Authorization header configuration for + the client. This is mutually exclusive with BasicAuth + and is only available starting from Alertmanager + v0.22+. + properties: + credentials: + description: Selects a key of a Secret in the + namespace that contains the credentials for + authentication. + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: + description: "Defines the authentication type. + The value is case-insensitive. \n \"Basic\" + is not a supported value. \n Default: \"Bearer\"" + type: string + type: object + basicAuth: + description: BasicAuth for the client. This is mutually + exclusive with Authorization. If both are defined, + BasicAuth takes precedence. + properties: + password: + description: The secret in the service monitor + namespace that contains the password for authentication. + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + username: + description: The secret in the service monitor + namespace that contains the username for authentication. + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearerTokenSecret: + description: The secret's key that contains the bearer + token to be used by the client for authentication. + The secret needs to be in the same namespace as + the AlertmanagerConfig object and accessible by + the Prometheus Operator. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its + key must be defined + type: boolean + required: + - key + type: object + followRedirects: + description: FollowRedirects specifies whether the + client should follow HTTP 3xx redirects. + type: boolean + oauth2: + description: OAuth2 client credentials used to fetch + a token for the targets. + properties: + clientId: + description: The secret or configmap containing + the OAuth2 client id + properties: + configMap: + description: ConfigMap containing data to + use for the targets. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + description: Secret containing data to use + for the targets. + properties: + key: + description: The key of the secret to + select from. Must be a valid secret + key. + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + clientSecret: + description: The secret containing the OAuth2 + client secret + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + endpointParams: + additionalProperties: + type: string + description: Parameters to append to the token + URL + type: object + scopes: + description: OAuth2 scopes used for the token + request + items: + type: string + type: array + tokenUrl: + description: The URL to fetch the token from + minLength: 1 + type: string + required: + - clientId + - clientSecret + - tokenUrl + type: object + proxyURL: + description: Optional proxy URL. + type: string + tlsConfig: + description: TLS configuration for the client. + properties: + ca: + description: Certificate authority used when verifying + server certificates. + properties: + configMap: + description: ConfigMap containing data to + use for the targets. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + description: Secret containing data to use + for the targets. + properties: + key: + description: The key of the secret to + select from. Must be a valid secret + key. + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + cert: + description: Client certificate to present when + doing client-authentication. + properties: + configMap: + description: ConfigMap containing data to + use for the targets. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + description: Secret containing data to use + for the targets. + properties: + key: + description: The key of the secret to + select from. Must be a valid secret + key. + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keySecret: + description: Secret containing the client key + file for the targets. + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or + its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + description: Used to verify the hostname for the + targets. + type: string + type: object + type: object + message: + description: The template of the message's body. + type: string + sendResolved: + description: Whether or not to notify about resolved alerts. + type: boolean + title: + description: The template of the message's title. + type: string + required: + - apiURL + type: object + type: array emailConfigs: description: List of Email configurations. items: @@ -14440,6 +14828,11 @@ spec: deny: type: boolean type: object + bodySizeLimit: + description: BodySizeLimit defines per-scrape on response body size. + Only valid in Prometheus versions 2.45.0 and newer. + pattern: (^0|([0-9]*[.])?[0-9]+((K|M|G|T|E|P)i?)?B)$ + type: string configMaps: description: ConfigMaps is a list of ConfigMaps in the same namespace as the Prometheus object, which shall be mounted into the Prometheus @@ -15842,6 +16235,7 @@ spec: - servicemonitors - podmonitors - probes + - scrapeconfigs type: string required: - namespace @@ -17210,6 +17604,23 @@ spec: - name type: object type: array + labelLimit: + description: Per-scrape limit on number of labels that will be accepted + for a sample. Only valid in Prometheus versions 2.45.0 and newer. + format: int64 + type: integer + labelNameLengthLimit: + description: Per-scrape limit on length of labels name that will be + accepted for a sample. Only valid in Prometheus versions 2.45.0 + and newer. + format: int64 + type: integer + labelValueLengthLimit: + description: Per-scrape limit on length of labels value that will + be accepted for a sample. Only valid in Prometheus versions 2.45.0 + and newer. + format: int64 + type: integer listenLocal: description: When true, the Prometheus server listens on the loopback address instead of the Pod IP's address. @@ -18121,6 +18532,12 @@ spec: is still true, but the server serves requests under a different route prefix. For example for use with `kubectl proxy`." type: string + sampleLimit: + description: SampleLimit defines per-scrape limit on number of scraped + samples that will be accepted. Only valid in Prometheus versions + 2.45.0 and newer. + format: int64 + type: integer scrapeConfigNamespaceSelector: description: Namespaces to match for ScrapeConfig discovery. An empty label selector matches all namespaces. A null label selector matches @@ -19179,6 +19596,12 @@ spec: type: object type: object type: object + targetLimit: + description: TargetLimit defines a limit on the number of scraped + targets that will be accepted. Only valid in Prometheus versions + 2.45.0 and newer. + format: int64 + type: integer tolerations: description: Defines the Pods' tolerations if specified. items: @@ -23055,6 +23478,11 @@ spec: baseImage: description: '*Deprecated: use ''spec.image'' instead.*' type: string + bodySizeLimit: + description: BodySizeLimit defines per-scrape on response body size. + Only valid in Prometheus versions 2.45.0 and newer. + pattern: (^0|([0-9]*[.])?[0-9]+((K|M|G|T|E|P)i?)?B)$ + type: string configMaps: description: ConfigMaps is a list of ConfigMaps in the same namespace as the Prometheus object, which shall be mounted into the Prometheus @@ -24473,6 +24901,7 @@ spec: - servicemonitors - podmonitors - probes + - scrapeconfigs type: string required: - namespace @@ -25855,6 +26284,23 @@ spec: - name type: object type: array + labelLimit: + description: Per-scrape limit on number of labels that will be accepted + for a sample. Only valid in Prometheus versions 2.45.0 and newer. + format: int64 + type: integer + labelNameLengthLimit: + description: Per-scrape limit on length of labels name that will be + accepted for a sample. Only valid in Prometheus versions 2.45.0 + and newer. + format: int64 + type: integer + labelValueLengthLimit: + description: Per-scrape limit on length of labels value that will + be accepted for a sample. Only valid in Prometheus versions 2.45.0 + and newer. + format: int64 + type: integer listenLocal: description: When true, the Prometheus server listens on the loopback address instead of the Pod IP's address. @@ -27311,6 +27757,12 @@ spec: type: string type: object type: object + sampleLimit: + description: SampleLimit defines per-scrape limit on number of scraped + samples that will be accepted. Only valid in Prometheus versions + 2.45.0 and newer. + format: int64 + type: integer scrapeConfigNamespaceSelector: description: Namespaces to match for ScrapeConfig discovery. An empty label selector matches all namespaces. A null label selector matches @@ -28377,6 +28829,12 @@ spec: description: '*Deprecated: use ''spec.image'' instead. The image''s tag can be specified as part of the image name.*' type: string + targetLimit: + description: TargetLimit defines a limit on the number of scraped + targets that will be accepted. Only valid in Prometheus versions + 2.45.0 and newer. + format: int64 + type: integer thanos: description: "Defines the configuration of the optional Thanos sidecar. \n This section is experimental, it may change significantly without @@ -31378,6 +31836,418 @@ spec: type: object x-kubernetes-map-type: atomic type: object + consulSDConfigs: + description: ConsulSDConfigs defines a list of Consul service discovery + configurations. + items: + description: ConsulSDConfig defines a Consul service discovery configuration + See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config + properties: + allow_stale: + description: 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. + type: boolean + authorization: + description: Authorization header configuration to authenticate + against the Consul Server. + properties: + credentials: + description: Selects a key of a Secret in the namespace + that contains the credentials for authentication. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: + description: "Defines the authentication type. The value + is case-insensitive. \n \"Basic\" is not a supported value. + \n Default: \"Bearer\"" + type: string + type: object + basicAuth: + description: 'BasicAuth information to authenticate against + the Consul Server. More info: https://prometheus.io/docs/operating/configuration/#endpoints' + properties: + password: + description: The secret in the service monitor namespace + that contains the password for authentication. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + username: + description: The secret in the service monitor namespace + that contains the username for authentication. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + datacenter: + description: Consul Datacenter name, if not provided it will + use the local Consul Agent Datacenter. + type: string + enable_http2: + description: Whether to enable HTTP2. If unset, Prometheus uses + its default value. + type: boolean + follow_redirects: + description: Configure whether HTTP requests follow HTTP 3xx + redirects. If unset, Prometheus uses its default value. + type: boolean + namespace: + description: Namespaces are only supported in Consul Enterprise. + type: string + no_proxy: + description: 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. + type: string + node_meta: + additionalProperties: + type: string + description: Node metadata key/value pairs to filter nodes for + a given service. + type: object + x-kubernetes-map-type: atomic + oauth2: + description: Optional OAuth 2.0 configuration. + properties: + clientId: + description: The secret or configmap containing the OAuth2 + client id + properties: + configMap: + description: ConfigMap containing data to use for the + targets. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + description: Secret containing data to use for the targets. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + clientSecret: + description: The secret containing the OAuth2 client secret + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + endpointParams: + additionalProperties: + type: string + description: Parameters to append to the token URL + type: object + scopes: + description: OAuth2 scopes used for the token request + items: + type: string + type: array + tokenUrl: + description: The URL to fetch the token from + minLength: 1 + type: string + required: + - clientId + - clientSecret + - tokenUrl + type: object + partition: + description: Admin Partitions are only supported in Consul Enterprise. + type: string + proxy_connect_header: + additionalProperties: + description: SecretKeySelector selects a key of a Secret. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + description: Specifies headers to send to proxies during CONNECT + requests. + type: object + x-kubernetes-map-type: atomic + proxy_from_environment: + description: Use proxy URL indicated by environment variables + (HTTP_PROXY, https_proxy, HTTPs_PROXY, https_proxy, and no_proxy) + If unset, Prometheus uses its default value. + type: boolean + proxy_url: + description: Optional proxy URL. + type: string + refresh_interval: + description: 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. + pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ + type: string + scheme: + description: HTTP Scheme default "http" + enum: + - HTTP + - HTTPS + type: string + server: + description: A valid string consisting of a hostname or IP followed + by an optional port number. + minLength: 1 + type: string + services: + description: A list of services for which targets are retrieved. + If omitted, all services are scraped. + items: + type: string + type: array + x-kubernetes-list-type: atomic + tag_separator: + description: The string by which Consul tags are joined into + the tag label. If unset, Prometheus uses its default value. + type: string + tags: + description: An optional list of tags used to filter nodes for + a given service. Services must contain all tags in the list. + items: + type: string + type: array + x-kubernetes-list-type: atomic + tlsConfig: + description: TLS Config + properties: + ca: + description: Certificate authority used when verifying server + certificates. + properties: + configMap: + description: ConfigMap containing data to use for the + targets. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + description: Secret containing data to use for the targets. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + cert: + description: Client certificate to present when doing client-authentication. + properties: + configMap: + description: ConfigMap containing data to use for the + targets. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + description: Secret containing data to use for the targets. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keySecret: + description: Secret containing the client key file for the + targets. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + description: Used to verify the hostname for the targets. + type: string + type: object + tokenRef: + description: Consul ACL TokenRef, if not provided it will use + the ACL from the local Consul Agent. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + required: + - server + type: object + type: array fileSDConfigs: description: FileSDConfigs defines a list of file service discovery configurations. @@ -31630,6 +32500,23 @@ spec: - url type: object type: array + kubernetesSDConfigs: + description: KubernetesSDConfigs defines a list of Kubernetes service + discovery configurations. + items: + description: KubernetesSDConfig allows retrieving scrape targets + from Kubernetes' REST API. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config + properties: + role: + description: Role of the Kubernetes entities that should be + discovered. Currently the only supported role is "Node". + enum: + - Node + type: string + required: + - role + type: object + type: array labelLimit: description: Per-scrape limit on number of labels that will be accepted for a sample. Only valid in Prometheus versions 2.27.0 and newer. @@ -31651,6 +32538,14 @@ spec: description: MetricsPath HTTP path to scrape for metrics. If empty, Prometheus uses the default value (e.g. /metrics). type: string + params: + additionalProperties: + items: + type: string + type: array + description: Optional HTTP URL parameters + type: object + x-kubernetes-map-type: atomic relabelings: description: 'RelabelConfigs defines how to rewrite the target''s labels before scraping. Prometheus Operator automatically adds relabelings @@ -31739,6 +32634,15 @@ spec: - HTTP - HTTPS type: string + scrapeInterval: + description: ScrapeInterval is the interval between consecutive scrapes. + pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ + type: string + scrapeTimeout: + description: ScrapeTimeout is the number of seconds to wait until + a scrape request times out. + pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ + type: string staticConfigs: description: StaticConfigs defines a list of static targets with a common label set. @@ -34907,6 +35811,7 @@ spec: - servicemonitors - podmonitors - probes + - scrapeconfigs type: string required: - namespace @@ -39438,7 +40343,7 @@ metadata: labels: app.kubernetes.io/component: controller app.kubernetes.io/name: prometheus-operator - app.kubernetes.io/version: 0.66.0 + app.kubernetes.io/version: 0.67.0 name: prometheus-operator roleRef: apiGroup: rbac.authorization.k8s.io @@ -39447,7 +40352,7 @@ roleRef: subjects: - kind: ServiceAccount name: prometheus-operator - namespace: monitoring + namespace: default --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole @@ -39455,7 +40360,7 @@ metadata: labels: app.kubernetes.io/component: controller app.kubernetes.io/name: prometheus-operator - app.kubernetes.io/version: 0.66.0 + app.kubernetes.io/version: 0.67.0 name: prometheus-operator rules: - apiGroups: @@ -39542,9 +40447,9 @@ metadata: labels: app.kubernetes.io/component: controller app.kubernetes.io/name: prometheus-operator - app.kubernetes.io/version: 0.66.0 + app.kubernetes.io/version: 0.67.0 name: prometheus-operator - namespace: monitoring + namespace: default spec: replicas: 1 selector: @@ -39558,14 +40463,14 @@ spec: labels: app.kubernetes.io/component: controller app.kubernetes.io/name: prometheus-operator - app.kubernetes.io/version: 0.66.0 + app.kubernetes.io/version: 0.67.0 spec: automountServiceAccountToken: true containers: - args: - --kubelet-service=kube-system/kubelet - - --prometheus-config-reloader=quay.io/prometheus-operator/prometheus-config-reloader:v0.66.0 - image: quay.io/prometheus-operator/prometheus-operator:v0.66.0 + - --prometheus-config-reloader=quay.io/prometheus-operator/prometheus-config-reloader:v0.67.0 + image: quay.io/prometheus-operator/prometheus-operator:v0.67.0 name: prometheus-operator ports: - containerPort: 8080 @@ -39599,9 +40504,9 @@ metadata: labels: app.kubernetes.io/component: controller app.kubernetes.io/name: prometheus-operator - app.kubernetes.io/version: 0.66.0 + app.kubernetes.io/version: 0.67.0 name: prometheus-operator - namespace: monitoring + namespace: default --- apiVersion: v1 kind: Service @@ -39609,9 +40514,9 @@ metadata: labels: app.kubernetes.io/component: controller app.kubernetes.io/name: prometheus-operator - app.kubernetes.io/version: 0.66.0 + app.kubernetes.io/version: 0.67.0 name: prometheus-operator - namespace: monitoring + namespace: default spec: clusterIP: None ports: diff --git a/manifests/prometheus-operator/kustomization.yaml b/manifests/prometheus-operator/kustomization.yaml new file mode 100644 index 0000000..25eda21 --- /dev/null +++ b/manifests/prometheus-operator/kustomization.yaml @@ -0,0 +1,3 @@ +resources: + - bundle.yaml + - servicemonitor.yaml diff --git a/manifests/prometheus-operator/servicemonitor.yaml b/manifests/prometheus-operator/servicemonitor.yaml new file mode 100644 index 0000000..c5e6924 --- /dev/null +++ b/manifests/prometheus-operator/servicemonitor.yaml @@ -0,0 +1,14 @@ +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: prometheus-operator + namespace: monitoring + labels: + team: core +spec: + selector: + matchLabels: + app.kubernetes.io/name: prometheus-operator + endpoints: + - port: http + path: /metrics diff --git a/manifests/prometheus/kustomization.yaml b/manifests/prometheus/kustomization.yaml index 1201b4c..723baa6 100644 --- a/manifests/prometheus/kustomization.yaml +++ b/manifests/prometheus/kustomization.yaml @@ -1,5 +1,4 @@ resources: - - bundle.yaml - serviceaccount.yaml - clusterrole.yaml - clusterrolebinding.yaml