diff --git a/.github/workflows/charts-test.yaml b/.github/workflows/charts-test.yaml index b7e20398b1f..0fddc550faf 100644 --- a/.github/workflows/charts-test.yaml +++ b/.github/workflows/charts-test.yaml @@ -157,7 +157,7 @@ jobs: kubectl apply -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.20/releases/cnpg-1.20.0.yaml --server-side --force-conflicts || echo "error fetching cnpg manifest" fi if [[ "${{ matrix.chart }}" != "charts/operators/prometheus-operator" ]]; then - kubectl apply -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.65.2/bundle.yaml --server-side --force-conflicts || echo "error fetching prometheus operator manifest" + kubectl apply -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.66.0/bundle.yaml --server-side --force-conflicts || echo "error fetching prometheus operator manifest" fi - name: Run chart-testing (install) @@ -215,7 +215,7 @@ jobs: kubectl apply -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.17/releases/cnpg-1.17.5.yaml --server-side --force-conflicts || echo "error fetching cnpg manifest" fi if [[ "${{ matrix.chart }}" != "charts/operators/prometheus-operator" ]]; then - kubectl apply -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.65.2/bundle.yaml --server-side --force-conflicts || echo "error fetching prometheus operator manifest" + kubectl apply -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.66.0/bundle.yaml --server-side --force-conflicts || echo "error fetching prometheus operator manifest" fi - name: Run chart-testing (install) @@ -273,7 +273,7 @@ jobs: kubectl apply -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.17/releases/cnpg-1.17.5.yaml --server-side --force-conflicts || echo "error fetching cnpg manifest" fi if [[ "${{ matrix.chart }}" != "charts/operators/prometheus-operator" ]]; then - kubectl apply -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.65.2/bundle.yaml --server-side --force-conflicts || echo "error fetching prometheus operator manifest" + kubectl apply -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.66.0/bundle.yaml --server-side --force-conflicts || echo "error fetching prometheus operator manifest" fi - name: Run chart-testing (install) @@ -331,7 +331,7 @@ jobs: kubectl apply -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.17/releases/cnpg-1.17.5.yaml --server-side --force-conflicts || echo "error fetching cnpg manifest" fi if [[ "${{ matrix.chart }}" != "charts/operators/prometheus-operator" ]]; then - kubectl apply -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.65.2/bundle.yaml --server-side --force-conflicts || echo "error fetching prometheus operator manifest" + kubectl apply -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.66.0/bundle.yaml --server-side --force-conflicts || echo "error fetching prometheus operator manifest" fi - name: Run chart-testing (install) @@ -389,7 +389,7 @@ jobs: kubectl apply -f --server-side --force-conflicts https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.17/releases/cnpg-1.17.5.yaml fi if [[ "${{ matrix.chart }}" != "charts/operators/prometheus-operator" ]]; then - kubectl apply -f --server-side --force-conflicts --server-side --force-conflicts https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.65.2/bundle.yaml + kubectl apply -f --server-side --force-conflicts --server-side --force-conflicts https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.66.0/bundle.yaml fi - name: Run chart-testing (install) @@ -447,7 +447,7 @@ jobs: kubectl apply -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.17/releases/cnpg-1.17.5.yaml --server-side --force-conflicts || echo "error fetching cnpg manifest" fi if [[ "${{ matrix.chart }}" != "charts/operators/prometheus-operator" ]]; then - kubectl apply -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.65.2/bundle.yaml --server-side --force-conflicts || echo "error fetching prometheus operator manifest" + kubectl apply -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.66.0/bundle.yaml --server-side --force-conflicts || echo "error fetching prometheus operator manifest" fi - name: Run chart-testing (install) diff --git a/charts/operators/prometheus-operator/Chart.yaml b/charts/operators/prometheus-operator/Chart.yaml index 0a2a96daa98..d0c0939cbb7 100644 --- a/charts/operators/prometheus-operator/Chart.yaml +++ b/charts/operators/prometheus-operator/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: "0.65.2" +appVersion: "0.66.0" deprecated: false description: Prometheus Operator is an operator for prometheus home: https://truecharts.org/charts/operators/prometheus-operator @@ -22,7 +22,7 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/operators/prometheus-operator - https://github.com/prometheus-operator type: application -version: 0.0.7 +version: 0.0.8 annotations: truecharts.org/catagories: | - operators diff --git a/charts/operators/prometheus-operator/templates/crds/crd-alertmanagerconfigs.yaml b/charts/operators/prometheus-operator/templates/crds/crd-alertmanagerconfigs.yaml index 5962111665d..eb9c4df8c3e 100644 --- a/charts/operators/prometheus-operator/templates/crds/crd-alertmanagerconfigs.yaml +++ b/charts/operators/prometheus-operator/templates/crds/crd-alertmanagerconfigs.yaml @@ -1,4 +1,4 @@ -# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.2/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml +# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -2699,9 +2699,9 @@ spec: signing process to sign requests. properties: accessKey: - description: AccessKey is the AWS API key. If blank, - the environment variable `AWS_ACCESS_KEY_ID` is - used. + description: AccessKey is the AWS API key. If not + specified, the environment variable `AWS_ACCESS_KEY_ID` + is used. properties: key: description: The key of the secret to select from. Must @@ -2734,8 +2734,8 @@ spec: to authenticate. type: string secretKey: - description: SecretKey is the AWS API secret. If blank, - the environment variable `AWS_SECRET_ACCESS_KEY` + description: SecretKey is the AWS API secret. If not + specified, the environment variable `AWS_SECRET_ACCESS_KEY` is used. properties: key: diff --git a/charts/operators/prometheus-operator/templates/crds/crd-alertmanagers.yaml b/charts/operators/prometheus-operator/templates/crds/crd-alertmanagers.yaml index 305c94a05dc..904654b2049 100644 --- a/charts/operators/prometheus-operator/templates/crds/crd-alertmanagers.yaml +++ b/charts/operators/prometheus-operator/templates/crds/crd-alertmanagers.yaml @@ -1,4 +1,4 @@ -# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.2/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml +# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -1397,6 +1397,9 @@ spec: - key type: object x-kubernetes-map-type: atomic + pagerdutyUrl: + description: The default Pagerduty URL. + type: string resolveTimeout: description: ResolveTimeout is the default value used by alertmanager if the alert does not include EndsAt, after this time passes @@ -1479,6 +1482,12 @@ spec: type: object type: array type: object + automountServiceAccountToken: + description: 'AutomountServiceAccountToken indicates whether a service + account token should be automatically mounted in the pod. If the + service account has `automountServiceAccountToken: true`, set the + field to `false` to opt out of automounting API credentials.' + type: boolean baseImage: description: 'Base image that is used to deploy pods, without tag. Deprecated: use ''image'' instead' @@ -1781,7 +1790,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -1877,7 +1888,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -1988,7 +2001,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -2188,7 +2203,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -2588,7 +2605,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -3114,7 +3133,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -3210,7 +3231,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -3321,7 +3344,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -3521,7 +3546,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -3921,7 +3948,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -4458,14 +4487,13 @@ spec: by the Alertmanager instances. properties: disableMountSubPath: - description: 'Deprecated: subPath usage will be disabled by default - in a future release, this option will become unnecessary. DisableMountSubPath - allows to remove any subPath usage in volume mounts.' + description: '*Deprecated: subPath usage will be removed in a + future release.*' type: boolean emptyDir: description: 'EmptyDirVolumeSource to be used by the StatefulSet. - If specified, used in place of any volumeClaimTemplate. More - info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir' + If specified, it takes precedence over `ephemeral` and `volumeClaimTemplate`. + More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir' properties: medium: description: 'medium represents what type of storage medium @@ -4489,8 +4517,8 @@ spec: type: object ephemeral: description: 'EphemeralVolumeSource to be used by the StatefulSet. - This is a beta field in k8s 1.21, for lower versions, starting - with k8s 1.19, it requires enabling the GenericEphemeralVolume + This is a beta field in k8s 1.21 and GA in 1.15. For lower versions, + starting with k8s 1.19, it requires enabling the GenericEphemeralVolume feature gate. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes' properties: volumeClaimTemplate: @@ -4750,10 +4778,10 @@ spec: type: object type: object volumeClaimTemplate: - description: A PVC spec to be used by the StatefulSet. The easiest - way to use a volume that cannot be automatically provisioned - (for whatever reason) is to use a label selector alongside manually - created PersistentVolumes. + description: Defines the PVC spec to be used by the Prometheus + StatefulSets. The easiest way to use a volume that cannot be + automatically provisioned is to use a label selector alongside + manually created PersistentVolumes. properties: apiVersion: description: 'APIVersion defines the versioned schema of this @@ -4798,8 +4826,8 @@ spec: type: string type: object spec: - description: 'Spec defines the desired characteristics of - a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + description: 'Defines the desired characteristics of a volume + requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' properties: accessModes: description: 'accessModes contains the desired access @@ -5012,8 +5040,7 @@ spec: type: string type: object status: - description: 'Status represents the current information/status - of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + description: '*Deprecated: this field is never set.*' properties: accessModes: description: 'accessModes contains the actual access modes diff --git a/charts/operators/prometheus-operator/templates/crds/crd-podmonitors.yaml b/charts/operators/prometheus-operator/templates/crds/crd-podmonitors.yaml index 91e1674994a..4ba5fa6a762 100644 --- a/charts/operators/prometheus-operator/templates/crds/crd-podmonitors.yaml +++ b/charts/operators/prometheus-operator/templates/crds/crd-podmonitors.yaml @@ -1,4 +1,4 @@ -# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.2/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml +# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/charts/operators/prometheus-operator/templates/crds/crd-probes.yaml b/charts/operators/prometheus-operator/templates/crds/crd-probes.yaml index 1574b5c96f8..05a52bed5ba 100644 --- a/charts/operators/prometheus-operator/templates/crds/crd-probes.yaml +++ b/charts/operators/prometheus-operator/templates/crds/crd-probes.yaml @@ -1,4 +1,4 @@ -# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.2/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml +# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/charts/operators/prometheus-operator/templates/crds/crd-prometheusagents.yaml b/charts/operators/prometheus-operator/templates/crds/crd-prometheusagents.yaml index a34bb9a32e0..2a53b2872f3 100644 --- a/charts/operators/prometheus-operator/templates/crds/crd-prometheusagents.yaml +++ b/charts/operators/prometheus-operator/templates/crds/crd-prometheusagents.yaml @@ -1,4 +1,4 @@ -# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.2/example/prometheus-operator-crd/monitoring.coreos.com_prometheusagents.yaml +# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusagents.yaml --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -72,15 +72,15 @@ spec: agent. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' properties: additionalArgs: - description: AdditionalArgs allows setting additional arguments for - the Prometheus container. It is intended for e.g. activating hidden - flags which are not supported by the dedicated configuration options - yet. The arguments are passed as-is to the Prometheus container + description: "AdditionalArgs allows setting additional arguments for + the 'prometheus' container. \n It is intended for e.g. activating + hidden flags which are not supported by the dedicated configuration + options yet. The arguments are passed as-is to the Prometheus container which may cause issues if they are invalid or not supported by the - given Prometheus version. In case of an argument conflict (e.g. + given Prometheus version. \n In case of an argument conflict (e.g. an argument which is already set by the operator itself) or when - providing an invalid argument the reconciliation will fail and an - error will be logged. + providing an invalid argument, the reconciliation will fail and + an error will be logged." items: description: Argument as part of the AdditionalArgs list. properties: @@ -125,7 +125,7 @@ spec: type: object x-kubernetes-map-type: atomic affinity: - description: If specified, the pod's scheduling constraints. + description: Defines the Pods' affinity scheduling rules if specified. properties: nodeAffinity: description: Describes node affinity scheduling rules for the @@ -953,10 +953,10 @@ spec: type: object type: object apiserverConfig: - description: APIServerConfig allows specifying a host and auth methods - to access apiserver. If left empty, Prometheus is assumed to run - inside of the cluster and will discover API servers automatically - and use the pod's CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/. + description: 'APIServerConfig allows specifying a host and auth methods + to access the Kuberntees API server. If null, Prometheus is assumed + to run inside of the cluster: it will discover the API servers automatically + and use the Pod''s CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/.' properties: authorization: description: Authorization section for accessing apiserver @@ -1180,9 +1180,14 @@ spec: - host type: object arbitraryFSAccessThroughSMs: - description: ArbitraryFSAccessThroughSMs configures whether configuration - based on a service monitor can access arbitrary files on the file - system of the Prometheus container e.g. bearer token files. + description: When true, ServiceMonitor, PodMonitor and Probe object + are forbidden to reference arbitrary files on the file system of + the 'prometheus' container. When a ServiceMonitor's endpoint specifies + a `bearerTokenFile` value (e.g. '/var/run/secrets/kubernetes.io/serviceaccount/token'), + a malicious target can get access to the Prometheus service account's + token in the Prometheus' scrape request. Setting `spec.arbitraryFSAccessThroughSM` + to 'true' would prevent the attack. Users should instead provide + the credentials using the `spec.bearerTokenSecret` field. properties: deny: type: boolean @@ -1198,16 +1203,16 @@ spec: type: string type: array containers: - description: 'Containers allows injecting additional containers or + description: "Containers allows injecting additional containers or modifying operator generated containers. This can be used to allow - adding an authentication proxy to a Prometheus pod or to change - the behavior of an operator generated container. Containers described - here modify an operator generated container if they share the same - name and modifications are done via a strategic merge patch. The - current container names are: `prometheus`, `config-reloader`, and - `thanos-sidecar`. Overriding containers is entirely outside the - scope of what the maintainers will support and by doing so, you - accept that this behaviour may break at any time without notice.' + adding an authentication proxy to the Pods or to change the behavior + of an operator generated container. Containers described here modify + an operator generated container if they share the same name and + modifications are done via a strategic merge patch. \n The names + of containers managed by the operator are: * `prometheus` * `config-reloader` + * `thanos-sidecar` \n Overriding containers is entirely outside + the scope of what the maintainers will support and by doing so, + you accept that this behaviour may break at any time without notice." items: description: A single application container that you want to run within a pod. @@ -1458,7 +1463,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -1554,7 +1561,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -1665,7 +1674,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -1865,7 +1876,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -2265,7 +2278,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -2466,88 +2481,93 @@ spec: type: object type: array enableFeatures: - description: Enable access to Prometheus disabled features. By default, - no features are enabled. Enabling disabled features is entirely - outside the scope of what the maintainers will support and by doing - so, you accept that this behaviour may break at any time without - notice. For more information see https://prometheus.io/docs/prometheus/latest/disabled_features/ + description: "Enable access to Prometheus feature flags. By default, + no features are enabled. \n Enabling features which are disabled + by default is entirely outside the scope of what the maintainers + will support and by doing so, you accept that this behaviour may + break at any time without notice. \n For more information see https://prometheus.io/docs/prometheus/latest/feature_flags/" items: type: string type: array enableRemoteWriteReceiver: - description: 'Enable Prometheus to be used as a receiver for the Prometheus - remote write protocol. Defaults to the value of `false`. WARNING: - This is not considered an efficient way of ingesting samples. Use - it with caution for specific low-volume use cases. It is not suitable - for replacing the ingestion via scraping and turning Prometheus - into a push-based metrics collection system. For more information - see https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver - Only valid in Prometheus versions 2.33.0 and newer.' + description: "Enable Prometheus to be used as a receiver for the Prometheus + remote write protocol. \n WARNING: This is not considered an efficient + way of ingesting samples. Use it with caution for specific low-volume + use cases. It is not suitable for replacing the ingestion via scraping + and turning Prometheus into a push-based metrics collection system. + For more information see https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver + \n It requires Prometheus >= v2.33.0." type: boolean enforcedBodySizeLimit: - description: 'EnforcedBodySizeLimit defines the maximum size of uncompressed - response body that will be accepted by Prometheus. Targets responding - with a body larger than this many bytes will cause the scrape to - fail. Example: 100MB. If defined, the limit will apply to all service/pod - monitors and probes. This is an experimental feature, this behaviour - could change or be removed in the future. Only valid in Prometheus - versions 2.28.0 and newer.' + description: "When defined, enforcedBodySizeLimit specifies a global + limit on the size of uncompressed response body that will be accepted + by Prometheus. Targets responding with a body larger than this many + bytes will cause the scrape to fail. \n It requires Prometheus >= + v2.28.0." pattern: (^0|([0-9]*[.])?[0-9]+((K|M|G|T|E|P)i?)?B)$ type: string enforcedLabelLimit: - description: Per-scrape limit on number of labels that will be accepted - for a sample. If more than this number of labels are present post - metric-relabeling, the entire scrape will be treated as failed. - 0 means no limit. Only valid in Prometheus versions 2.27.0 and newer. + description: "When defined, enforcedLabelLimit specifies a global + limit on the number of labels per sample. The value overrides any + `spec.labelLimit` set by ServiceMonitor, PodMonitor, Probe objects + unless `spec.labelLimit` is greater than zero and less than `spec.enforcedLabelLimit`. + \n It requires Prometheus >= v2.27.0." format: int64 type: integer enforcedLabelNameLengthLimit: - description: Per-scrape limit on length of labels name that will be - accepted for a sample. If a label name is longer than this number - post metric-relabeling, the entire scrape will be treated as failed. - 0 means no limit. Only valid in Prometheus versions 2.27.0 and newer. + description: "When defined, enforcedLabelNameLengthLimit specifies + a global limit on the length of labels name per sample. The value + overrides any `spec.labelNameLengthLimit` set by ServiceMonitor, + PodMonitor, Probe objects unless `spec.labelNameLengthLimit` is + greater than zero and less than `spec.enforcedLabelNameLengthLimit`. + \n It requires Prometheus >= v2.27.0." format: int64 type: integer enforcedLabelValueLengthLimit: - description: Per-scrape limit on length of labels value that will - be accepted for a sample. If a label value is longer than this number - post metric-relabeling, the entire scrape will be treated as failed. - 0 means no limit. Only valid in Prometheus versions 2.27.0 and newer. + description: "When not null, enforcedLabelValueLengthLimit defines + a global limit on the length of labels value per sample. The value + overrides any `spec.labelValueLengthLimit` set by ServiceMonitor, + PodMonitor, Probe objects unless `spec.labelValueLengthLimit` is + greater than zero and less than `spec.enforcedLabelValueLengthLimit`. + \n It requires Prometheus >= v2.27.0." format: int64 type: integer enforcedNamespaceLabel: - description: "EnforcedNamespaceLabel If set, a label will be added - to \n 1. all user-metrics (created by `ServiceMonitor`, `PodMonitor` - and `Probe` objects) and 2. in all `PrometheusRule` objects (except - the ones excluded in `prometheusRulesExcludedFromEnforce`) to * - alerting & recording rules and * the metrics used in their expressions - (`expr`). \n Label name is this field's value. Label value is the - namespace of the created object (mentioned above)." + description: "When not empty, a label will be added to \n 1. All metrics + scraped from `ServiceMonitor`, `PodMonitor`, `Probe` and `ScrapeConfig` + objects. 2. All metrics generated from recording rules defined in + `PrometheusRule` objects. 3. All alerts generated from alerting + rules defined in `PrometheusRule` objects. 4. All vector selectors + of PromQL expressions defined in `PrometheusRule` objects. \n The + label will not added for objects referenced in `spec.excludedFromEnforcement`. + \n The label's name is this field's value. The label's value is + the namespace of the `ServiceMonitor`, `PodMonitor`, `Probe` or + `PrometheusRule` object." type: string enforcedSampleLimit: - description: EnforcedSampleLimit defines global limit on number of - scraped samples that will be accepted. This overrides any SampleLimit - set per ServiceMonitor or/and PodMonitor. It is meant to be used - by admins to enforce the SampleLimit to keep overall number of samples/series - under the desired limit. Note that if SampleLimit is lower that - value will be taken instead. + description: "When defined, enforcedSampleLimit specifies a global + limit on the number of scraped samples that will be accepted. This + overrides any `spec.sampleLimit` set by ServiceMonitor, PodMonitor, + Probe objects unless `spec.sampleLimit` is greater than zero and + less than than `spec.enforcedSampleLimit`. \n It is meant to be + used by admins to keep the overall number of samples/series under + a desired limit." format: int64 type: integer enforcedTargetLimit: - description: EnforcedTargetLimit defines a global limit on the number - of scraped targets. This overrides any TargetLimit set per ServiceMonitor - or/and PodMonitor. It is meant to be used by admins to enforce - the TargetLimit to keep the overall number of targets under the - desired limit. Note that if TargetLimit is lower, that value will - be taken instead, except if either value is zero, in which case - the non-zero value will be used. If both values are zero, no limit - is enforced. + description: "When defined, enforcedTargetLimit specifies a global + limit on the number of scraped targets. The value overrides any + `spec.targetLimit` set by ServiceMonitor, PodMonitor, Probe objects + unless `spec.targetLimit` is greater than zero and less than `spec.enforcedTargetLimit`. + \n It is meant to be used by admins to to keep the overall number + of targets under a desired limit." format: int64 type: integer excludedFromEnforcement: - description: List of references to PodMonitor, ServiceMonitor, Probe + description: "List of references to PodMonitor, ServiceMonitor, Probe and PrometheusRule objects to be excluded from enforcing a namespace - label of origin. Applies only if enforcedNamespaceLabel set to true. + label of origin. \n It is only applicable if `spec.enforcedNamespaceLabel` + set to true." items: description: ObjectReference references a PodMonitor, ServiceMonitor, Probe or PrometheusRule object. @@ -2561,7 +2581,7 @@ spec: type: string name: description: Name of the referent. When not set, all resources - are matched. + in the namespace are matched. type: string namespace: description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' @@ -2585,14 +2605,17 @@ spec: type: string description: The labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager). + Labels defined by `spec.replicaExternalLabelName` and `spec.prometheusExternalLabelName` + take precedence over this list. type: object externalUrl: - description: The external URL the Prometheus instances will be available - under. This is necessary to generate correct URLs. This is necessary - if Prometheus is not served from root of a DNS name. + description: The external URL under which the Prometheus service is + externally available. This is necessary to generate correct URLs + (for instance if Prometheus is accessible behind an Ingress resource). type: string hostAliases: - description: Pods' hostAliases configuration + description: Optional list of hosts and IPs that will be injected + into the Pod's hosts file if specified. items: description: HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. @@ -2614,22 +2637,26 @@ spec: - ip x-kubernetes-list-type: map hostNetwork: - description: Use the host's network namespace if true. Make sure to - understand the security implications if you want to enable it. When - hostNetwork is enabled, this will set dnsPolicy to ClusterFirstWithHostNet - automatically. + description: "Use the host's network namespace if true. \n Make sure + to understand the security implications if you want to enable it + (https://kubernetes.io/docs/concepts/configuration/overview/). \n + When hostNetwork is enabled, this will set the DNS policy to `ClusterFirstWithHostNet` + automatically." type: boolean ignoreNamespaceSelectors: - description: IgnoreNamespaceSelectors if set to true will ignore NamespaceSelector - settings from all PodMonitor, ServiceMonitor and Probe objects. - They will only discover endpoints within the namespace of the PodMonitor, - ServiceMonitor and Probe objects. Defaults to false. + description: When true, `spec.namespaceSelector` from all PodMonitor, + ServiceMonitor and Probe objects will be ignored. They will only + discover targets within the namespace of the PodMonitor, ServiceMonitor + and Probe objec. type: boolean image: - description: Image if specified has precedence over baseImage, tag - and sha combinations. Specifying the version is still necessary - to ensure the Prometheus Operator knows what version of Prometheus - is being configured. + description: "Container image name for Prometheus. If specified, it + takes precedence over the `spec.baseImage`, `spec.tag` and `spec.sha` + fields. \n Specifying `spec.version` is still necessary to ensure + the Prometheus Operator knows which version of Prometheus is being + configured. \n If neither `spec.image` nor `spec.baseImage` are + defined, the operator will use the latest upstream version of Prometheus + available at the time when the operator was released." type: string imagePullPolicy: description: Image pull policy for the 'prometheus', 'init-config-reloader' @@ -2642,9 +2669,8 @@ spec: - IfNotPresent type: string imagePullSecrets: - description: An optional list of references to secrets in the same - namespace to use for pulling prometheus and alertmanager images - from registries see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod + description: An optional list of references to Secrets in the same + namespace to use for pulling images from registries. See http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod items: description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. @@ -2657,17 +2683,18 @@ spec: x-kubernetes-map-type: atomic type: array initContainers: - description: 'InitContainers allows adding initContainers to the pod - definition. Those can be used to e.g. fetch secrets for injection + description: "InitContainers allows injecting initContainers to the + Pod definition. Those can be used to e.g. fetch secrets for injection into the Prometheus configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ InitContainers described here modify an operator generated init containers if they share the same name and modifications are done - via a strategic merge patch. The current init container name is: - `init-config-reloader`. Overriding init containers is entirely outside - the scope of what the maintainers will support and by doing so, - you accept that this behaviour may break at any time without notice.' + via a strategic merge patch. \n The names of init container name + managed by the operator are: * `init-config-reloader`. \n Overriding + init containers is entirely outside the scope of what the maintainers + will support and by doing so, you accept that this behaviour may + break at any time without notice." items: description: A single application container that you want to run within a pod. @@ -2918,7 +2945,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -3014,7 +3043,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -3125,7 +3156,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -3325,7 +3358,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -3725,7 +3760,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -3926,18 +3963,19 @@ spec: type: object type: array listenLocal: - description: ListenLocal makes the Prometheus server listen on loopback, - so that it does not bind against the Pod IP. + description: When true, the Prometheus server listens on the loopback + address instead of the Pod IP's address. type: boolean logFormat: - description: Log format for Prometheus to be configured with. + description: Log format for Log level for Prometheus and the config-reloader + sidecar. enum: - "" - logfmt - json type: string logLevel: - description: Log level for Prometheus to be configured with. + description: Log level for Prometheus and the config-reloader sidecar. enum: - "" - debug @@ -3946,18 +3984,18 @@ spec: - error type: string minReadySeconds: - description: Minimum number of seconds for which a newly created pod - should be ready without any of its container crashing for it to - be considered available. Defaults to 0 (pod will be considered available - as soon as it is ready) This is an alpha field from kubernetes 1.22 - until 1.24 which requires enabling the StatefulSetMinReadySeconds - feature gate. + description: "Minimum number of seconds for which a newly created + Pod should be ready without any of its container crashing for it + to be considered available. Defaults to 0 (pod will be considered + available as soon as it is ready) \n This is an alpha field from + kubernetes 1.22 until 1.24 which requires enabling the StatefulSetMinReadySeconds + feature gate." format: int32 type: integer nodeSelector: additionalProperties: type: string - description: Define which Nodes the Pods are scheduled on. + description: Defines on which Nodes the Pods are scheduled. type: object overrideHonorLabels: description: When true, Prometheus resolves label conflicts by renaming @@ -3975,8 +4013,8 @@ spec: for deletion will be performed on the underlying objects. type: boolean podMetadata: - description: PodMetadata configures Labels and Annotations which are - propagated to the prometheus pods. + description: PodMetadata configures labels and annotations which are + propagated to the Prometheus pods. properties: annotations: additionalProperties: @@ -4003,8 +4041,9 @@ spec: type: string type: object podMonitorNamespaceSelector: - description: Namespace's labels to match for PodMonitor discovery. - If nil, only check own namespace. + description: Namespaces to match for PodMonitors discovery. An empty + label selector matches all namespaces. A null label selector matches + the current namespace only. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -4050,15 +4089,16 @@ spec: x-kubernetes-map-type: atomic podMonitorSelector: description: "*Experimental* PodMonitors to be selected for target - discovery. \n If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`, - `spec.probeSelector` and `spec.scrapeConfigSelector` are null, the - Prometheus configuration is unmanaged. The Prometheus operator will - ensure that the Prometheus configuration's Secret exists, but it - is the responsibility of the user to provide the raw gzipped Prometheus - configuration under the `prometheus.yaml.gz` key. This behavior - is deprecated and will be removed in the next major version of the - custom resource definition. It is recommended to use `spec.additionalScrapeConfigs` - instead." + discovery. An empty label selector matches all objects. A null label + selector matches no objects. \n If `spec.serviceMonitorSelector`, + `spec.podMonitorSelector`, `spec.probeSelector` and `spec.scrapeConfigSelector` + are null, the Prometheus configuration is unmanaged. The Prometheus + operator will ensure that the Prometheus configuration's Secret + exists, but it is the responsibility of the user to provide the + raw gzipped Prometheus configuration under the `prometheus.yaml.gz` + key. This behavior is *deprecated* and will be removed in the next + major version of the custom resource definition. It is recommended + to use `spec.additionalScrapeConfigs` instead." properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -4103,22 +4143,23 @@ spec: type: object x-kubernetes-map-type: atomic podTargetLabels: - description: PodTargetLabels are added to all Pod/ServiceMonitors' - podTargetLabels + description: PodTargetLabels are appended to the `spec.podTargetLabels` + field of all PodMonitor and ServiceMonitor objects. items: type: string type: array portName: default: web - description: Port name used for the pods and governing service. Defaults - to `web`. + description: 'Port name used for the pods and governing service. Default: + "web"' type: string priorityClassName: - description: Priority class assigned to the Pods + description: Priority class assigned to the Pods. type: string probeNamespaceSelector: - description: '*Experimental* Namespaces to be selected for Probe discovery. - If nil, only check own namespace.' + description: '*Experimental* Namespaces to match for Probe discovery. + An empty label selector matches all namespaces. A null label selector + matches the current namespace only.' properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -4164,14 +4205,15 @@ spec: x-kubernetes-map-type: atomic probeSelector: description: "*Experimental* Probes to be selected for target discovery. - \n If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`, + An empty label selector matches all objects. A null label selector + matches no objects. \n If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`, `spec.probeSelector` and `spec.scrapeConfigSelector` are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration's Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the `prometheus.yaml.gz` key. This behavior - is deprecated and will be removed in the next major version of the - custom resource definition. It is recommended to use `spec.additionalScrapeConfigs` + is *deprecated* and will be removed in the next major version of + the custom resource definition. It is recommended to use `spec.additionalScrapeConfigs` instead." properties: matchExpressions: @@ -4217,18 +4259,21 @@ spec: type: object x-kubernetes-map-type: atomic prometheusExternalLabelName: - description: Name of Prometheus external label used to denote Prometheus - instance name. Defaults to the value of `prometheus`. External label - will _not_ be added when value is set to empty string (`""`). + description: "Name of Prometheus external label used to denote the + Prometheus instance name. The external label will _not_ be added + when the field is set to the empty string (`\"\"`). \n Default: + \"prometheus\"" type: string remoteWrite: - description: remoteWrite is the list of remote write configurations. + description: Defines the list of remote write configurations. items: description: RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint. properties: authorization: - description: Authorization section for remote write + description: "Authorization section for the URL. \n It requires + Prometheus >= v2.26.0. \n Cannot be set at the same time as + `sigv4`, `basicAuth`, or `oauth2`." properties: credentials: description: The secret's key that contains the credentials @@ -4260,7 +4305,8 @@ spec: type: string type: object basicAuth: - description: BasicAuth for the URL. + description: "BasicAuth configuration for the URL. \n Cannot + be set at the same time as `sigv4`, `authorization`, or `oauth2`." properties: password: description: The secret in the service monitor namespace @@ -4304,18 +4350,22 @@ spec: x-kubernetes-map-type: atomic type: object bearerToken: - description: Bearer token for remote write. + description: "*Warning: this field shouldn't used because the + token value appears in clear-text. Prefer using `authorization`.* + \n *Deprecated: this will be removed in a future release.*" type: string bearerTokenFile: - description: File to read bearer token for remote write. + description: "File from which to read bearer token for the URL. + \n *Deprecated: this will be removed in a future release. + Prefer using `authorization`.*" type: string headers: additionalProperties: type: string - description: Custom HTTP headers to be sent along with each + description: "Custom HTTP headers to be sent along with each remote write request. Be aware that headers that are set by - Prometheus itself can't be overwritten. Only valid in Prometheus - versions 2.25.0 and newer. + Prometheus itself can't be overwritten. \n It requires Prometheus + >= v2.25.0." type: object metadataConfig: description: MetadataConfig configures the sending of series @@ -4332,14 +4382,15 @@ spec: type: string type: object name: - description: The name of the remote write queue, it must be + description: "The name of the remote write queue, it must be unique if specified. The name is used in metrics and logging - in order to differentiate queues. Only valid in Prometheus - versions 2.15.0 and newer. + in order to differentiate queues. \n It requires Prometheus + >= v2.15.0." type: string oauth2: - description: OAuth2 for the URL. Only valid in Prometheus versions - 2.27.0 and newer. + description: "OAuth2 configuration for the URL. \n It requires + Prometheus >= v2.27.0. \n Cannot be set at the same time as + `sigv4`, `authorization`, or `basicAuth`." properties: clientId: description: The secret or configmap containing the OAuth2 @@ -4473,18 +4524,25 @@ spec: 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 sendExemplars: - description: Enables sending of exemplars over remote write. + description: "Enables sending of exemplars over remote write. Note that exemplar-storage itself must be enabled using the - enableFeature option for exemplars to be scraped in the first - place. Only valid in Prometheus versions 2.27.0 and newer. + `spec.enableFeature` option for exemplars to be scraped in + the first place. \n It requires Prometheus >= v2.27.0." + type: boolean + sendNativeHistograms: + description: "Enables sending of native histograms, also known + as sparse histograms over remote write. \n It requires Prometheus + >= v2.40.0." type: boolean sigv4: - description: Sigv4 allows to configures AWS's Signature Verification - 4 + description: "Sigv4 allows to configures AWS's Signature Verification + 4 for the URL. \n It requires Prometheus >= v2.26.0. \n Cannot + be set at the same time as `authorization`, `basicAuth`, or + `oauth2`." properties: accessKey: - description: AccessKey is the AWS API key. If blank, the - environment variable `AWS_ACCESS_KEY_ID` is used. + description: AccessKey is the AWS API key. If not specified, + the environment variable `AWS_ACCESS_KEY_ID` is used. properties: key: description: The key of the secret to select from. Must @@ -4513,7 +4571,7 @@ spec: description: RoleArn is the named AWS profile used to authenticate. type: string secretKey: - description: SecretKey is the AWS API secret. If blank, + description: SecretKey is the AWS API secret. If not specified, the environment variable `AWS_SECRET_ACCESS_KEY` is used. properties: key: @@ -4534,7 +4592,7 @@ spec: x-kubernetes-map-type: atomic type: object tlsConfig: - description: TLS Config to use for remote write. + description: TLS Config to use for the URL. properties: ca: description: Certificate authority used when verifying server @@ -4746,18 +4804,19 @@ spec: type: object type: array replicaExternalLabelName: - description: Name of Prometheus external label used to denote replica - name. Defaults to the value of `prometheus_replica`. External label - will _not_ be added when value is set to empty string (`""`). + description: "Name of Prometheus external label used to denote the + replica name. The external label will _not_ be added when the field + is set to the empty string (`\"\"`). \n Default: \"prometheus_replica\"" type: string replicas: - description: Number of replicas of each shard to deploy for a Prometheus - deployment. Number of replicas multiplied by shards is the total - number of Pods created. + description: "Number of replicas of each shard to deploy for a Prometheus + deployment. `spec.replicas` multiplied by `spec.shards` is the total + number of Pods created. \n Default: 1" format: int32 type: integer resources: - description: Define resources requests and limits for single Pods. + description: Defines the resources requests and limits of the 'prometheus' + container. properties: claims: description: "Claims lists the names of resources, defined in @@ -4805,15 +4864,16 @@ spec: type: object type: object routePrefix: - description: The route prefix Prometheus registers HTTP handlers for. - This is useful, if using ExternalURL and a proxy is rewriting HTTP - routes of a request, and the actual ExternalURL is still true, but - the server serves requests under a different route prefix. For example - for use with `kubectl proxy`. + description: "The route prefix Prometheus registers HTTP handlers + for. \n This is useful when using `spec.externalURL`, and a proxy + is rewriting HTTP routes of a request, and the actual ExternalURL + is still true, but the server serves requests under a different + route prefix. For example for use with `kubectl proxy`." type: string scrapeConfigNamespaceSelector: - description: Namespace's labels to match for ScrapeConfig discovery. - If nil, only check own namespace. + description: Namespaces to match for ScrapeConfig discovery. An empty + label selector matches all namespaces. A null label selector matches + the current current namespace only. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -4859,15 +4919,16 @@ spec: x-kubernetes-map-type: atomic scrapeConfigSelector: description: "*Experimental* ScrapeConfigs to be selected for target - discovery. \n If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`, - `spec.probeSelector` and `spec.scrapeConfigSelector` are null, the - Prometheus configuration is unmanaged. The Prometheus operator will - ensure that the Prometheus configuration's Secret exists, but it - is the responsibility of the user to provide the raw gzipped Prometheus - configuration under the `prometheus.yaml.gz` key. This behavior - is deprecated and will be removed in the next major version of the - custom resource definition. It is recommended to use `spec.additionalScrapeConfigs` - instead." + discovery. An empty label selector matches all objects. A null label + selector matches no objects. \n If `spec.serviceMonitorSelector`, + `spec.podMonitorSelector`, `spec.probeSelector` and `spec.scrapeConfigSelector` + are null, the Prometheus configuration is unmanaged. The Prometheus + operator will ensure that the Prometheus configuration's Secret + exists, but it is the responsibility of the user to provide the + raw gzipped Prometheus configuration under the `prometheus.yaml.gz` + key. This behavior is *deprecated* and will be removed in the next + major version of the custom resource definition. It is recommended + to use `spec.additionalScrapeConfigs` instead." properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -4913,12 +4974,12 @@ spec: x-kubernetes-map-type: atomic scrapeInterval: default: 30s - description: 'Interval between consecutive scrapes. Default: `30s`' + description: "Interval between consecutive scrapes. \n Default: \"30s\"" 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: Number of seconds to wait for target to respond before - erroring. + description: 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 secrets: @@ -5104,8 +5165,9 @@ spec: to use to run the Prometheus Pods. type: string serviceMonitorNamespaceSelector: - description: Namespace's labels to match for ServiceMonitor discovery. - If nil, only check own namespace. + description: Namespaces to match for ServicedMonitors discovery. An + empty label selector matches all namespaces. A null label selector + matches the current namespace only. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -5151,14 +5213,15 @@ spec: x-kubernetes-map-type: atomic serviceMonitorSelector: description: "ServiceMonitors to be selected for target discovery. - \n If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`, + An empty label selector matches all objects. A null label selector + matches no objects. \n If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`, `spec.probeSelector` and `spec.scrapeConfigSelector` are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration's Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the `prometheus.yaml.gz` key. This behavior - is deprecated and will be removed in the next major version of the - custom resource definition. It is recommended to use `spec.additionalScrapeConfigs` + is *deprecated* and will be removed in the next major version of + the custom resource definition. It is recommended to use `spec.additionalScrapeConfigs` instead." properties: matchExpressions: @@ -5204,28 +5267,29 @@ spec: type: object x-kubernetes-map-type: atomic shards: - description: 'EXPERIMENTAL: Number of shards to distribute targets - onto. Number of replicas multiplied by shards is the total number - of Pods created. Note that scaling down shards will not reshard + description: "EXPERIMENTAL: Number of shards to distribute targets + onto. `spec.replicas` multiplied by `spec.shards` is the total number + of Pods created. \n Note that scaling down shards will not reshard data onto remaining instances, it must be manually moved. Increasing shards will not reshard data either but it will continue to be available - from the same instances. To query globally use Thanos sidecar and - Thanos querier or remote write data to a central location. Sharding - is done on the content of the `__address__` target meta-label.' + from the same instances. To query globally, use Thanos sidecar and + Thanos querier or remote write data to a central location. \n Sharding + is performed on the content of the `__address__` target meta-label + for PodMonitors and ServiceMonitors and `__param_target__` for Probes. + \n Default: 1" format: int32 type: integer storage: - description: Storage spec to specify how storage shall be used. + description: Storage defines the storage used by Prometheus. properties: disableMountSubPath: - description: 'Deprecated: subPath usage will be disabled by default - in a future release, this option will become unnecessary. DisableMountSubPath - allows to remove any subPath usage in volume mounts.' + description: '*Deprecated: subPath usage will be removed in a + future release.*' type: boolean emptyDir: description: 'EmptyDirVolumeSource to be used by the StatefulSet. - If specified, used in place of any volumeClaimTemplate. More - info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir' + If specified, it takes precedence over `ephemeral` and `volumeClaimTemplate`. + More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir' properties: medium: description: 'medium represents what type of storage medium @@ -5249,8 +5313,8 @@ spec: type: object ephemeral: description: 'EphemeralVolumeSource to be used by the StatefulSet. - This is a beta field in k8s 1.21, for lower versions, starting - with k8s 1.19, it requires enabling the GenericEphemeralVolume + This is a beta field in k8s 1.21 and GA in 1.15. For lower versions, + starting with k8s 1.19, it requires enabling the GenericEphemeralVolume feature gate. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes' properties: volumeClaimTemplate: @@ -5510,10 +5574,10 @@ spec: type: object type: object volumeClaimTemplate: - description: A PVC spec to be used by the StatefulSet. The easiest - way to use a volume that cannot be automatically provisioned - (for whatever reason) is to use a label selector alongside manually - created PersistentVolumes. + description: Defines the PVC spec to be used by the Prometheus + StatefulSets. The easiest way to use a volume that cannot be + automatically provisioned is to use a label selector alongside + manually created PersistentVolumes. properties: apiVersion: description: 'APIVersion defines the versioned schema of this @@ -5558,8 +5622,8 @@ spec: type: string type: object spec: - description: 'Spec defines the desired characteristics of - a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + description: 'Defines the desired characteristics of a volume + requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' properties: accessModes: description: 'accessModes contains the desired access @@ -5772,8 +5836,7 @@ spec: type: string type: object status: - description: 'Status represents the current information/status - of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + description: '*Deprecated: this field is never set.*' properties: accessModes: description: 'accessModes contains the actual access modes @@ -5866,7 +5929,7 @@ spec: type: object type: object tolerations: - description: If specified, the pod's tolerations. + description: Defines the Pods' tolerations if specified. items: description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching @@ -5906,7 +5969,7 @@ spec: type: object type: array topologySpreadConstraints: - description: If specified, the pod's topology spread constraints. + description: Defines the pod's topology spread constraints if specified. items: description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. @@ -6077,14 +6140,197 @@ spec: - whenUnsatisfiable type: object type: array + tracingConfig: + description: 'EXPERIMENTAL: TracingConfig configures tracing in Prometheus. + This is an experimental feature, it may change in any upcoming release + in a breaking way.' + properties: + clientType: + description: Client used to export the traces. Supported values + are `http` or `grpc`. + enum: + - http + - grpc + type: string + compression: + description: Compression key for supported compression types. + The only supported value is `gzip`. + enum: + - gzip + type: string + endpoint: + description: Endpoint to send the traces to. Should be provided + in format :. + minLength: 1 + type: string + headers: + additionalProperties: + type: string + description: Key-value pairs to be used as headers associated + with gRPC or HTTP requests. + type: object + insecure: + description: If disabled, the client will use a secure connection. + type: boolean + samplingFraction: + anyOf: + - type: integer + - type: string + description: Sets the probability a given trace will be sampled. + Must be a float from 0 through 1. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + timeout: + description: Maximum time the exporter will wait for each batch + export. + 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 + tlsConfig: + description: TLS Config to use when sending traces. + 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 + caFile: + description: Path to the CA cert in the Prometheus container + to use for the targets. + type: string + 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 + certFile: + description: Path to the client cert file in the Prometheus + container for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keyFile: + description: Path to the client key file in the Prometheus + container for the targets. + type: string + 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 + required: + - endpoint + type: object version: - description: Version of Prometheus to be deployed. + description: "Version of Prometheus being deployed. The operator uses + this information to generate the Prometheus StatefulSet + configuration + files. \n If not specified, the operator assumes the latest upstream + version of Prometheus available at the time when the version of + the operator was released." type: string volumeMounts: - description: VolumeMounts allows configuration of additional VolumeMounts - on the output StatefulSet definition. VolumeMounts specified will - be appended to other VolumeMounts in the prometheus container, that - are generated as a result of StorageSpec objects. + description: "VolumeMounts allows the configuration of additional + VolumeMounts. \n VolumeMounts will be appended to other VolumeMounts + in the 'prometheus' container, that are generated as a result of + StorageSpec objects." items: description: VolumeMount describes a mounting of a Volume within a container. @@ -6123,9 +6369,10 @@ spec: type: object type: array volumes: - description: Volumes allows configuration of additional volumes on - the output StatefulSet definition. Volumes specified will be appended - to other volumes that are generated as a result of StorageSpec objects. + description: Volumes allows the configuration of additional volumes + on the output StatefulSet definition. Volumes specified will be + appended to other volumes that are generated as a result of StorageSpec + objects. items: description: Volume represents a named volume in a pod that may be accessed by any container in the pod. @@ -7684,11 +7931,12 @@ spec: type: object type: array walCompression: - description: Enable compression of the write-ahead log using Snappy. - This flag is only available in versions of Prometheus >= 2.11.0. + description: "Configures compression of the write-ahead log (WAL) + using Snappy. \n WAL compression is enabled by default for Prometheus + >= 2.20.0 \n Requires Prometheus v2.11.0 and above." type: boolean web: - description: Defines the web command line flags when starting Prometheus. + description: Defines the configuration of the Prometheus web server. properties: httpConfig: description: Defines HTTP parameters for web server. @@ -7745,7 +7993,7 @@ spec: minimum: 0 type: integer pageTitle: - description: The prometheus web page title + description: The prometheus web page title. type: string tlsConfig: description: Defines the TLS parameters for HTTPS. diff --git a/charts/operators/prometheus-operator/templates/crds/crd-prometheuses.yaml b/charts/operators/prometheus-operator/templates/crds/crd-prometheuses.yaml index 69b66a34fde..ff0b026d071 100644 --- a/charts/operators/prometheus-operator/templates/crds/crd-prometheuses.yaml +++ b/charts/operators/prometheus-operator/templates/crds/crd-prometheuses.yaml @@ -1,4 +1,4 @@ -# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.2/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml +# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -72,17 +72,16 @@ spec: cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' properties: additionalAlertManagerConfigs: - description: 'AdditionalAlertManagerConfigs allows specifying a key - of a Secret containing additional Prometheus AlertManager configurations. - AlertManager configurations specified are appended to the configurations - generated by the Prometheus Operator. Job configurations specified - must have the form as specified in the official Prometheus documentation: - https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alertmanager_config. - As AlertManager configs are appended, the user is responsible to - make sure it is valid. Note that using this feature may expose the - possibility to break upgrades of Prometheus. It is advised to review - Prometheus release notes to ensure that no incompatible AlertManager - configs are going to break Prometheus after the upgrade.' + description: "AdditionalAlertManagerConfigs specifies a key of a Secret + containing additional Prometheus Alertmanager configurations. The + Alertmanager configurations are appended to the configuration generated + by the Prometheus Operator. They must be formatted according to + the official Prometheus documentation: \n https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alertmanager_config + \n The user is responsible for making sure that the configurations + are valid \n Note that using this feature may expose the possibility + to break upgrades of Prometheus. It is advised to review Prometheus + release notes to ensure that no incompatible AlertManager configs + are going to break Prometheus after the upgrade." properties: key: description: The key of the secret to select from. Must be a @@ -100,17 +99,16 @@ spec: type: object x-kubernetes-map-type: atomic additionalAlertRelabelConfigs: - description: 'AdditionalAlertRelabelConfigs allows specifying a key - of a Secret containing additional Prometheus alert relabel configurations. - Alert relabel configurations specified are appended to the configurations - generated by the Prometheus Operator. Alert relabel configurations - specified must have the form as specified in the official Prometheus - documentation: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs. - As alert relabel configs are appended, the user is responsible to - make sure it is valid. Note that using this feature may expose the - possibility to break upgrades of Prometheus. It is advised to review - Prometheus release notes to ensure that no incompatible alert relabel - configs are going to break Prometheus after the upgrade.' + description: "AdditionalAlertRelabelConfigs specifies a key of a Secret + containing additional Prometheus alert relabel configurations. The + alert relabel configurations are appended to the configuration generated + by the Prometheus Operator. They must be formatted according to + the official Prometheus documentation: \n https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs + \n The user is responsible for making sure that the configurations + are valid \n Note that using this feature may expose the possibility + to break upgrades of Prometheus. It is advised to review Prometheus + release notes to ensure that no incompatible alert relabel configs + are going to break Prometheus after the upgrade." properties: key: description: The key of the secret to select from. Must be a @@ -128,15 +126,15 @@ spec: type: object x-kubernetes-map-type: atomic additionalArgs: - description: AdditionalArgs allows setting additional arguments for - the Prometheus container. It is intended for e.g. activating hidden - flags which are not supported by the dedicated configuration options - yet. The arguments are passed as-is to the Prometheus container + description: "AdditionalArgs allows setting additional arguments for + the 'prometheus' container. \n It is intended for e.g. activating + hidden flags which are not supported by the dedicated configuration + options yet. The arguments are passed as-is to the Prometheus container which may cause issues if they are invalid or not supported by the - given Prometheus version. In case of an argument conflict (e.g. + given Prometheus version. \n In case of an argument conflict (e.g. an argument which is already set by the operator itself) or when - providing an invalid argument the reconciliation will fail and an - error will be logged. + providing an invalid argument, the reconciliation will fail and + an error will be logged." items: description: Argument as part of the AdditionalArgs list. properties: @@ -181,7 +179,7 @@ spec: type: object x-kubernetes-map-type: atomic affinity: - description: If specified, the pod's scheduling constraints. + description: Defines the Pods' affinity scheduling rules if specified. properties: nodeAffinity: description: Describes node affinity scheduling rules for the @@ -1009,7 +1007,7 @@ spec: type: object type: object alerting: - description: Define details regarding alerting. + description: Defines the settings related to Alertmanager. properties: alertmanagers: description: AlertmanagerEndpoints Prometheus should fire alerts @@ -1280,15 +1278,16 @@ spec: - alertmanagers type: object allowOverlappingBlocks: - description: AllowOverlappingBlocks enables vertical compaction and - vertical query merge in Prometheus. This is still experimental in - Prometheus so it may change in any upcoming release. + description: "AllowOverlappingBlocks enables vertical compaction and + vertical query merge in Prometheus. \n *Deprecated: this flag has + no effect for Prometheus >= 2.39.0 where overlapping blocks are + enabled by default.*" type: boolean apiserverConfig: - description: APIServerConfig allows specifying a host and auth methods - to access apiserver. If left empty, Prometheus is assumed to run - inside of the cluster and will discover API servers automatically - and use the pod's CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/. + description: 'APIServerConfig allows specifying a host and auth methods + to access the Kuberntees API server. If null, Prometheus is assumed + to run inside of the cluster: it will discover the API servers automatically + and use the Pod''s CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/.' properties: authorization: description: Authorization section for accessing apiserver @@ -1512,16 +1511,20 @@ spec: - host type: object arbitraryFSAccessThroughSMs: - description: ArbitraryFSAccessThroughSMs configures whether configuration - based on a service monitor can access arbitrary files on the file - system of the Prometheus container e.g. bearer token files. + description: When true, ServiceMonitor, PodMonitor and Probe object + are forbidden to reference arbitrary files on the file system of + the 'prometheus' container. When a ServiceMonitor's endpoint specifies + a `bearerTokenFile` value (e.g. '/var/run/secrets/kubernetes.io/serviceaccount/token'), + a malicious target can get access to the Prometheus service account's + token in the Prometheus' scrape request. Setting `spec.arbitraryFSAccessThroughSM` + to 'true' would prevent the attack. Users should instead provide + the credentials using the `spec.bearerTokenSecret` field. properties: deny: type: boolean type: object baseImage: - description: 'Base image to use for a Prometheus deployment. Deprecated: - use ''image'' instead' + description: '*Deprecated: use ''spec.image'' instead.*' type: string configMaps: description: ConfigMaps is a list of ConfigMaps in the same namespace @@ -1534,16 +1537,16 @@ spec: type: string type: array containers: - description: 'Containers allows injecting additional containers or + description: "Containers allows injecting additional containers or modifying operator generated containers. This can be used to allow - adding an authentication proxy to a Prometheus pod or to change - the behavior of an operator generated container. Containers described - here modify an operator generated container if they share the same - name and modifications are done via a strategic merge patch. The - current container names are: `prometheus`, `config-reloader`, and - `thanos-sidecar`. Overriding containers is entirely outside the - scope of what the maintainers will support and by doing so, you - accept that this behaviour may break at any time without notice.' + adding an authentication proxy to the Pods or to change the behavior + of an operator generated container. Containers described here modify + an operator generated container if they share the same name and + modifications are done via a strategic merge patch. \n The names + of containers managed by the operator are: * `prometheus` * `config-reloader` + * `thanos-sidecar` \n Overriding containers is entirely outside + the scope of what the maintainers will support and by doing so, + you accept that this behaviour may break at any time without notice." items: description: A single application container that you want to run within a pod. @@ -1794,7 +1797,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -1890,7 +1895,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -2001,7 +2008,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -2201,7 +2210,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -2601,7 +2612,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -2802,105 +2815,109 @@ spec: type: object type: array disableCompaction: - description: Disable prometheus compaction. + description: When true, the Prometheus compaction is disabled. type: boolean enableAdminAPI: - description: 'Enable access to prometheus web admin API. Defaults - to the value of `false`. WARNING: Enabling the admin APIs enables - mutating endpoints, to delete data, shutdown Prometheus, and more. - Enabling this should be done with care and the user is advised to - add additional authentication authorization via a proxy to ensure - only clients authorized to perform these actions can do so. For - more information see https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis' + description: "Enables access to the Prometheus web admin API. \n WARNING: + Enabling the admin APIs enables mutating endpoints, to delete data, + shutdown Prometheus, and more. Enabling this should be done with + care and the user is advised to add additional authentication authorization + via a proxy to ensure only clients authorized to perform these actions + can do so. \n For more information: https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis" type: boolean enableFeatures: - description: Enable access to Prometheus disabled features. By default, - no features are enabled. Enabling disabled features is entirely - outside the scope of what the maintainers will support and by doing - so, you accept that this behaviour may break at any time without - notice. For more information see https://prometheus.io/docs/prometheus/latest/disabled_features/ + description: "Enable access to Prometheus feature flags. By default, + no features are enabled. \n Enabling features which are disabled + by default is entirely outside the scope of what the maintainers + will support and by doing so, you accept that this behaviour may + break at any time without notice. \n For more information see https://prometheus.io/docs/prometheus/latest/feature_flags/" items: type: string type: array enableRemoteWriteReceiver: - description: 'Enable Prometheus to be used as a receiver for the Prometheus - remote write protocol. Defaults to the value of `false`. WARNING: - This is not considered an efficient way of ingesting samples. Use - it with caution for specific low-volume use cases. It is not suitable - for replacing the ingestion via scraping and turning Prometheus - into a push-based metrics collection system. For more information - see https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver - Only valid in Prometheus versions 2.33.0 and newer.' + description: "Enable Prometheus to be used as a receiver for the Prometheus + remote write protocol. \n WARNING: This is not considered an efficient + way of ingesting samples. Use it with caution for specific low-volume + use cases. It is not suitable for replacing the ingestion via scraping + and turning Prometheus into a push-based metrics collection system. + For more information see https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver + \n It requires Prometheus >= v2.33.0." type: boolean enforcedBodySizeLimit: - description: 'EnforcedBodySizeLimit defines the maximum size of uncompressed - response body that will be accepted by Prometheus. Targets responding - with a body larger than this many bytes will cause the scrape to - fail. Example: 100MB. If defined, the limit will apply to all service/pod - monitors and probes. This is an experimental feature, this behaviour - could change or be removed in the future. Only valid in Prometheus - versions 2.28.0 and newer.' + description: "When defined, enforcedBodySizeLimit specifies a global + limit on the size of uncompressed response body that will be accepted + by Prometheus. Targets responding with a body larger than this many + bytes will cause the scrape to fail. \n It requires Prometheus >= + v2.28.0." pattern: (^0|([0-9]*[.])?[0-9]+((K|M|G|T|E|P)i?)?B)$ type: string enforcedLabelLimit: - description: Per-scrape limit on number of labels that will be accepted - for a sample. If more than this number of labels are present post - metric-relabeling, the entire scrape will be treated as failed. - 0 means no limit. Only valid in Prometheus versions 2.27.0 and newer. + description: "When defined, enforcedLabelLimit specifies a global + limit on the number of labels per sample. The value overrides any + `spec.labelLimit` set by ServiceMonitor, PodMonitor, Probe objects + unless `spec.labelLimit` is greater than zero and less than `spec.enforcedLabelLimit`. + \n It requires Prometheus >= v2.27.0." format: int64 type: integer enforcedLabelNameLengthLimit: - description: Per-scrape limit on length of labels name that will be - accepted for a sample. If a label name is longer than this number - post metric-relabeling, the entire scrape will be treated as failed. - 0 means no limit. Only valid in Prometheus versions 2.27.0 and newer. + description: "When defined, enforcedLabelNameLengthLimit specifies + a global limit on the length of labels name per sample. The value + overrides any `spec.labelNameLengthLimit` set by ServiceMonitor, + PodMonitor, Probe objects unless `spec.labelNameLengthLimit` is + greater than zero and less than `spec.enforcedLabelNameLengthLimit`. + \n It requires Prometheus >= v2.27.0." format: int64 type: integer enforcedLabelValueLengthLimit: - description: Per-scrape limit on length of labels value that will - be accepted for a sample. If a label value is longer than this number - post metric-relabeling, the entire scrape will be treated as failed. - 0 means no limit. Only valid in Prometheus versions 2.27.0 and newer. + description: "When not null, enforcedLabelValueLengthLimit defines + a global limit on the length of labels value per sample. The value + overrides any `spec.labelValueLengthLimit` set by ServiceMonitor, + PodMonitor, Probe objects unless `spec.labelValueLengthLimit` is + greater than zero and less than `spec.enforcedLabelValueLengthLimit`. + \n It requires Prometheus >= v2.27.0." format: int64 type: integer enforcedNamespaceLabel: - description: "EnforcedNamespaceLabel If set, a label will be added - to \n 1. all user-metrics (created by `ServiceMonitor`, `PodMonitor` - and `Probe` objects) and 2. in all `PrometheusRule` objects (except - the ones excluded in `prometheusRulesExcludedFromEnforce`) to * - alerting & recording rules and * the metrics used in their expressions - (`expr`). \n Label name is this field's value. Label value is the - namespace of the created object (mentioned above)." + description: "When not empty, a label will be added to \n 1. All metrics + scraped from `ServiceMonitor`, `PodMonitor`, `Probe` and `ScrapeConfig` + objects. 2. All metrics generated from recording rules defined in + `PrometheusRule` objects. 3. All alerts generated from alerting + rules defined in `PrometheusRule` objects. 4. All vector selectors + of PromQL expressions defined in `PrometheusRule` objects. \n The + label will not added for objects referenced in `spec.excludedFromEnforcement`. + \n The label's name is this field's value. The label's value is + the namespace of the `ServiceMonitor`, `PodMonitor`, `Probe` or + `PrometheusRule` object." type: string enforcedSampleLimit: - description: EnforcedSampleLimit defines global limit on number of - scraped samples that will be accepted. This overrides any SampleLimit - set per ServiceMonitor or/and PodMonitor. It is meant to be used - by admins to enforce the SampleLimit to keep overall number of samples/series - under the desired limit. Note that if SampleLimit is lower that - value will be taken instead. + description: "When defined, enforcedSampleLimit specifies a global + limit on the number of scraped samples that will be accepted. This + overrides any `spec.sampleLimit` set by ServiceMonitor, PodMonitor, + Probe objects unless `spec.sampleLimit` is greater than zero and + less than than `spec.enforcedSampleLimit`. \n It is meant to be + used by admins to keep the overall number of samples/series under + a desired limit." format: int64 type: integer enforcedTargetLimit: - description: EnforcedTargetLimit defines a global limit on the number - of scraped targets. This overrides any TargetLimit set per ServiceMonitor - or/and PodMonitor. It is meant to be used by admins to enforce - the TargetLimit to keep the overall number of targets under the - desired limit. Note that if TargetLimit is lower, that value will - be taken instead, except if either value is zero, in which case - the non-zero value will be used. If both values are zero, no limit - is enforced. + description: "When defined, enforcedTargetLimit specifies a global + limit on the number of scraped targets. The value overrides any + `spec.targetLimit` set by ServiceMonitor, PodMonitor, Probe objects + unless `spec.targetLimit` is greater than zero and less than `spec.enforcedTargetLimit`. + \n It is meant to be used by admins to to keep the overall number + of targets under a desired limit." format: int64 type: integer evaluationInterval: default: 30s - description: 'Interval between consecutive evaluations. Default: `30s`' + description: 'Interval between rule evaluations. Default: "30s"' 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 excludedFromEnforcement: - description: List of references to PodMonitor, ServiceMonitor, Probe + description: "List of references to PodMonitor, ServiceMonitor, Probe and PrometheusRule objects to be excluded from enforcing a namespace - label of origin. Applies only if enforcedNamespaceLabel set to true. + label of origin. \n It is only applicable if `spec.enforcedNamespaceLabel` + set to true." items: description: ObjectReference references a PodMonitor, ServiceMonitor, Probe or PrometheusRule object. @@ -2914,7 +2931,7 @@ spec: type: string name: description: Name of the referent. When not set, all resources - are matched. + in the namespace are matched. type: string namespace: description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' @@ -2935,7 +2952,8 @@ spec: type: array exemplars: description: Exemplars related settings that are runtime reloadable. - It requires to enable the exemplar storage feature to be effective. + It requires to enable the `exemplar-storage` feature flag to be + effective. properties: maxSize: description: Maximum number of exemplars stored in memory for @@ -2949,14 +2967,17 @@ spec: type: string description: The labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager). + Labels defined by `spec.replicaExternalLabelName` and `spec.prometheusExternalLabelName` + take precedence over this list. type: object externalUrl: - description: The external URL the Prometheus instances will be available - under. This is necessary to generate correct URLs. This is necessary - if Prometheus is not served from root of a DNS name. + description: The external URL under which the Prometheus service is + externally available. This is necessary to generate correct URLs + (for instance if Prometheus is accessible behind an Ingress resource). type: string hostAliases: - description: Pods' hostAliases configuration + description: Optional list of hosts and IPs that will be injected + into the Pod's hosts file if specified. items: description: HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file. @@ -2978,22 +2999,26 @@ spec: - ip x-kubernetes-list-type: map hostNetwork: - description: Use the host's network namespace if true. Make sure to - understand the security implications if you want to enable it. When - hostNetwork is enabled, this will set dnsPolicy to ClusterFirstWithHostNet - automatically. + description: "Use the host's network namespace if true. \n Make sure + to understand the security implications if you want to enable it + (https://kubernetes.io/docs/concepts/configuration/overview/). \n + When hostNetwork is enabled, this will set the DNS policy to `ClusterFirstWithHostNet` + automatically." type: boolean ignoreNamespaceSelectors: - description: IgnoreNamespaceSelectors if set to true will ignore NamespaceSelector - settings from all PodMonitor, ServiceMonitor and Probe objects. - They will only discover endpoints within the namespace of the PodMonitor, - ServiceMonitor and Probe objects. Defaults to false. + description: When true, `spec.namespaceSelector` from all PodMonitor, + ServiceMonitor and Probe objects will be ignored. They will only + discover targets within the namespace of the PodMonitor, ServiceMonitor + and Probe objec. type: boolean image: - description: Image if specified has precedence over baseImage, tag - and sha combinations. Specifying the version is still necessary - to ensure the Prometheus Operator knows what version of Prometheus - is being configured. + description: "Container image name for Prometheus. If specified, it + takes precedence over the `spec.baseImage`, `spec.tag` and `spec.sha` + fields. \n Specifying `spec.version` is still necessary to ensure + the Prometheus Operator knows which version of Prometheus is being + configured. \n If neither `spec.image` nor `spec.baseImage` are + defined, the operator will use the latest upstream version of Prometheus + available at the time when the operator was released." type: string imagePullPolicy: description: Image pull policy for the 'prometheus', 'init-config-reloader' @@ -3006,9 +3031,8 @@ spec: - IfNotPresent type: string imagePullSecrets: - description: An optional list of references to secrets in the same - namespace to use for pulling prometheus and alertmanager images - from registries see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod + description: An optional list of references to Secrets in the same + namespace to use for pulling images from registries. See http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod items: description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. @@ -3021,17 +3045,18 @@ spec: x-kubernetes-map-type: atomic type: array initContainers: - description: 'InitContainers allows adding initContainers to the pod - definition. Those can be used to e.g. fetch secrets for injection + description: "InitContainers allows injecting initContainers to the + Pod definition. Those can be used to e.g. fetch secrets for injection into the Prometheus configuration from external sources. Any errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ InitContainers described here modify an operator generated init containers if they share the same name and modifications are done - via a strategic merge patch. The current init container name is: - `init-config-reloader`. Overriding init containers is entirely outside - the scope of what the maintainers will support and by doing so, - you accept that this behaviour may break at any time without notice.' + via a strategic merge patch. \n The names of init container name + managed by the operator are: * `init-config-reloader`. \n Overriding + init containers is entirely outside the scope of what the maintainers + will support and by doing so, you accept that this behaviour may + break at any time without notice." items: description: A single application container that you want to run within a pod. @@ -3282,7 +3307,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -3378,7 +3405,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -3489,7 +3518,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -3689,7 +3720,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -4089,7 +4122,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -4290,18 +4325,19 @@ spec: type: object type: array listenLocal: - description: ListenLocal makes the Prometheus server listen on loopback, - so that it does not bind against the Pod IP. + description: When true, the Prometheus server listens on the loopback + address instead of the Pod IP's address. type: boolean logFormat: - description: Log format for Prometheus to be configured with. + description: Log format for Log level for Prometheus and the config-reloader + sidecar. enum: - "" - logfmt - json type: string logLevel: - description: Log level for Prometheus to be configured with. + description: Log level for Prometheus and the config-reloader sidecar. enum: - "" - debug @@ -4310,18 +4346,18 @@ spec: - error type: string minReadySeconds: - description: Minimum number of seconds for which a newly created pod - should be ready without any of its container crashing for it to - be considered available. Defaults to 0 (pod will be considered available - as soon as it is ready) This is an alpha field from kubernetes 1.22 - until 1.24 which requires enabling the StatefulSetMinReadySeconds - feature gate. + description: "Minimum number of seconds for which a newly created + Pod should be ready without any of its container crashing for it + to be considered available. Defaults to 0 (pod will be considered + available as soon as it is ready) \n This is an alpha field from + kubernetes 1.22 until 1.24 which requires enabling the StatefulSetMinReadySeconds + feature gate." format: int32 type: integer nodeSelector: additionalProperties: type: string - description: Define which Nodes the Pods are scheduled on. + description: Defines on which Nodes the Pods are scheduled. type: object overrideHonorLabels: description: When true, Prometheus resolves label conflicts by renaming @@ -4339,8 +4375,8 @@ spec: for deletion will be performed on the underlying objects. type: boolean podMetadata: - description: PodMetadata configures Labels and Annotations which are - propagated to the prometheus pods. + description: PodMetadata configures labels and annotations which are + propagated to the Prometheus pods. properties: annotations: additionalProperties: @@ -4367,8 +4403,9 @@ spec: type: string type: object podMonitorNamespaceSelector: - description: Namespace's labels to match for PodMonitor discovery. - If nil, only check own namespace. + description: Namespaces to match for PodMonitors discovery. An empty + label selector matches all namespaces. A null label selector matches + the current namespace only. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -4414,15 +4451,16 @@ spec: x-kubernetes-map-type: atomic podMonitorSelector: description: "*Experimental* PodMonitors to be selected for target - discovery. \n If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`, - `spec.probeSelector` and `spec.scrapeConfigSelector` are null, the - Prometheus configuration is unmanaged. The Prometheus operator will - ensure that the Prometheus configuration's Secret exists, but it - is the responsibility of the user to provide the raw gzipped Prometheus - configuration under the `prometheus.yaml.gz` key. This behavior - is deprecated and will be removed in the next major version of the - custom resource definition. It is recommended to use `spec.additionalScrapeConfigs` - instead." + discovery. An empty label selector matches all objects. A null label + selector matches no objects. \n If `spec.serviceMonitorSelector`, + `spec.podMonitorSelector`, `spec.probeSelector` and `spec.scrapeConfigSelector` + are null, the Prometheus configuration is unmanaged. The Prometheus + operator will ensure that the Prometheus configuration's Secret + exists, but it is the responsibility of the user to provide the + raw gzipped Prometheus configuration under the `prometheus.yaml.gz` + key. This behavior is *deprecated* and will be removed in the next + major version of the custom resource definition. It is recommended + to use `spec.additionalScrapeConfigs` instead." properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -4467,22 +4505,23 @@ spec: type: object x-kubernetes-map-type: atomic podTargetLabels: - description: PodTargetLabels are added to all Pod/ServiceMonitors' - podTargetLabels + description: PodTargetLabels are appended to the `spec.podTargetLabels` + field of all PodMonitor and ServiceMonitor objects. items: type: string type: array portName: default: web - description: Port name used for the pods and governing service. Defaults - to `web`. + description: 'Port name used for the pods and governing service. Default: + "web"' type: string priorityClassName: - description: Priority class assigned to the Pods + description: Priority class assigned to the Pods. type: string probeNamespaceSelector: - description: '*Experimental* Namespaces to be selected for Probe discovery. - If nil, only check own namespace.' + description: '*Experimental* Namespaces to match for Probe discovery. + An empty label selector matches all namespaces. A null label selector + matches the current namespace only.' properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -4528,14 +4567,15 @@ spec: x-kubernetes-map-type: atomic probeSelector: description: "*Experimental* Probes to be selected for target discovery. - \n If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`, + An empty label selector matches all objects. A null label selector + matches no objects. \n If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`, `spec.probeSelector` and `spec.scrapeConfigSelector` are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration's Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the `prometheus.yaml.gz` key. This behavior - is deprecated and will be removed in the next major version of the - custom resource definition. It is recommended to use `spec.additionalScrapeConfigs` + is *deprecated* and will be removed in the next major version of + the custom resource definition. It is recommended to use `spec.additionalScrapeConfigs` instead." properties: matchExpressions: @@ -4581,26 +4621,26 @@ spec: type: object x-kubernetes-map-type: atomic prometheusExternalLabelName: - description: Name of Prometheus external label used to denote Prometheus - instance name. Defaults to the value of `prometheus`. External label - will _not_ be added when value is set to empty string (`""`). + description: "Name of Prometheus external label used to denote the + Prometheus instance name. The external label will _not_ be added + when the field is set to the empty string (`\"\"`). \n Default: + \"prometheus\"" type: string prometheusRulesExcludedFromEnforce: - description: 'PrometheusRulesExcludedFromEnforce - list of prometheus - rules to be excluded from enforcing of adding namespace labels. - Works only if enforcedNamespaceLabel set to true. Make sure both - ruleNamespace and ruleName are set for each pair. Deprecated: use - excludedFromEnforcement instead.' + description: 'Defines the list of PrometheusRule objects to which + the namespace label enforcement doesn''t apply. This is only relevant + when `spec.enforcedNamespaceLabel` is set to true. *Deprecated: + use `spec.excludedFromEnforcement` instead.*' items: description: PrometheusRuleExcludeConfig enables users to configure excluded PrometheusRule names and their namespaces to be ignored while enforcing namespace label for alerts and metrics. properties: ruleName: - description: RuleNamespace - name of excluded rule + description: Name of the excluded PrometheusRule object. type: string ruleNamespace: - description: RuleNamespace - namespace of excluded rule + description: Namespace of the excluded PrometheusRule object. type: string required: - ruleName @@ -4608,8 +4648,8 @@ spec: type: object type: array query: - description: QuerySpec defines the query command line flags when starting - Prometheus. + description: QuerySpec defines the configuration of the Promethus + query service. properties: lookbackDelta: description: The delta difference allowed for retrieving metrics @@ -4633,26 +4673,26 @@ spec: type: string type: object queryLogFile: - description: QueryLogFile specifies the file to which PromQL queries - are logged. If the filename has an empty path, e.g. 'query.log', - prometheus-operator will mount the file into an emptyDir volume - at `/var/log/prometheus`. If a full path is provided, e.g. /var/log/prometheus/query.log, + description: "queryLogFile specifies where the file to which PromQL + queries are logged. \n If the filename has an empty path, e.g. 'query.log', + The Prometheus Pods will mount the file into an emptyDir volume + at `/var/log/prometheus`. If a full path is provided, e.g. '/var/log/prometheus/query.log', you must mount a volume in the specified directory and it must be writable. This is because the prometheus container runs with a read-only root filesystem for security reasons. Alternatively, the location - can be set to a stdout location such as `/dev/stdout` to log query - information to the default Prometheus log stream. This is only available - in versions of Prometheus >= 2.16.0. For more details, see the Prometheus - docs (https://prometheus.io/docs/guides/query-log/) + can be set to a standard I/O stream, e.g. `/dev/stdout`, to log + query information to the default Prometheus log stream." type: string remoteRead: - description: remoteRead is the list of remote read configurations. + description: Defines the list of remote read configurations. items: description: RemoteReadSpec defines the configuration for Prometheus to read back samples from a remote endpoint. properties: authorization: - description: Authorization section for remote read + description: "Authorization section for the URL. \n It requires + Prometheus >= v2.26.0. \n Cannot be set at the same time as + `basicAuth`, or `oauth2`." properties: credentials: description: The secret's key that contains the credentials @@ -4684,7 +4724,8 @@ spec: type: string type: object basicAuth: - description: BasicAuth for the URL. + description: "BasicAuth configuration for the URL. \n Cannot + be set at the same time as `authorization`, or `oauth2`." properties: password: description: The secret in the service monitor namespace @@ -4728,15 +4769,23 @@ spec: x-kubernetes-map-type: atomic type: object bearerToken: - description: Bearer token for remote read. + description: "*Warning: this field shouldn't used because the + token value appears in clear-text. Prefer using `authorization`.* + \n *Deprecated: this will be removed in a future release.*" type: string bearerTokenFile: - description: File to read bearer token for remote read. + description: "File from which to read bearer token for the URL. + \n *Deprecated: this will be removed in a future release. + Prefer using `authorization`.*" type: string filterExternalLabels: - description: Whether to use the external labels as selectors - for the remote read endpoint. Requires Prometheus v2.34.0 - and above. + description: "Whether to use the external labels as selectors + for the remote read endpoint. \n It requires Prometheus >= + v2.34.0." + type: boolean + followRedirects: + description: "Configure whether HTTP requests follow HTTP 3xx + redirects. \n It requires Prometheus >= v2.26.0." type: boolean headers: additionalProperties: @@ -4747,14 +4796,15 @@ spec: versions 2.26.0 and newer. type: object name: - description: The name of the remote read queue, it must be unique - if specified. The name is used in metrics and logging in order - to differentiate read configurations. Only valid in Prometheus - versions 2.15.0 and newer. + description: "The name of the remote read queue, it must be + unique if specified. The name is used in metrics and logging + in order to differentiate read configurations. \n It requires + Prometheus >= v2.15.0." type: string oauth2: - description: OAuth2 for the URL. Only valid in Prometheus versions - 2.27.0 and newer. + description: "OAuth2 configuration for the URL. \n It requires + Prometheus >= v2.27.0. \n Cannot be set at the same time as + `authorization`, or `basicAuth`." properties: clientId: description: The secret or configmap containing the OAuth2 @@ -4857,7 +4907,7 @@ spec: to be present in a selector to query the remote read endpoint. type: object tlsConfig: - description: TLS Config to use for remote read. + description: TLS Config to use for the URL. properties: ca: description: Certificate authority used when verifying server @@ -4995,13 +5045,15 @@ spec: type: object type: array remoteWrite: - description: remoteWrite is the list of remote write configurations. + description: Defines the list of remote write configurations. items: description: RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint. properties: authorization: - description: Authorization section for remote write + description: "Authorization section for the URL. \n It requires + Prometheus >= v2.26.0. \n Cannot be set at the same time as + `sigv4`, `basicAuth`, or `oauth2`." properties: credentials: description: The secret's key that contains the credentials @@ -5033,7 +5085,8 @@ spec: type: string type: object basicAuth: - description: BasicAuth for the URL. + description: "BasicAuth configuration for the URL. \n Cannot + be set at the same time as `sigv4`, `authorization`, or `oauth2`." properties: password: description: The secret in the service monitor namespace @@ -5077,18 +5130,22 @@ spec: x-kubernetes-map-type: atomic type: object bearerToken: - description: Bearer token for remote write. + description: "*Warning: this field shouldn't used because the + token value appears in clear-text. Prefer using `authorization`.* + \n *Deprecated: this will be removed in a future release.*" type: string bearerTokenFile: - description: File to read bearer token for remote write. + description: "File from which to read bearer token for the URL. + \n *Deprecated: this will be removed in a future release. + Prefer using `authorization`.*" type: string headers: additionalProperties: type: string - description: Custom HTTP headers to be sent along with each + description: "Custom HTTP headers to be sent along with each remote write request. Be aware that headers that are set by - Prometheus itself can't be overwritten. Only valid in Prometheus - versions 2.25.0 and newer. + Prometheus itself can't be overwritten. \n It requires Prometheus + >= v2.25.0." type: object metadataConfig: description: MetadataConfig configures the sending of series @@ -5105,14 +5162,15 @@ spec: type: string type: object name: - description: The name of the remote write queue, it must be + description: "The name of the remote write queue, it must be unique if specified. The name is used in metrics and logging - in order to differentiate queues. Only valid in Prometheus - versions 2.15.0 and newer. + in order to differentiate queues. \n It requires Prometheus + >= v2.15.0." type: string oauth2: - description: OAuth2 for the URL. Only valid in Prometheus versions - 2.27.0 and newer. + description: "OAuth2 configuration for the URL. \n It requires + Prometheus >= v2.27.0. \n Cannot be set at the same time as + `sigv4`, `authorization`, or `basicAuth`." properties: clientId: description: The secret or configmap containing the OAuth2 @@ -5246,18 +5304,25 @@ spec: 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 sendExemplars: - description: Enables sending of exemplars over remote write. + description: "Enables sending of exemplars over remote write. Note that exemplar-storage itself must be enabled using the - enableFeature option for exemplars to be scraped in the first - place. Only valid in Prometheus versions 2.27.0 and newer. + `spec.enableFeature` option for exemplars to be scraped in + the first place. \n It requires Prometheus >= v2.27.0." + type: boolean + sendNativeHistograms: + description: "Enables sending of native histograms, also known + as sparse histograms over remote write. \n It requires Prometheus + >= v2.40.0." type: boolean sigv4: - description: Sigv4 allows to configures AWS's Signature Verification - 4 + description: "Sigv4 allows to configures AWS's Signature Verification + 4 for the URL. \n It requires Prometheus >= v2.26.0. \n Cannot + be set at the same time as `authorization`, `basicAuth`, or + `oauth2`." properties: accessKey: - description: AccessKey is the AWS API key. If blank, the - environment variable `AWS_ACCESS_KEY_ID` is used. + description: AccessKey is the AWS API key. If not specified, + the environment variable `AWS_ACCESS_KEY_ID` is used. properties: key: description: The key of the secret to select from. Must @@ -5286,7 +5351,7 @@ spec: description: RoleArn is the named AWS profile used to authenticate. type: string secretKey: - description: SecretKey is the AWS API secret. If blank, + description: SecretKey is the AWS API secret. If not specified, the environment variable `AWS_SECRET_ACCESS_KEY` is used. properties: key: @@ -5307,7 +5372,7 @@ spec: x-kubernetes-map-type: atomic type: object tlsConfig: - description: TLS Config to use for remote write. + description: TLS Config to use for the URL. properties: ca: description: Certificate authority used when verifying server @@ -5519,18 +5584,19 @@ spec: type: object type: array replicaExternalLabelName: - description: Name of Prometheus external label used to denote replica - name. Defaults to the value of `prometheus_replica`. External label - will _not_ be added when value is set to empty string (`""`). + description: "Name of Prometheus external label used to denote the + replica name. The external label will _not_ be added when the field + is set to the empty string (`\"\"`). \n Default: \"prometheus_replica\"" type: string replicas: - description: Number of replicas of each shard to deploy for a Prometheus - deployment. Number of replicas multiplied by shards is the total - number of Pods created. + description: "Number of replicas of each shard to deploy for a Prometheus + deployment. `spec.replicas` multiplied by `spec.shards` is the total + number of Pods created. \n Default: 1" format: int32 type: integer resources: - description: Define resources requests and limits for single Pods. + description: Defines the resources requests and limits of the 'prometheus' + container. properties: claims: description: "Claims lists the names of resources, defined in @@ -5578,27 +5644,25 @@ spec: type: object type: object retention: - description: Time duration Prometheus shall retain data for. Default - is '24h' if retentionSize is not set, and must match the regular - expression `[0-9]+(ms|s|m|h|d|w|y)` (milliseconds seconds minutes - hours days weeks years). + description: "How long to retain the Prometheus data. \n Default: + \"24h\" if `spec.retention` and `spec.retentionSize` are empty." 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 retentionSize: - description: Maximum amount of disk space used by blocks. + description: Maximum number of bytes used by the Prometheus data. pattern: (^0|([0-9]*[.])?[0-9]+((K|M|G|T|E|P)i?)?B)$ type: string routePrefix: - description: The route prefix Prometheus registers HTTP handlers for. - This is useful, if using ExternalURL and a proxy is rewriting HTTP - routes of a request, and the actual ExternalURL is still true, but - the server serves requests under a different route prefix. For example - for use with `kubectl proxy`. + description: "The route prefix Prometheus registers HTTP handlers + for. \n This is useful when using `spec.externalURL`, and a proxy + is rewriting HTTP routes of a request, and the actual ExternalURL + is still true, but the server serves requests under a different + route prefix. For example for use with `kubectl proxy`." type: string ruleNamespaceSelector: - description: Namespaces to be selected for PrometheusRules discovery. - If unspecified, only the same namespace as the Prometheus object - is in is used. + description: Namespaces to match for PrometheusRule discovery. An + empty label selector matches all namespaces. A null label selector + matches the current namespace only. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -5643,12 +5707,9 @@ spec: type: object x-kubernetes-map-type: atomic ruleSelector: - description: A selector to select which PrometheusRules to mount for - loading alerting/recording rules from. Until (excluding) Prometheus - Operator v0.24.0 Prometheus Operator will migrate any legacy rule - ConfigMaps to PrometheusRule custom resources selected by RuleSelector. - Make sure it does not match any config maps that you do not want - to be migrated. + description: PrometheusRule objects to be selected for rule evaluation. + An empty label selector matches all objects. A null label selector + matches no objects. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -5693,7 +5754,7 @@ spec: type: object x-kubernetes-map-type: atomic rules: - description: /--rules.*/ command-line arguments. + description: Defines the configuration of the Prometheus rules' engine. properties: alert: description: /--rules.alert.*/ command-line arguments @@ -5714,8 +5775,9 @@ spec: type: object type: object scrapeConfigNamespaceSelector: - description: Namespace's labels to match for ScrapeConfig discovery. - If nil, only check own namespace. + description: Namespaces to match for ScrapeConfig discovery. An empty + label selector matches all namespaces. A null label selector matches + the current current namespace only. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -5761,15 +5823,16 @@ spec: x-kubernetes-map-type: atomic scrapeConfigSelector: description: "*Experimental* ScrapeConfigs to be selected for target - discovery. \n If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`, - `spec.probeSelector` and `spec.scrapeConfigSelector` are null, the - Prometheus configuration is unmanaged. The Prometheus operator will - ensure that the Prometheus configuration's Secret exists, but it - is the responsibility of the user to provide the raw gzipped Prometheus - configuration under the `prometheus.yaml.gz` key. This behavior - is deprecated and will be removed in the next major version of the - custom resource definition. It is recommended to use `spec.additionalScrapeConfigs` - instead." + discovery. An empty label selector matches all objects. A null label + selector matches no objects. \n If `spec.serviceMonitorSelector`, + `spec.podMonitorSelector`, `spec.probeSelector` and `spec.scrapeConfigSelector` + are null, the Prometheus configuration is unmanaged. The Prometheus + operator will ensure that the Prometheus configuration's Secret + exists, but it is the responsibility of the user to provide the + raw gzipped Prometheus configuration under the `prometheus.yaml.gz` + key. This behavior is *deprecated* and will be removed in the next + major version of the custom resource definition. It is recommended + to use `spec.additionalScrapeConfigs` instead." properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -5815,12 +5878,12 @@ spec: x-kubernetes-map-type: atomic scrapeInterval: default: 30s - description: 'Interval between consecutive scrapes. Default: `30s`' + description: "Interval between consecutive scrapes. \n Default: \"30s\"" 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: Number of seconds to wait for target to respond before - erroring. + description: 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 secrets: @@ -6006,8 +6069,9 @@ spec: to use to run the Prometheus Pods. type: string serviceMonitorNamespaceSelector: - description: Namespace's labels to match for ServiceMonitor discovery. - If nil, only check own namespace. + description: Namespaces to match for ServicedMonitors discovery. An + empty label selector matches all namespaces. A null label selector + matches the current namespace only. properties: matchExpressions: description: matchExpressions is a list of label selector requirements. @@ -6053,14 +6117,15 @@ spec: x-kubernetes-map-type: atomic serviceMonitorSelector: description: "ServiceMonitors to be selected for target discovery. - \n If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`, + An empty label selector matches all objects. A null label selector + matches no objects. \n If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`, `spec.probeSelector` and `spec.scrapeConfigSelector` are null, the Prometheus configuration is unmanaged. The Prometheus operator will ensure that the Prometheus configuration's Secret exists, but it is the responsibility of the user to provide the raw gzipped Prometheus configuration under the `prometheus.yaml.gz` key. This behavior - is deprecated and will be removed in the next major version of the - custom resource definition. It is recommended to use `spec.additionalScrapeConfigs` + is *deprecated* and will be removed in the next major version of + the custom resource definition. It is recommended to use `spec.additionalScrapeConfigs` instead." properties: matchExpressions: @@ -6106,35 +6171,33 @@ spec: type: object x-kubernetes-map-type: atomic sha: - description: 'SHA of Prometheus container image to be deployed. Defaults - to the value of `version`. Similar to a tag, but the SHA explicitly - deploys an immutable container image. Version and Tag are ignored - if SHA is set. Deprecated: use ''image'' instead. The image digest - can be specified as part of the image URL.' + description: '*Deprecated: use ''spec.image'' instead. The image''s + digest can be specified as part of the image name.*' type: string shards: - description: 'EXPERIMENTAL: Number of shards to distribute targets - onto. Number of replicas multiplied by shards is the total number - of Pods created. Note that scaling down shards will not reshard + description: "EXPERIMENTAL: Number of shards to distribute targets + onto. `spec.replicas` multiplied by `spec.shards` is the total number + of Pods created. \n Note that scaling down shards will not reshard data onto remaining instances, it must be manually moved. Increasing shards will not reshard data either but it will continue to be available - from the same instances. To query globally use Thanos sidecar and - Thanos querier or remote write data to a central location. Sharding - is done on the content of the `__address__` target meta-label.' + from the same instances. To query globally, use Thanos sidecar and + Thanos querier or remote write data to a central location. \n Sharding + is performed on the content of the `__address__` target meta-label + for PodMonitors and ServiceMonitors and `__param_target__` for Probes. + \n Default: 1" format: int32 type: integer storage: - description: Storage spec to specify how storage shall be used. + description: Storage defines the storage used by Prometheus. properties: disableMountSubPath: - description: 'Deprecated: subPath usage will be disabled by default - in a future release, this option will become unnecessary. DisableMountSubPath - allows to remove any subPath usage in volume mounts.' + description: '*Deprecated: subPath usage will be removed in a + future release.*' type: boolean emptyDir: description: 'EmptyDirVolumeSource to be used by the StatefulSet. - If specified, used in place of any volumeClaimTemplate. More - info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir' + If specified, it takes precedence over `ephemeral` and `volumeClaimTemplate`. + More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir' properties: medium: description: 'medium represents what type of storage medium @@ -6158,8 +6221,8 @@ spec: type: object ephemeral: description: 'EphemeralVolumeSource to be used by the StatefulSet. - This is a beta field in k8s 1.21, for lower versions, starting - with k8s 1.19, it requires enabling the GenericEphemeralVolume + This is a beta field in k8s 1.21 and GA in 1.15. For lower versions, + starting with k8s 1.19, it requires enabling the GenericEphemeralVolume feature gate. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes' properties: volumeClaimTemplate: @@ -6419,10 +6482,10 @@ spec: type: object type: object volumeClaimTemplate: - description: A PVC spec to be used by the StatefulSet. The easiest - way to use a volume that cannot be automatically provisioned - (for whatever reason) is to use a label selector alongside manually - created PersistentVolumes. + description: Defines the PVC spec to be used by the Prometheus + StatefulSets. The easiest way to use a volume that cannot be + automatically provisioned is to use a label selector alongside + manually created PersistentVolumes. properties: apiVersion: description: 'APIVersion defines the versioned schema of this @@ -6467,8 +6530,8 @@ spec: type: string type: object spec: - description: 'Spec defines the desired characteristics of - a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + description: 'Defines the desired characteristics of a volume + requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' properties: accessModes: description: 'accessModes contains the desired access @@ -6681,8 +6744,7 @@ spec: type: string type: object status: - description: 'Status represents the current information/status - of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + description: '*Deprecated: this field is never set.*' properties: accessModes: description: 'accessModes contains the actual access modes @@ -6775,16 +6837,13 @@ spec: type: object type: object tag: - description: 'Tag of Prometheus container image to be deployed. Defaults - to the value of `version`. Version is ignored if Tag is set. Deprecated: - use ''image'' instead. The image tag can be specified as part of - the image URL.' + description: '*Deprecated: use ''spec.image'' instead. The image''s + tag can be specified as part of the image name.*' type: string thanos: - description: "Thanos configuration allows configuring various aspects - of a Prometheus server in a Thanos environment. \n This section - is experimental, it may change significantly without deprecation - notice in any release." + description: "Defines the configuration of the optional Thanos sidecar. + \n This section is experimental, it may change significantly without + deprecation notice in any release." properties: additionalArgs: description: AdditionalArgs allows setting additional arguments @@ -6792,7 +6851,7 @@ spec: the Thanos container which may cause issues if they are invalid or not supported the given Thanos version. In case of an argument conflict (e.g. an argument which is already set by the operator - itself) or when providing an invalid argument the reconciliation + itself) or when providing an invalid argument, the reconciliation will fail and an error will be logged. items: description: Argument as part of the AdditionalArgs list. @@ -6810,19 +6869,18 @@ spec: type: object type: array baseImage: - description: 'Thanos base image if other than default. Deprecated: - use ''image'' instead' + description: '*Deprecated: use ''image'' instead.*' type: string blockSize: default: 2h - description: 'BlockDuration controls the size of TSDB blocks produced - by Prometheus. Default is 2h to match the upstream Prometheus - defaults. WARNING: Changing the block duration can impact the - performance and efficiency of the entire Prometheus/Thanos stack - due to how it interacts with memory and Thanos compactors. It - is recommended to keep this value set to a multiple of 120 times - your longest scrape or rule interval. For example, 30s * 120 - = 1h.' + description: "BlockDuration controls the size of TSDB blocks produced + by Prometheus. The default value is 2h to match the upstream + Prometheus defaults. \n WARNING: Changing the block duration + can impact the performance and efficiency of the entire Prometheus/Thanos + stack due to how it interacts with memory and Thanos compactors. + It is recommended to keep this value set to a multiple of 120 + times your longest scrape or rule interval. For example, 30s + * 120 = 1h." 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 getConfigInterval: @@ -6835,15 +6893,14 @@ spec: 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 grpcListenLocal: - description: If true, the Thanos sidecar listens on the loopback - interface for the gRPC endpoints. It has no effect if `listenLocal` - is true. + description: "When true, the Thanos sidecar listens on the loopback + interface instead of the Pod IP's address for the gRPC endpoints. + \n It has no effect if `listenLocal` is true." type: boolean grpcServerTlsConfig: - description: 'GRPCServerTLSConfig configures the TLS parameters - for the gRPC server providing the StoreAPI. Note: Currently - only the CAFile, CertFile, and KeyFile fields are supported. - Maps to the ''--grpc-server-tls-*'' CLI args.' + description: "Configures the TLS parameters for the gRPC server + providing the StoreAPI. \n Note: Currently only the `caFile`, + `certFile`, and `keyFile` fields are supported." properties: ca: description: Certificate authority used when verifying server @@ -6974,31 +7031,33 @@ spec: type: string type: object httpListenLocal: - description: If true, the Thanos sidecar listens on the loopback - interface for the HTTP endpoints. It has no effect if `listenLocal` - is true. + description: "When true, the Thanos sidecar listens on the loopback + interface instead of the Pod IP's address for the HTTP endpoints. + \n It has no effect if `listenLocal` is true." type: boolean image: - description: Image if specified has precedence over baseImage, - tag and sha combinations. Specifying the version is still necessary - to ensure the Prometheus Operator knows what version of Thanos - is being configured. + description: "Container image name for Thanos. If specified, it + takes precedence over the `spec.thanos.baseImage`, `spec.thanos.tag` + and `spec.thanos.sha` fields. \n Specifying `spec.thanos.version` + is still necessary to ensure the Prometheus Operator knows which + version of Thanos is being configured. \n If neither `spec.thanos.image` + nor `spec.thanos.baseImage` are defined, the operator will use + the latest upstream version of Thanos available at the time + when the operator was released." type: string listenLocal: - description: 'If true, the Thanos sidecar listens on the loopback - interface for the HTTP and gRPC endpoints. It takes precedence - over `grpcListenLocal` and `httpListenLocal`. Deprecated: use - `grpcListenLocal` and `httpListenLocal` instead.' + description: '*Deprecated: use `grpcListenLocal` and `httpListenLocal` + instead.*' type: boolean logFormat: - description: LogFormat for Thanos sidecar to be configured with. + description: Log format for the Thanos sidecar. enum: - "" - logfmt - json type: string logLevel: - description: LogLevel for Thanos sidecar to be configured with. + description: Log level for the Thanos sidecar. enum: - "" - debug @@ -7007,15 +7066,16 @@ spec: - error type: string minTime: - description: MinTime for Thanos sidecar to be configured with. - Option can be a constant time in RFC3339 format or time duration - relative to current time, such as -1d or 2h45m. Valid duration - units are ms, s, m, h, d, w, y. + description: Defines the start of time range limit served by the + Thanos sidecar's StoreAPI. The field's value should be a constant + time in RFC3339 format or a time duration relative to current + time, such as -1d or 2h45m. Valid duration units are ms, s, + m, h, d, w, y. type: string objectStorageConfig: - description: ObjectStorageConfig configures object storage in - Thanos. Alternative to ObjectStorageConfigFile, and lower order - priority. + description: "Defines the Thanos sidecar's configuration to upload + TSDB blocks to object storage. \n More info: https://thanos.io/tip/thanos/storage.md/ + \n objectStorageConfigFile takes precedence over this field." properties: key: description: The key of the secret to select from. Must be @@ -7034,19 +7094,18 @@ spec: type: object x-kubernetes-map-type: atomic objectStorageConfigFile: - description: ObjectStorageConfigFile specifies the path of the - object storage configuration file. When used alongside with - ObjectStorageConfig, ObjectStorageConfigFile takes precedence. + description: "Defines the Thanos sidecar's configuration file + to upload TSDB blocks to object storage. \n More info: https://thanos.io/tip/thanos/storage.md/ + \n This field takes precedence over objectStorageConfig." type: string readyTimeout: - description: ReadyTimeout is the maximum time Thanos sidecar will - wait for Prometheus to start. Eg 10m + description: ReadyTimeout is the maximum time that the Thanos + sidecar will wait for Prometheus to start. 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 resources: - description: Resources defines the resource requirements for the - Thanos sidecar. If not provided, no requests/limits will be - set + description: Defines the resources requests and limits of the + Thanos sidecar. properties: claims: description: "Claims lists the names of resources, defined @@ -7095,22 +7154,19 @@ spec: type: object type: object sha: - description: 'SHA of Thanos container image to be deployed. Defaults - to the value of `version`. Similar to a tag, but the SHA explicitly - deploys an immutable container image. Version and Tag are ignored - if SHA is set. Deprecated: use ''image'' instead. The image - digest can be specified as part of the image URL.' + description: '*Deprecated: use ''image'' instead. The image digest + can be specified as part of the image name.*' type: string tag: - description: 'Tag of Thanos sidecar container image to be deployed. - Defaults to the value of `version`. Version is ignored if Tag - is set. Deprecated: use ''image'' instead. The image tag can - be specified as part of the image URL.' + description: '*Deprecated: use ''image'' instead. The image''s + tag can be specified as part of the image name.*' type: string tracingConfig: - description: TracingConfig configures tracing in Thanos. This - is an experimental feature, it may change in any upcoming release - in a breaking way. + description: "Defines the tracing configuration for the Thanos + sidecar. \n More info: https://thanos.io/tip/thanos/tracing.md/ + \n This is an experimental feature, it may change in any upcoming + release in a breaking way. \n tracingConfigFile takes precedence + over this field." properties: key: description: The key of the secret to select from. Must be @@ -7129,18 +7185,23 @@ spec: type: object x-kubernetes-map-type: atomic tracingConfigFile: - description: TracingConfig specifies the path of the tracing configuration - file. When used alongside with TracingConfig, TracingConfigFile - takes precedence. + description: "Defines the tracing configuration file for the Thanos + sidecar. \n More info: https://thanos.io/tip/thanos/tracing.md/ + \n This is an experimental feature, it may change in any upcoming + release in a breaking way. \n This field takes precedence over + tracingConfig." type: string version: - description: Version describes the version of Thanos to use. + description: "Version of Thanos being deployed. The operator uses + this information to generate the Prometheus StatefulSet + configuration + files. \n If not specified, the operator assumes the latest + upstream release of Thanos available at the time when the version + of the operator was released." type: string volumeMounts: description: VolumeMounts allows configuration of additional VolumeMounts - on the output StatefulSet definition. VolumeMounts specified - will be appended to other VolumeMounts in the thanos-sidecar - container. + for Thanos. VolumeMounts specified will be appended to other + VolumeMounts in the 'thanos-sidecar' container. items: description: VolumeMount describes a mounting of a Volume within a container. @@ -7181,7 +7242,7 @@ spec: type: array type: object tolerations: - description: If specified, the pod's tolerations. + description: Defines the Pods' tolerations if specified. items: description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching @@ -7221,7 +7282,7 @@ spec: type: object type: array topologySpreadConstraints: - description: If specified, the pod's topology spread constraints. + description: Defines the pod's topology spread constraints if specified. items: description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. @@ -7392,6 +7453,185 @@ spec: - whenUnsatisfiable type: object type: array + tracingConfig: + description: 'EXPERIMENTAL: TracingConfig configures tracing in Prometheus. + This is an experimental feature, it may change in any upcoming release + in a breaking way.' + properties: + clientType: + description: Client used to export the traces. Supported values + are `http` or `grpc`. + enum: + - http + - grpc + type: string + compression: + description: Compression key for supported compression types. + The only supported value is `gzip`. + enum: + - gzip + type: string + endpoint: + description: Endpoint to send the traces to. Should be provided + in format :. + minLength: 1 + type: string + headers: + additionalProperties: + type: string + description: Key-value pairs to be used as headers associated + with gRPC or HTTP requests. + type: object + insecure: + description: If disabled, the client will use a secure connection. + type: boolean + samplingFraction: + anyOf: + - type: integer + - type: string + description: Sets the probability a given trace will be sampled. + Must be a float from 0 through 1. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + timeout: + description: Maximum time the exporter will wait for each batch + export. + 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 + tlsConfig: + description: TLS Config to use when sending traces. + 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 + caFile: + description: Path to the CA cert in the Prometheus container + to use for the targets. + type: string + 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 + certFile: + description: Path to the client cert file in the Prometheus + container for the targets. + type: string + insecureSkipVerify: + description: Disable target certificate validation. + type: boolean + keyFile: + description: Path to the client key file in the Prometheus + container for the targets. + type: string + 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 + required: + - endpoint + type: object tsdb: description: Defines the runtime reloadable configuration of the timeseries database (TSDB). @@ -7407,13 +7647,17 @@ spec: type: string type: object version: - description: Version of Prometheus to be deployed. + description: "Version of Prometheus being deployed. The operator uses + this information to generate the Prometheus StatefulSet + configuration + files. \n If not specified, the operator assumes the latest upstream + version of Prometheus available at the time when the version of + the operator was released." type: string volumeMounts: - description: VolumeMounts allows configuration of additional VolumeMounts - on the output StatefulSet definition. VolumeMounts specified will - be appended to other VolumeMounts in the prometheus container, that - are generated as a result of StorageSpec objects. + description: "VolumeMounts allows the configuration of additional + VolumeMounts. \n VolumeMounts will be appended to other VolumeMounts + in the 'prometheus' container, that are generated as a result of + StorageSpec objects." items: description: VolumeMount describes a mounting of a Volume within a container. @@ -7452,9 +7696,10 @@ spec: type: object type: array volumes: - description: Volumes allows configuration of additional volumes on - the output StatefulSet definition. Volumes specified will be appended - to other volumes that are generated as a result of StorageSpec objects. + description: Volumes allows the configuration of additional volumes + on the output StatefulSet definition. Volumes specified will be + appended to other volumes that are generated as a result of StorageSpec + objects. items: description: Volume represents a named volume in a pod that may be accessed by any container in the pod. @@ -9013,11 +9258,12 @@ spec: type: object type: array walCompression: - description: Enable compression of the write-ahead log using Snappy. - This flag is only available in versions of Prometheus >= 2.11.0. + description: "Configures compression of the write-ahead log (WAL) + using Snappy. \n WAL compression is enabled by default for Prometheus + >= 2.20.0 \n Requires Prometheus v2.11.0 and above." type: boolean web: - description: Defines the web command line flags when starting Prometheus. + description: Defines the configuration of the Prometheus web server. properties: httpConfig: description: Defines HTTP parameters for web server. @@ -9074,7 +9320,7 @@ spec: minimum: 0 type: integer pageTitle: - description: The prometheus web page title + description: The prometheus web page title. type: string tlsConfig: description: Defines the TLS parameters for HTTPS. diff --git a/charts/operators/prometheus-operator/templates/crds/crd-prometheusrules.yaml b/charts/operators/prometheus-operator/templates/crds/crd-prometheusrules.yaml index e0dbbba29f3..553a9d2536c 100644 --- a/charts/operators/prometheus-operator/templates/crds/crd-prometheusrules.yaml +++ b/charts/operators/prometheus-operator/templates/crds/crd-prometheusrules.yaml @@ -1,4 +1,4 @@ -# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.2/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml +# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -98,6 +98,13 @@ spec: been returned for this long. 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 + keep_firing_for: + description: KeepFiringFor defines how long an alert will + continue firing after the condition that triggered it + has cleared. + minLength: 1 + 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 labels: additionalProperties: type: string diff --git a/charts/operators/prometheus-operator/templates/crds/crd-scrapeconfigs.yaml b/charts/operators/prometheus-operator/templates/crds/crd-scrapeconfigs.yaml index c10740c42ca..e9943721b6c 100644 --- a/charts/operators/prometheus-operator/templates/crds/crd-scrapeconfigs.yaml +++ b/charts/operators/prometheus-operator/templates/crds/crd-scrapeconfigs.yaml @@ -1,4 +1,4 @@ -# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.2/example/prometheus-operator-crd/monitoring.coreos.com_scrapeconfigs.yaml +# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_scrapeconfigs.yaml --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -45,6 +45,78 @@ spec: description: ScrapeConfigSpec is a specification of the desired configuration for a scrape configuration. properties: + authorization: + description: Authorization header to use on every scrape request. + properties: + credentials: + description: The secret's key that contains the credentials of + the request + 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: Set the authentication type. Defaults to Bearer, + Basic will cause an error + type: string + type: object + basicAuth: + description: BasicAuth information to use on every scrape request. + 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 fileSDConfigs: description: FileSDConfigs defines a list of file service discovery configurations. @@ -88,6 +160,80 @@ spec: description: HTTPSDConfig defines a prometheus HTTP service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#http_sd_config properties: + authorization: + description: Authorization header configuration to authenticate + against the target HTTP endpoint. + properties: + credentials: + description: The secret's key that contains the credentials + of the request + 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: Set the authentication type. Defaults to Bearer, + Basic will cause an error + type: string + type: object + basicAuth: + description: 'BasicAuth information to authenticate against + the target HTTP endpoint. 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 refreshInterval: description: RefreshInterval configures the refresh interval at which Prometheus will re-query the endpoint to update the diff --git a/charts/operators/prometheus-operator/templates/crds/crd-servicemonitors.yaml b/charts/operators/prometheus-operator/templates/crds/crd-servicemonitors.yaml index cb71396f850..34e6e8ce93b 100644 --- a/charts/operators/prometheus-operator/templates/crds/crd-servicemonitors.yaml +++ b/charts/operators/prometheus-operator/templates/crds/crd-servicemonitors.yaml @@ -1,4 +1,4 @@ -# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.2/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml +# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/charts/operators/prometheus-operator/templates/crds/crd-thanosrulers.yaml b/charts/operators/prometheus-operator/templates/crds/crd-thanosrulers.yaml index 64b8dc88814..4ee0cd02db4 100644 --- a/charts/operators/prometheus-operator/templates/crds/crd-thanosrulers.yaml +++ b/charts/operators/prometheus-operator/templates/crds/crd-thanosrulers.yaml @@ -1,4 +1,4 @@ -# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.65.2/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml +# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.66.0/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -1251,7 +1251,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -1347,7 +1349,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -1458,7 +1462,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -1658,7 +1664,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -2058,7 +2066,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -2285,7 +2295,7 @@ spec: type: string name: description: Name of the referent. When not set, all resources - are matched. + in the namespace are matched. type: string namespace: description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' @@ -2745,7 +2755,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -2841,7 +2853,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -2952,7 +2966,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -3152,7 +3168,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -3552,7 +3570,9 @@ spec: to be used in HTTP probes properties: name: - description: The header field name + description: The header field name. This will + be canonicalized upon output, so case-variant + names will be understood as the same header. type: string value: description: The header field value @@ -3870,10 +3890,10 @@ spec: while enforcing namespace label for alerts and metrics. properties: ruleName: - description: RuleNamespace - name of excluded rule + description: Name of the excluded PrometheusRule object. type: string ruleNamespace: - description: RuleNamespace - namespace of excluded rule + description: Namespace of the excluded PrometheusRule object. type: string required: - ruleName @@ -4240,14 +4260,13 @@ spec: description: Storage spec to specify how storage shall be used. properties: disableMountSubPath: - description: 'Deprecated: subPath usage will be disabled by default - in a future release, this option will become unnecessary. DisableMountSubPath - allows to remove any subPath usage in volume mounts.' + description: '*Deprecated: subPath usage will be removed in a + future release.*' type: boolean emptyDir: description: 'EmptyDirVolumeSource to be used by the StatefulSet. - If specified, used in place of any volumeClaimTemplate. More - info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir' + If specified, it takes precedence over `ephemeral` and `volumeClaimTemplate`. + More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir' properties: medium: description: 'medium represents what type of storage medium @@ -4271,8 +4290,8 @@ spec: type: object ephemeral: description: 'EphemeralVolumeSource to be used by the StatefulSet. - This is a beta field in k8s 1.21, for lower versions, starting - with k8s 1.19, it requires enabling the GenericEphemeralVolume + This is a beta field in k8s 1.21 and GA in 1.15. For lower versions, + starting with k8s 1.19, it requires enabling the GenericEphemeralVolume feature gate. More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes' properties: volumeClaimTemplate: @@ -4532,10 +4551,10 @@ spec: type: object type: object volumeClaimTemplate: - description: A PVC spec to be used by the StatefulSet. The easiest - way to use a volume that cannot be automatically provisioned - (for whatever reason) is to use a label selector alongside manually - created PersistentVolumes. + description: Defines the PVC spec to be used by the Prometheus + StatefulSets. The easiest way to use a volume that cannot be + automatically provisioned is to use a label selector alongside + manually created PersistentVolumes. properties: apiVersion: description: 'APIVersion defines the versioned schema of this @@ -4580,8 +4599,8 @@ spec: type: string type: object spec: - description: 'Spec defines the desired characteristics of - a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + description: 'Defines the desired characteristics of a volume + requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' properties: accessModes: description: 'accessModes contains the desired access @@ -4794,8 +4813,7 @@ spec: type: string type: object status: - description: 'Status represents the current information/status - of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' + description: '*Deprecated: this field is never set.*' properties: accessModes: description: 'accessModes contains the actual access modes @@ -5127,6 +5145,48 @@ spec: version: description: Version of Thanos to be deployed. type: string + volumeMounts: + description: VolumeMounts allows configuration of additional VolumeMounts + on the output StatefulSet definition. VolumeMounts specified will + be appended to other VolumeMounts in the ruler container, that are + generated as a result of StorageSpec objects. + items: + description: VolumeMount describes a mounting of a Volume within + a container. + properties: + mountPath: + description: Path within the container at which the volume should + be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are propagated + from the host to container and the other way around. When + not set, MountPropagationNone is used. This field is beta + in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise + (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's + volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which the + container's volume should be mounted. Behaves similarly to + SubPath but environment variable references $(VAR_NAME) are + expanded using the container's environment. Defaults to "" + (volume's root). SubPathExpr and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array volumes: description: Volumes allows configuration of additional volumes on the output StatefulSet definition. Volumes specified will be appended diff --git a/charts/operators/prometheus-operator/update-operator-crds.sh b/charts/operators/prometheus-operator/update-operator-crds.sh new file mode 100755 index 00000000000..855c4120cb5 --- /dev/null +++ b/charts/operators/prometheus-operator/update-operator-crds.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +# +# Description: Update CRDs from upstream. +# + +set -u -o pipefail + +if [[ $# -ne 1 ]] ; then + echo "usage $(basename "$0") " + exit 1 +fi +version="$1" + +annotation_sed='/^ annotations:$/a {{- with .Values.crds.annotations }}\n{{- toYaml . | nindent 4 }}\n{{- end }}' + +crds="alertmanagerconfigs alertmanagers podmonitors probes prometheusagents prometheuses prometheusrules scrapeconfigs servicemonitors thanosrulers" + +upstream="https://raw.githubusercontent.com/prometheus-operator/prometheus-operator" + +for crd in ${crds} ; do + echo "Updating ${crd}" + url="${upstream}/${version}/example/prometheus-operator-crd/monitoring.coreos.com_${crd}.yaml" + target="templates/crds/crd-${crd}.yaml" + + if [[ ! -f "${target}" ]] ; then + echo "CRD target (${target}) file missing, this script should be run from the base of the chart" + exit 1 + fi + + curl -sf "${url}" \ + | sed "1i # ${url}" \ + | sed "${annotation_sed}" \ + > "${target}" +done diff --git a/charts/operators/prometheus-operator/values.yaml b/charts/operators/prometheus-operator/values.yaml index dd91281bd20..e8ff1e894d1 100644 --- a/charts/operators/prometheus-operator/values.yaml +++ b/charts/operators/prometheus-operator/values.yaml @@ -1,11 +1,11 @@ image: repository: tccr.io/truecharts/prometheus-operator - tag: "v0.65.2@sha256:4907d522bd1ba4f28568a77affbb6df3f703a6fb35cc0188f0dc4c3b0be6c771" + tag: "v0.66.0@sha256:27718c8079802791e156d885ecd5ecf7efc1b15574bf130e248bbacc5e3ed883" pullPolicy: configReloaderImage: repository: tccr.io/truecharts/prometheus-config-reloader - tag: "v0.65.2@sha256:26d19ec2e1ec4dafaeaf10a37488bdaf30b0177966413f4c26a369f2def6defe" + tag: "v0.66.0@sha256:6e9e61d0d545fca106ef7f7438a488bae616f5c0b6fb0f7fc571b5f12af903ea" pullPolicy: thanosImage: