diff --git a/go.mod b/go.mod index d2b8853321..adc905e36e 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/openshift/api v0.0.0-20260727141720-967cc4c36c9b github.com/openshift/client-go v0.0.0-20260723174158-ae2315de9d73 github.com/operator-framework/api v0.46.0 - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.94.1 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.95.0 github.com/prometheus/client_golang v1.25.0 github.com/prometheus/client_model v0.6.3 github.com/regclient/regclient v0.11.5 @@ -27,12 +27,12 @@ require ( github.com/stretchr/testify v1.12.1 github.com/urfave/cli/v3 v3.13.0 go.uber.org/zap v1.28.0 - k8s.io/api v0.37.1 - k8s.io/apiextensions-apiserver v0.37.1 - k8s.io/apimachinery v0.37.1 - k8s.io/client-go v0.37.1 + k8s.io/api v0.37.2 + k8s.io/apiextensions-apiserver v0.37.2 + k8s.io/apimachinery v0.37.2 + k8s.io/client-go v0.37.2 k8s.io/klog/v2 v2.140.0 - k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3 + k8s.io/utils v0.0.0-20261023123148-ca04ba58ecab sigs.k8s.io/controller-runtime v0.25.2 sigs.k8s.io/yaml v1.6.0 ) @@ -123,10 +123,10 @@ require ( gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect k8s.io/cli-runtime v0.36.0 // indirect - k8s.io/component-base v0.37.1 // indirect + k8s.io/component-base v0.37.2 // indirect k8s.io/kube-openapi v0.0.0-20260821135717-be32def86098 // indirect k8s.io/kubectl v0.36.0 // indirect - k8s.io/streaming v0.37.1 // indirect + k8s.io/streaming v0.37.2 // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/kustomize/api v0.21.1 // indirect sigs.k8s.io/kustomize/kyaml v0.21.1 // indirect diff --git a/go.sum b/go.sum index 7cc01a9eb0..08da9e44a8 100644 --- a/go.sum +++ b/go.sum @@ -187,8 +187,8 @@ github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.94.1 h1:TWZqERWd1r20mHm6rCahhWuCaDq4PQFHgzQifOpFsc0= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.94.1/go.mod h1:n4uH73YCwqQomLLIKEthHFwh4F9PneNaP6eaIIscpVg= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.95.0 h1:B7gXaIs1I1t8gV2eaoJrIiG7VUzSFTWtRIpUMaMQzf4= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.95.0/go.mod h1:YugBhCP70UyV0rYTL5Rm56wjsMJFcyXzfMGRn3oFwA4= github.com/prometheus/client_golang v1.25.0 h1:cDtW1TcFsMi1RJc8khwCKB4VhzwV04aKqbYtNOXuiK0= github.com/prometheus/client_golang v1.25.0/go.mod h1:j2X/4/kaQHLPnmyEU8zjmkndo1T317VpCIQEml8LTKk= github.com/prometheus/client_model v0.6.3 h1:O0jaTVAYNxTHYInEPFJt5I3+sN8zqBtVMPTB1qyxiEo= @@ -286,28 +286,28 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.37.1 h1:l6N77U7tjwB5L056bgrBTJIEdevac/naBZ3iSvDNfpM= -k8s.io/api v0.37.1/go.mod h1:zSlbB1YpJ1YQlFVQy20UYll81UJSJJUMLhkhvg6Z78M= -k8s.io/apiextensions-apiserver v0.37.1 h1:7fIQG8eThDSTVYBWg/DOpI8v5wYfKCo0N8/TDMjj+zY= -k8s.io/apiextensions-apiserver v0.37.1/go.mod h1:1Q3ujWwHgnhBoGsdmGORflwK1sDFmuaqH1OsMDWk2Gs= -k8s.io/apimachinery v0.37.1 h1:hGCYyvKHCwtwMitj2vU4vYx0Z16N9GyZk9BBnz0wDAE= -k8s.io/apimachinery v0.37.1/go.mod h1:jF84AyUi/IRIXRot5f+lm6MpxoWI+F1XgjaMmwCdTFw= +k8s.io/api v0.37.2 h1:PnxqnUFy93jr2GcpWDkKOm8wfy25kT9wa572MuQS8oc= +k8s.io/api v0.37.2/go.mod h1:+NVRLft99kx+Jg9v34GmHw867Dapim89TSyCsn2hK+M= +k8s.io/apiextensions-apiserver v0.37.2 h1:myaUiAlm1NRLYdpAvWYTqdgeiCepFupJiRFVVueMUYw= +k8s.io/apiextensions-apiserver v0.37.2/go.mod h1:BFl1aPC89HsgFgYI+3xpFtckvkAeenDTZP84njA9yw4= +k8s.io/apimachinery v0.37.2 h1:G4t9RGoPDbQML38hz/kQQiltttgd3egg2ODCR8aIc2o= +k8s.io/apimachinery v0.37.2/go.mod h1:qaAvSNvgU2x07wRM95MSHSJTPQ/ob/LeNAGbeDgqQJg= k8s.io/cli-runtime v0.36.0 h1:HNxciQpQMMOKS0/GiUXcKDyA6J2FDILJj9NmP2BZrTg= k8s.io/cli-runtime v0.36.0/go.mod h1:KObkknK9Ro5LYX+1RdiKc7C8CvGg4aX+V/Zv+E8WPHA= -k8s.io/client-go v0.37.1 h1:QTv/5ha4jAHtW9qxxVBkQVFBRDb4jHfFopQqqMdc+wM= -k8s.io/client-go v0.37.1/go.mod h1:dnAPtTnCNY38Ho04D2KdY1F4IKausa9UbqaAZKl60SY= -k8s.io/component-base v0.37.1 h1:93DMmlENnK7gNLkL4pMqLO5M/HVf3p3sM4q/GasLveY= -k8s.io/component-base v0.37.1/go.mod h1:bBrdziT4dreQG5lzTaPVxBwsZe1oxphG+ZVdD56dQWQ= +k8s.io/client-go v0.37.2 h1:sgFtyRZukGkOrsu+QgS7LYnbFFJ5ut3MchdBNduD//E= +k8s.io/client-go v0.37.2/go.mod h1:bo3LFC8YbCtKFPX21Yj8puMsoJLAv/+SvuOODma0s54= +k8s.io/component-base v0.37.2 h1:Ia9IKTg1yWrUntJU5lVetapkC9pXlLg9L6P3R1IkbcY= +k8s.io/component-base v0.37.2/go.mod h1:qq+ueHZyLfzRJzxyDoyxHWNhF1JPv4zm3hcaddXWDvY= k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc= k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0= k8s.io/kube-openapi v0.0.0-20260821135717-be32def86098 h1:z5+pcu1jTyKK5mNTe2/+x+U6Uuv9jRVOJQLaBJJMpeI= k8s.io/kube-openapi v0.0.0-20260821135717-be32def86098/go.mod h1:0/mqHCVhlumdJ3BhCfnjSZQE037nAhNodh1/hK0T8/I= k8s.io/kubectl v0.36.0 h1:hEGr8NvIm2Wjqs2Xy48Uzmvo6lpHdGKlLyMvau2gTms= k8s.io/kubectl v0.36.0/go.mod h1:iDe8aV5BEi45W8k+5n71I2pJ/nwE0PHDu+/2cejzYoo= -k8s.io/streaming v0.37.1 h1:TpzVfQeFuVndn2g9mFqxy1UcUYPwDzqjUmwR/IzJCWc= -k8s.io/streaming v0.37.1/go.mod h1:APlJR26ZWRcVy5bIEj0QRrKUXROtBHPcxl2NT7EAzPU= -k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3 h1:jVkFFVfXdXP74B/zbO3hM3hpSFD0xvhQ5U686DPurkE= -k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3/go.mod h1:M2s5JB1lIYP3jzZdorPLHXIPJzt9vv2muW5a6L9DtNM= +k8s.io/streaming v0.37.2 h1:xmzp9nbqIbjvsRcqrBYa+K5XPQ6Jy/Dm3zZ8mN916AI= +k8s.io/streaming v0.37.2/go.mod h1:APlJR26ZWRcVy5bIEj0QRrKUXROtBHPcxl2NT7EAzPU= +k8s.io/utils v0.0.0-20261023123148-ca04ba58ecab h1:pjQrNLaF//ytZtWwCAHtW+pqwSKjtWDqzA8+TCX37RI= +k8s.io/utils v0.0.0-20261023123148-ca04ba58ecab/go.mod h1:DdQ0BJxlQtuMlKDqdg7X5IMMQCXIk2b3d1/4M9OhUYo= sigs.k8s.io/controller-runtime v0.25.2 h1:bEkK3PVOIVK9X8QWLGVhJgmFc++47vfT6wakSzAOLsQ= sigs.k8s.io/controller-runtime v0.25.2/go.mod h1:4QqLdT6z/L6Olj8JJCtvztid4/fnIiYsfaTFScegctc= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= diff --git a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/alertmanager_types.go b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/alertmanager_types.go index 8d2b59f40c..9141c3a5fb 100644 --- a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/alertmanager_types.go +++ b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/alertmanager_types.go @@ -372,6 +372,27 @@ type AlertmanagerSpec struct { // +optional AlertmanagerConfigMatcherStrategy AlertmanagerConfigMatcherStrategy `json:"alertmanagerConfigMatcherStrategy,omitempty"` + // alertmanagerConfigFileSystemMode defines how the operator handles + // AlertmanagerConfig resources which have references to the Alertmanager + // container's filesystem (as opposed to secret key references). Users + // controlling the receiver's service may create an AlertmanagerConfig + // resource with a reference to a container's file (for instance using + // `botTokenFile` for the Telegram receiver) and exfiltrate sensitive + // content from files located in the Alertmanager container. + // + // Supported values are: + // - "DenyAll" denies any AlertmanagerConfig resource referencing files from the container's filesystem, non-compliant resources are rejected. + // - "FromAlertmanagerConfigMatcherStrategy" uses the `alertmanagerConfigNamespaceSelector` field to make a decision + // - When `alertmanagerConfigNamespaceSelector` is "None", it is equivalent to "AllowAll" + // - When `alertmanagerConfigNamespaceSelector` is "OnNamespaceExceptForAlertmanagerNamespace", it is equivalent to "AllowAll" for the AlertmanagerConfig resources located in the Alertmanager's namespace and "DenyAll" for all other resources. + // - When `alertmanagerConfigNamespaceSelector` is "OnNamespace", it is equivalent to "AllowAll" for the main AlertmanagerConfig resource (defined in `.spec.alertmanagerConfig.name`) and "DenyAll" for all other resources. + // - "AllowAll" allows any AlertmanagerConfig resource to reference files from the container's filesystem (use with caution). + // + // By default, the operator uses the "FromAlertmanagerConfigMatcherStrategy" mode. + // + // +optional + AlertmanagerConfigFileSystemMode *AlertmanagerConfigFileSystemMode `json:"alertmanagerConfigFileSystemMode,omitempty"` + // minReadySeconds defines the 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. @@ -499,6 +520,28 @@ const ( NoneConfigMatcherStrategyType AlertmanagerConfigMatcherStrategyType = "None" ) +// +kubebuilder:validation:Enum="AllowAll";"FromAlertmanagerConfigMatcherStrategy";"DenyAll" +type AlertmanagerConfigFileSystemMode string + +const ( + // DenyAllAlertmanagerConfigFileSystemMode ("DenyAll") denies any + // AlertmanagerConfig resource which references files from the Alertmanager + // container's filesystem. + DenyAllAlertmanagerConfigFileSystemMode AlertmanagerConfigFileSystemMode = "DenyAll" + + // AllowAllAlertmanagerConfigFileSystemMode ("AllowAll") allows any + // AlertmanagerConfig resource to reference files from the Alertmanager + // container's filesystem. + AllowAllAlertmanagerConfigFileSystemMode AlertmanagerConfigFileSystemMode = "AllowAll" + + // FromAlertmanagerConfigMatcherStrategyAlertmanagerConfigFileSystemMode + // ("FromAlertmanagerConfigMatcherStrategy") uses the + // `alertmanagerConfigNamespaceSelector` field to make a decision on + // denying/allowing AlertmanagerConfig resources which reference files from + // the Alertmanager container's filesystem. + FromAlertmanagerConfigMatcherStrategyAlertmanagerConfigFileSystemMode AlertmanagerConfigFileSystemMode = "FromAlertmanagerConfigMatcherStrategy" +) + // AlertmanagerConfiguration defines the Alertmanager configuration. // +k8s:openapi-gen=true type AlertmanagerConfiguration struct { @@ -712,12 +755,26 @@ type GlobalSMTPConfig struct { } // GlobalTelegramConfig configures global Telegram parameters. +// +kubebuilder:validation:XValidation:rule="!has(self.botToken) || !has(self.botTokenFile)",message="botToken and botTokenFile are mutually exclusive." type GlobalTelegramConfig struct { // apiURL defines he default Telegram API URL. // // It requires Alertmanager >= v0.24.0. // +optional APIURL *URL `json:"apiURL,omitempty"` + + // botToken represents the bot token configuration for Telegram. + // It is mutually exclusive with `botTokenFile`. + // It requires Alertmanager >= v0.31.0. + // +optional + BotToken *v1.SecretKeySelector `json:"botToken,omitempty"` + + // botTokenFile defines the file to read the Telegram bot token from. + // It is mutually exclusive with `botToken`. + // It requires Alertmanager >= v0.31.0. + // +kubebuilder:validation:MinLength=1 + // +optional + BotTokenFile *string `json:"botTokenFile,omitempty"` } // GlobalJiraConfig configures global Jira parameters. diff --git a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/podmonitor_types.go b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/podmonitor_types.go index b0a3a3b5c1..b209bd9e5a 100644 --- a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/podmonitor_types.go +++ b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/podmonitor_types.go @@ -145,6 +145,15 @@ type PodMonitorSpec struct { // +optional FallbackScrapeProtocol *ScrapeProtocol `json:"fallbackScrapeProtocol,omitempty"` + // extraScrapeMetrics defines whether to store additional time series for each scrape: + // `scrape_timeout_seconds`, `scrape_sample_limit` and `scrape_body_size_bytes`. + // These metrics help monitor how close targets are to their configured limits. + // + // It requires Prometheus >= v3.10.0. + // + // +optional + ExtraScrapeMetrics *bool `json:"extraScrapeMetrics,omitempty"` // nolint:kubeapilinter + // labelLimit defines the per-scrape limit on number of labels that will be accepted for a sample. // // It requires Prometheus >= v2.27.0. diff --git a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/probe_types.go b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/probe_types.go index f4d9f7c1a2..8275b4c5a3 100644 --- a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/probe_types.go +++ b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/probe_types.go @@ -129,6 +129,15 @@ type ProbeSpec struct { // +optional FallbackScrapeProtocol *ScrapeProtocol `json:"fallbackScrapeProtocol,omitempty"` + // extraScrapeMetrics defines whether to store additional time series for each scrape: + // `scrape_timeout_seconds`, `scrape_sample_limit` and `scrape_body_size_bytes`. + // These metrics help monitor how close targets are to their configured limits. + // + // It requires Prometheus >= v3.10.0. + // + // +optional + ExtraScrapeMetrics *bool `json:"extraScrapeMetrics,omitempty"` // nolint:kubeapilinter + // labelLimit defines the per-scrape limit on number of labels that will be accepted for a sample. // Only valid in Prometheus versions 2.27.0 and newer. // +kubebuilder:validation:Minimum:=0 diff --git a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/prometheus_types.go b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/prometheus_types.go index ba0ad7906a..87a01462bc 100644 --- a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/prometheus_types.go +++ b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/prometheus_types.go @@ -829,6 +829,15 @@ type CommonPrometheusFields struct { // +optional ScrapeClassicHistograms *bool `json:"scrapeClassicHistograms,omitempty"` // nolint:kubeapilinter + // extraScrapeMetrics defines whether to store additional time series for each scrape: + // `scrape_timeout_seconds`, `scrape_sample_limit` and `scrape_body_size_bytes`. + // These metrics help monitor how close targets are to their configured limits. + // + // It requires Prometheus >= v2.32.0. + // + // +optional + ExtraScrapeMetrics *bool `json:"extraScrapeMetrics,omitempty"` // nolint:kubeapilinter + // minReadySeconds defines the 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. // diff --git a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/servicemonitor_types.go b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/servicemonitor_types.go index 81b2be85a1..30ee66ef61 100644 --- a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/servicemonitor_types.go +++ b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/servicemonitor_types.go @@ -38,6 +38,14 @@ const ( // * Target and metric relabeling. // // `Prometheus` and `PrometheusAgent` objects select `ServiceMonitor` objects using label and namespace selectors. +// +// Service targets that aren't backed by Pods (for instance manually managed +// Endpoints or EndpointSlices) can only be scraped when the endpoint selects +// the service port with `port` instead of `targetPort` and `filterRunning` is +// set to `false`. Manually created Pods have no such restriction. +// +// For targets that aren't backed by Pods, you can also consider using the +// `ScrapeConfig` CRD. type ServiceMonitor struct { // TypeMeta defines the versioned schema of this representation of an object. metav1.TypeMeta `json:",inline"` @@ -143,6 +151,15 @@ type ServiceMonitorSpec struct { // +optional FallbackScrapeProtocol *ScrapeProtocol `json:"fallbackScrapeProtocol,omitempty"` + // extraScrapeMetrics defines whether to store additional time series for each scrape: + // `scrape_timeout_seconds`, `scrape_sample_limit` and `scrape_body_size_bytes`. + // These metrics help monitor how close targets are to their configured limits. + // + // It requires Prometheus >= v3.10.0. + // + // +optional + ExtraScrapeMetrics *bool `json:"extraScrapeMetrics,omitempty"` // nolint:kubeapilinter + // targetLimit defines a limit on the number of scraped targets that will // be accepted. // diff --git a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/types.go b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/types.go index 54515e82f3..3829b6052b 100644 --- a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/types.go +++ b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/types.go @@ -456,7 +456,7 @@ type WebTLSConfig struct { // https://golang.org/pkg/crypto/tls/#ClientAuthType // // +optional - ClientAuthType *string `json:"clientAuthType,omitempty"` + ClientAuthType *ClientAuthType `json:"clientAuthType,omitempty"` // minVersion defines the minimum TLS version that is acceptable. // @@ -495,6 +495,34 @@ type WebTLSConfig struct { CurvePreferences []string `json:"curvePreferences,omitempty"` } +// Taken from https://golang.org/pkg/crypto/tls/#ClientAuthType. +// +kubebuilder:validation:Enum=NoClientCert;RequestClientCert;RequireAnyClientCert;VerifyClientCertIfGiven;RequireAndVerifyClientCert +type ClientAuthType string + +const ( + // NoClientCert indicates that no client certificate should be requested + // during the handshake, and if any certificates are sent they will not + // be verified. + NoClientCert ClientAuthType = "NoClientCert" + // RequestClientCert indicates that a client certificate should be requested + // during the handshake, but does not require that the client send any + // certificates. + RequestClientCert ClientAuthType = "RequestClientCert" + // RequireAnyClientCert indicates that a client certificate should be requested + // during the handshake, and that at least one certificate is required to be + // sent by the client, but that certificate is not required to be valid. + RequireAnyClientCert ClientAuthType = "RequireAnyClientCert" + // VerifyClientCertIfGiven indicates that a client certificate should be requested + // during the handshake, but does not require that the client sends a + // certificate. If the client does send a certificate it is required to be + // valid. + VerifyClientCertIfGiven ClientAuthType = "VerifyClientCertIfGiven" + // RequireAndVerifyClientCert indicates that a client certificate should be requested + // during the handshake, and that at least one valid certificate is required + // to be sent by the client. + RequireAndVerifyClientCert ClientAuthType = "RequireAndVerifyClientCert" +) + // Validate returns an error if one of the WebTLSConfig fields is invalid. // A valid WebTLSConfig should have (Cert or CertFile) and (KeySecret or KeyFile) fields which are not // zero values. @@ -559,6 +587,9 @@ type Endpoint struct { // If a name, it matches against `.spec.containers[].ports[].name` of the Pods. // If a number, it matches against `.spec.containers[].ports[].containerPort` of the Pods. // + // Because it relies on Pod metadata, endpoints which aren't backed by Pods + // are never scraped when `targetPort` is used. + // // +optional TargetPort *intstr.IntOrString `json:"targetPort,omitempty"` diff --git a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/zz_generated.deepcopy.go b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/zz_generated.deepcopy.go index f409882f90..fbef8bddfe 100644 --- a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/zz_generated.deepcopy.go @@ -508,6 +508,11 @@ func (in *AlertmanagerSpec) DeepCopyInto(out *AlertmanagerSpec) { (*in).DeepCopyInto(*out) } out.AlertmanagerConfigMatcherStrategy = in.AlertmanagerConfigMatcherStrategy + if in.AlertmanagerConfigFileSystemMode != nil { + in, out := &in.AlertmanagerConfigFileSystemMode, &out.AlertmanagerConfigFileSystemMode + *out = new(AlertmanagerConfigFileSystemMode) + **out = **in + } if in.MinReadySeconds != nil { in, out := &in.MinReadySeconds, &out.MinReadySeconds *out = new(int32) @@ -1144,6 +1149,11 @@ func (in *CommonPrometheusFields) DeepCopyInto(out *CommonPrometheusFields) { *out = new(bool) **out = **in } + if in.ExtraScrapeMetrics != nil { + in, out := &in.ExtraScrapeMetrics, &out.ExtraScrapeMetrics + *out = new(bool) + **out = **in + } if in.MinReadySeconds != nil { in, out := &in.MinReadySeconds, &out.MinReadySeconds *out = new(int32) @@ -1682,6 +1692,16 @@ func (in *GlobalTelegramConfig) DeepCopyInto(out *GlobalTelegramConfig) { *out = new(URL) **out = **in } + if in.BotToken != nil { + in, out := &in.BotToken, &out.BotToken + *out = new(corev1.SecretKeySelector) + (*in).DeepCopyInto(*out) + } + if in.BotTokenFile != nil { + in, out := &in.BotTokenFile, &out.BotTokenFile + *out = new(string) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalTelegramConfig. @@ -2353,6 +2373,11 @@ func (in *PodMonitorSpec) DeepCopyInto(out *PodMonitorSpec) { *out = new(ScrapeProtocol) **out = **in } + if in.ExtraScrapeMetrics != nil { + in, out := &in.ExtraScrapeMetrics, &out.ExtraScrapeMetrics + *out = new(bool) + **out = **in + } if in.LabelLimit != nil { in, out := &in.LabelLimit, &out.LabelLimit *out = new(int64) @@ -2501,6 +2526,11 @@ func (in *ProbeSpec) DeepCopyInto(out *ProbeSpec) { *out = new(ScrapeProtocol) **out = **in } + if in.ExtraScrapeMetrics != nil { + in, out := &in.ExtraScrapeMetrics, &out.ExtraScrapeMetrics + *out = new(bool) + **out = **in + } if in.LabelLimit != nil { in, out := &in.LabelLimit, &out.LabelLimit *out = new(int64) @@ -3630,6 +3660,11 @@ func (in *ServiceMonitorSpec) DeepCopyInto(out *ServiceMonitorSpec) { *out = new(ScrapeProtocol) **out = **in } + if in.ExtraScrapeMetrics != nil { + in, out := &in.ExtraScrapeMetrics, &out.ExtraScrapeMetrics + *out = new(bool) + **out = **in + } if in.TargetLimit != nil { in, out := &in.TargetLimit, &out.TargetLimit *out = new(int64) @@ -4512,7 +4547,7 @@ func (in *WebTLSConfig) DeepCopyInto(out *WebTLSConfig) { } if in.ClientAuthType != nil { in, out := &in.ClientAuthType, &out.ClientAuthType - *out = new(string) + *out = new(ClientAuthType) **out = **in } if in.MinVersion != nil { diff --git a/vendor/modules.txt b/vendor/modules.txt index 57c6e1810e..7ebb1b18a7 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -324,7 +324,7 @@ github.com/peterbourgon/diskv # github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 ## explicit github.com/pmezard/go-difflib/difflib -# github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.94.1 +# github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.95.0 ## explicit; go 1.26.0 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1 @@ -576,7 +576,7 @@ gopkg.in/evanphx/json-patch.v4 # gopkg.in/inf.v0 v0.9.1 ## explicit gopkg.in/inf.v0 -# k8s.io/api v0.37.1 +# k8s.io/api v0.37.2 ## explicit; go 1.26.0 k8s.io/api/admission/v1 k8s.io/api/admission/v1beta1 @@ -637,7 +637,7 @@ k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 k8s.io/api/storagemigration/v1 k8s.io/api/storagemigration/v1beta1 -# k8s.io/apiextensions-apiserver v0.37.1 +# k8s.io/apiextensions-apiserver v0.37.2 ## explicit; go 1.26.0 k8s.io/apiextensions-apiserver/pkg/apis/apiextensions k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 @@ -649,7 +649,7 @@ k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1 k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1 -# k8s.io/apimachinery v0.37.1 +# k8s.io/apimachinery v0.37.2 ## explicit; go 1.26.0 k8s.io/apimachinery/pkg/api/equality k8s.io/apimachinery/pkg/api/errors @@ -722,7 +722,7 @@ k8s.io/cli-runtime/pkg/genericclioptions k8s.io/cli-runtime/pkg/genericiooptions k8s.io/cli-runtime/pkg/printers k8s.io/cli-runtime/pkg/resource -# k8s.io/client-go v0.37.1 +# k8s.io/client-go v0.37.2 ## explicit; go 1.26.0 k8s.io/client-go/applyconfigurations k8s.io/client-go/applyconfigurations/admissionregistration/v1 @@ -1026,7 +1026,7 @@ k8s.io/client-go/util/keyutil k8s.io/client-go/util/retry k8s.io/client-go/util/watchlist k8s.io/client-go/util/workqueue -# k8s.io/component-base v0.37.1 +# k8s.io/component-base v0.37.2 ## explicit; go 1.26.0 k8s.io/component-base/version # k8s.io/klog/v2 v2.140.0 @@ -1069,14 +1069,14 @@ k8s.io/kubectl/pkg/util/openapi k8s.io/kubectl/pkg/util/templates k8s.io/kubectl/pkg/util/term k8s.io/kubectl/pkg/validation -# k8s.io/streaming v0.37.1 +# k8s.io/streaming v0.37.2 ## explicit; go 1.26.0 k8s.io/streaming/pkg/httpstream k8s.io/streaming/pkg/httpstream/spdy k8s.io/streaming/pkg/httpstream/wsstream k8s.io/streaming/pkg/runtime -# k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3 -## explicit; go 1.25 +# k8s.io/utils v0.0.0-20261023123148-ca04ba58ecab +## explicit; go 1.26 k8s.io/utils/buffer k8s.io/utils/clock k8s.io/utils/dump