From dcbd191e2358401db33c17bfef66def0068e282d Mon Sep 17 00:00:00 2001 From: Alex Kalenyuk Date: Wed, 4 Dec 2024 21:03:53 +0200 Subject: [PATCH] Revert go 1.23 bump (#533) * Revert bump that requires go 1.23 We're not there yet Signed-off-by: Alex Kalenyuk * Standardize setting go.mod to minor See https://github.com/kubevirt/containerized-data-importer/pull/3496 Signed-off-by: Alex Kalenyuk * make build Signed-off-by: Alex Kalenyuk --------- Signed-off-by: Alex Kalenyuk --- deploy/operator.yaml | 48 ++-- go.mod | 5 +- go.sum | 4 +- tools/helper/crd_generated.go | 48 ++-- .../pkg/apis/monitoring/LICENSE | 3 +- .../apis/monitoring/v1/alertmanager_types.go | 55 +--- .../pkg/apis/monitoring/v1/dns_types.go | 82 ------ .../apis/monitoring/v1/podmonitor_types.go | 22 +- .../pkg/apis/monitoring/v1/probe_types.go | 10 +- .../apis/monitoring/v1/prometheus_types.go | 163 +----------- .../monitoring/v1/prometheusrule_types.go | 10 +- .../monitoring/v1/servicemonitor_types.go | 22 +- .../pkg/apis/monitoring/v1/thanos_types.go | 17 +- .../pkg/apis/monitoring/v1/types.go | 197 ++------------ .../monitoring/v1/zz_generated.deepcopy.go | 247 +----------------- vendor/modules.txt | 4 +- 16 files changed, 129 insertions(+), 808 deletions(-) delete mode 100644 vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/dns_types.go diff --git a/deploy/operator.yaml b/deploy/operator.yaml index ca382552f..5722dcd0b 100644 --- a/deploy/operator.yaml +++ b/deploy/operator.yaml @@ -431,7 +431,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.5 name: hostpathprovisioners.hostpathprovisioner.kubevirt.io spec: group: hostpathprovisioner.kubevirt.io @@ -691,7 +691,7 @@ spec: set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ - (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. + (Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default). type: string volumeMode: description: |- @@ -1002,7 +1002,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1017,7 +1017,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1184,7 +1184,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1199,7 +1199,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1364,7 +1364,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1379,7 +1379,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1546,7 +1546,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1561,7 +1561,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1779,7 +1779,7 @@ spec: names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered\nreserved - and hence may not be used.\n\n\nClaimResourceStatus + and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState @@ -1800,14 +1800,14 @@ spec: = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress - for the given PVC.\n\n\nA controller that receives + for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus\nshould ignore the update for the purpose it was designed. For example - a controller that\nonly is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid\nresources associated with - PVC.\n\n\nThis is an alpha field and requires enabling + PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature." type: object x-kubernetes-map-type: granular @@ -1827,7 +1827,7 @@ spec: names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered\nreserved - and hence may not be used.\n\n\nCapacity reported + and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation\nis requested.\nFor storage quota, the larger value from allocatedResources @@ -1837,13 +1837,13 @@ spec: request is lowered, allocatedResources is only\nlowered if there are no expansion operations in progress and if the actual volume capacity\nis equal or lower - than the requested capacity.\n\n\nA controller that + than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName\nshould ignore the update for the purpose it was designed. For example - a controller that\nonly is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid\nresources associated - with PVC.\n\n\nThis is an alpha field and requires + with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature." type: object capacity: @@ -1888,8 +1888,16 @@ spec: status: type: string type: - description: PersistentVolumeClaimConditionType - is a valid value of PersistentVolumeClaimCondition.Type + description: |- + PersistentVolumeClaimConditionType defines the condition of PV claim. + Valid values are: + - "Resizing", "FileSystemResizePending" + + If RecoverVolumeExpansionFailure feature gate is enabled, then following additional values can be expected: + - "ControllerResizeError", "NodeResizeError" + + If VolumeAttributesClass feature gate is enabled, then following additional values can be expected: + - "ModifyVolumeError", "ModifyingVolume" type: string required: - status @@ -1903,13 +1911,13 @@ spec: description: |- currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim - This is an alpha field and requires enabling VolumeAttributesClass feature. + This is a beta field and requires enabling VolumeAttributesClass feature (off by default). type: string modifyVolumeStatus: description: |- ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. When this is unset, there is no ModifyVolume operation being attempted. - This is an alpha field and requires enabling VolumeAttributesClass feature. + This is a beta field and requires enabling VolumeAttributesClass feature (off by default). properties: status: description: "status is the status of the ControllerModifyVolume diff --git a/go.mod b/go.mod index ae5ea344b..63bbd20b1 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,6 @@ module kubevirt.io/hostpath-provisioner-operator -go 1.22.3 -toolchain go1.23.3 +go 1.22.0 require ( github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30 @@ -19,7 +18,7 @@ require ( github.com/openshift/custom-resource-status v1.1.2 github.com/operator-framework/api v0.27.0 github.com/pkg/errors v0.9.1 - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.78.1 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.75.2 go.uber.org/zap v1.27.0 k8s.io/api v0.31.2 k8s.io/apiextensions-apiserver v0.31.2 diff --git a/go.sum b/go.sum index 0bbecc1ac..23ed7f303 100644 --- a/go.sum +++ b/go.sum @@ -196,8 +196,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE 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.78.1 h1:Fm9Z+FabnB+6EoGq15j+pyLmaK6hYrYOpBlTzOLTQ+E= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.78.1/go.mod h1:SvsRXw4m1F2vk7HquU5h475bFpke27mIUswfyw9u3ug= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.75.2 h1:6UsAv+jAevuGO2yZFU/BukV4o9NKnFMOuoouSA4G0ns= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.75.2/go.mod h1:XYrdZw5dW12Cjkt4ndbeNZZTBp4UCHtW0ccR9+sTtPU= github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= diff --git a/tools/helper/crd_generated.go b/tools/helper/crd_generated.go index 24c4a93a3..aef43f0e6 100644 --- a/tools/helper/crd_generated.go +++ b/tools/helper/crd_generated.go @@ -6,7 +6,7 @@ var hppCRD string = kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.5 creationTimestamp: null name: hostpathprovisioners.hostpathprovisioner.kubevirt.io spec: @@ -267,7 +267,7 @@ spec: set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ - (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. + (Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default). type: string volumeMode: description: |- @@ -578,7 +578,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -593,7 +593,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -760,7 +760,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -775,7 +775,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -940,7 +940,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -955,7 +955,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1122,7 +1122,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1137,7 +1137,7 @@ spec: pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. - This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). items: type: string type: array @@ -1355,7 +1355,7 @@ spec: names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered\nreserved - and hence may not be used.\n\n\nClaimResourceStatus + and hence may not be used.\n\nClaimResourceStatus can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState set when resize controller starts resizing the volume in control-plane.\n\t- ControllerResizeFailed:\n\t\tState @@ -1376,14 +1376,14 @@ spec: = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] = \"NodeResizeFailed\"\nWhen this field is not set, it means that no resize operation is in progress - for the given PVC.\n\n\nA controller that receives + for the given PVC.\n\nA controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus\nshould ignore the update for the purpose it was designed. For example - a controller that\nonly is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid\nresources associated with - PVC.\n\n\nThis is an alpha field and requires enabling + PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature." type: object x-kubernetes-map-type: granular @@ -1403,7 +1403,7 @@ spec: names such as \"example.com/my-custom-resource\"\nApart from above values - keys that are unprefixed or have kubernetes.io prefix are considered\nreserved - and hence may not be used.\n\n\nCapacity reported + and hence may not be used.\n\nCapacity reported here may be larger than the actual capacity when a volume expansion operation\nis requested.\nFor storage quota, the larger value from allocatedResources @@ -1413,13 +1413,13 @@ spec: request is lowered, allocatedResources is only\nlowered if there are no expansion operations in progress and if the actual volume capacity\nis equal or lower - than the requested capacity.\n\n\nA controller that + than the requested capacity.\n\nA controller that receives PVC update with previously unknown resourceName\nshould ignore the update for the purpose it was designed. For example - a controller that\nonly is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid\nresources associated - with PVC.\n\n\nThis is an alpha field and requires + with PVC.\n\nThis is an alpha field and requires enabling RecoverVolumeExpansionFailure feature." type: object capacity: @@ -1464,8 +1464,16 @@ spec: status: type: string type: - description: PersistentVolumeClaimConditionType - is a valid value of PersistentVolumeClaimCondition.Type + description: |- + PersistentVolumeClaimConditionType defines the condition of PV claim. + Valid values are: + - "Resizing", "FileSystemResizePending" + + If RecoverVolumeExpansionFailure feature gate is enabled, then following additional values can be expected: + - "ControllerResizeError", "NodeResizeError" + + If VolumeAttributesClass feature gate is enabled, then following additional values can be expected: + - "ModifyVolumeError", "ModifyingVolume" type: string required: - status @@ -1479,13 +1487,13 @@ spec: description: |- currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim - This is an alpha field and requires enabling VolumeAttributesClass feature. + This is a beta field and requires enabling VolumeAttributesClass feature (off by default). type: string modifyVolumeStatus: description: |- ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. When this is unset, there is no ModifyVolume operation being attempted. - This is an alpha field and requires enabling VolumeAttributesClass feature. + This is a beta field and requires enabling VolumeAttributesClass feature (off by default). properties: status: description: "status is the status of the ControllerModifyVolume diff --git a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/LICENSE b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/LICENSE index 74e6ec696..e06d20818 100644 --- a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/LICENSE +++ b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/LICENSE @@ -176,7 +176,7 @@ Apache License END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. - + To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include @@ -199,3 +199,4 @@ Apache License WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. + 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 ebd369d33..f99dedf43 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 @@ -37,15 +37,8 @@ const ( // +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" // +kubebuilder:printcolumn:name="Paused",type="boolean",JSONPath=".status.paused",description="Whether the resource reconciliation is paused or not",priority=1 // +kubebuilder:subresource:status -// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector -// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/api/autoscaling/v1.Scale -// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/api/autoscaling/v1.Scale,result=k8s.io/api/autoscaling/v1.Scale -// The `Alertmanager` custom resource definition (CRD) defines a desired [Alertmanager](https://prometheus.io/docs/alerting) setup to run in a Kubernetes cluster. It allows to specify many options such as the number of replicas, persistent storage and many more. -// -// For each `Alertmanager` resource, the Operator deploys a `StatefulSet` in the same namespace. When there are two or more configured replicas, the Operator runs the Alertmanager instances in high-availability mode. -// -// The resource defines via label and namespace selectors which `AlertmanagerConfig` objects should be associated to the deployed Alertmanager instances. +// Alertmanager describes an Alertmanager cluster. type Alertmanager struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -177,14 +170,6 @@ type AlertmanagerSpec struct { // SecurityContext holds pod-level security attributes and common container settings. // This defaults to the default PodSecurityContext. SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` - // Defines the DNS policy for the pods. - // - // +optional - DNSPolicy *DNSPolicy `json:"dnsPolicy,omitempty"` - // Defines the DNS configuration for the pods. - // - // +optional - DNSConfig *PodDNSConfig `json:"dnsConfig,omitempty"` // ServiceAccountName is the name of the ServiceAccount to use to run the // Prometheus Pods. ServiceAccountName string `json:"serviceAccountName,omitempty"` @@ -237,14 +222,12 @@ type AlertmanagerSpec struct { ForceEnableClusterMode bool `json:"forceEnableClusterMode,omitempty"` // AlertmanagerConfigs to be selected for to merge and configure Alertmanager with. AlertmanagerConfigSelector *metav1.LabelSelector `json:"alertmanagerConfigSelector,omitempty"` + // The AlertmanagerConfigMatcherStrategy defines how AlertmanagerConfig objects match the alerts. + // In the future more options may be added. + AlertmanagerConfigMatcherStrategy AlertmanagerConfigMatcherStrategy `json:"alertmanagerConfigMatcherStrategy,omitempty"` // Namespaces to be selected for AlertmanagerConfig discovery. If nil, only // check own namespace. AlertmanagerConfigNamespaceSelector *metav1.LabelSelector `json:"alertmanagerConfigNamespaceSelector,omitempty"` - - // AlertmanagerConfigMatcherStrategy defines how AlertmanagerConfig objects - // process incoming alerts. - AlertmanagerConfigMatcherStrategy AlertmanagerConfigMatcherStrategy `json:"alertmanagerConfigMatcherStrategy,omitempty"` - // 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) @@ -280,31 +263,16 @@ type AlertmanagerSpec struct { EnableFeatures []string `json:"enableFeatures,omitempty"` } +// AlertmanagerConfigMatcherStrategy defines the strategy used by AlertmanagerConfig objects to match alerts. type AlertmanagerConfigMatcherStrategy struct { - // AlertmanagerConfigMatcherStrategyType defines the strategy used by - // AlertmanagerConfig objects to match alerts in the routes and inhibition - // rules. - // - // The default value is `OnNamespace`. - // + // If set to `OnNamespace`, the operator injects a label matcher matching the namespace of the AlertmanagerConfig object for all its routes and inhibition rules. + // `None` will not add any additional matchers other than the ones specified in the AlertmanagerConfig. + // Default is `OnNamespace`. // +kubebuilder:validation:Enum="OnNamespace";"None" // +kubebuilder:default:="OnNamespace" - Type AlertmanagerConfigMatcherStrategyType `json:"type,omitempty"` + Type string `json:"type,omitempty"` } -type AlertmanagerConfigMatcherStrategyType string - -const ( - // With `OnNamespace`, the route and inhibition rules of an - // AlertmanagerConfig object only process alerts that have a `namespace` - // label equal to the namespace of the object. - OnNamespaceConfigMatcherStrategyType AlertmanagerConfigMatcherStrategyType = "OnNamespace" - - // With `None`, the route and inhbition rules of an AlertmanagerConfig - // object process all incoming alerts. - NoneConfigMatcherStrategyType AlertmanagerConfigMatcherStrategyType = "None" -) - // AlertmanagerConfiguration defines the Alertmanager configuration. // +k8s:openapi-gen=true type AlertmanagerConfiguration struct { @@ -368,8 +336,6 @@ type AlertmanagerStatus struct { AvailableReplicas int32 `json:"availableReplicas"` // Total number of unavailable pods targeted by this Alertmanager object. UnavailableReplicas int32 `json:"unavailableReplicas"` - // The selector used to match the pods targeted by this Alertmanager object. - Selector string `json:"selector,omitempty"` // The current state of the Alertmanager object. // +listType=map // +listMapKey=type @@ -473,8 +439,9 @@ type HTTPConfig struct { // TLS configuration for the client. // +optional TLSConfig *SafeTLSConfig `json:"tlsConfig,omitempty"` + // Optional proxy URL. // +optional - ProxyConfig `json:",inline"` + ProxyURL string `json:"proxyURL,omitempty"` // FollowRedirects specifies whether the client should follow HTTP 3xx redirects. // +optional FollowRedirects *bool `json:"followRedirects,omitempty"` diff --git a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/dns_types.go b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/dns_types.go deleted file mode 100644 index a4731458b..000000000 --- a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/dns_types.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2024 The prometheus-operator Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -package v1 - -// PodDNSConfig defines the DNS parameters of a pod in addition to -// those generated from DNSPolicy. -type PodDNSConfig struct { - // A list of DNS name server IP addresses. - // This will be appended to the base nameservers generated from DNSPolicy. - // +kubebuilder:validation:Optional - // +listType:=set - // +kubebuilder:validation:items:MinLength:=1 - Nameservers []string `json:"nameservers,omitempty"` - - // A list of DNS search domains for host-name lookup. - // This will be appended to the base search paths generated from DNSPolicy. - // +kubebuilder:validation:Optional - // +listType:=set - // +kubebuilder:validation:items:MinLength:=1 - Searches []string `json:"searches,omitempty"` - - // A list of DNS resolver options. - // This will be merged with the base options generated from DNSPolicy. - // Resolution options given in Options - // will override those that appear in the base DNSPolicy. - // +kubebuilder:validation:Optional - // +listType=map - // +listMapKey=name - Options []PodDNSConfigOption `json:"options,omitempty"` -} - -// PodDNSConfigOption defines DNS resolver options of a pod. -type PodDNSConfigOption struct { - // Name is required and must be unique. - // +kubebuilder:validation:MinLength=1 - Name string `json:"name"` - - // Value is optional. - // +kubebuilder:validation:Optional - Value *string `json:"value,omitempty"` -} - -// DNSPolicy specifies the DNS policy for the pod. -// +kubebuilder:validation:Enum=ClusterFirstWithHostNet;ClusterFirst;Default;None -type DNSPolicy string - -const ( - // DNSClusterFirstWithHostNet indicates that the pod should use cluster DNS - // first, if it is available, then fall back on the default - // (as determined by kubelet) DNS settings. - DNSClusterFirstWithHostNet DNSPolicy = "ClusterFirstWithHostNet" - - // DNSClusterFirst indicates that the pod should use cluster DNS - // first unless hostNetwork is true, if it is available, then - // fall back on the default (as determined by kubelet) DNS settings. - DNSClusterFirst DNSPolicy = "ClusterFirst" - - // DNSDefault indicates that the pod should use the default (as - // determined by kubelet) DNS settings. - DNSDefault DNSPolicy = "Default" - - // DNSNone indicates that the pod should use empty DNS settings. DNS - // parameters such as nameservers and search paths should be defined via - // DNSConfig. - DNSNone DNSPolicy = "None" -) - -const ( -// DefaultTerminationGracePeriodSeconds indicates the default duration in -// seconds a pod needs to terminate gracefully. -) 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 a6e2c1605..aa0217501 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 @@ -31,14 +31,7 @@ const ( // +k8s:openapi-gen=true // +kubebuilder:resource:categories="prometheus-operator",shortName="pmon" -// The `PodMonitor` custom resource definition (CRD) defines how `Prometheus` and `PrometheusAgent` can scrape metrics from a group of pods. -// Among other things, it allows to specify: -// * The pods to scrape via label selectors. -// * The container ports to scrape. -// * Authentication credentials to use. -// * Target and metric relabeling. -// -// `Prometheus` and `PrometheusAgent` objects select `PodMonitor` objects using label and namespace selectors. +// PodMonitor defines monitoring for a set of pods. type PodMonitor struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -71,15 +64,15 @@ type PodMonitorSpec struct { // PodTargetLabels []string `json:"podTargetLabels,omitempty"` - // Defines how to scrape metrics from the selected pods. + // List of endpoints part of this PodMonitor. // // +optional PodMetricsEndpoints []PodMetricsEndpoint `json:"podMetricsEndpoints"` - // Label selector to select the Kubernetes `Pod` objects to scrape metrics from. + // Label selector to select the Kubernetes `Pod` objects. Selector metav1.LabelSelector `json:"selector"` - // `namespaceSelector` defines in which namespace(s) Prometheus should discover the pods. - // By default, the pods are discovered in the same namespace as the `PodMonitor` object but it is possible to select pods across different/all namespaces. + // Selector to select which namespaces the Kubernetes `Pods` objects + // are discovered from. NamespaceSelector NamespaceSelector `json:"namespaceSelector,omitempty"` // `sampleLimit` defines a per-scrape limit on the number of scraped samples @@ -123,9 +116,6 @@ type PodMonitorSpec struct { // // +optional LabelValueLengthLimit *uint64 `json:"labelValueLengthLimit,omitempty"` - - NativeHistogramConfig `json:",inline"` - // Per-scrape limit on the number of targets dropped by relabeling // that will be kept in memory. 0 means no limit. // @@ -137,7 +127,7 @@ type PodMonitorSpec struct { // `attachMetadata` defines additional metadata which is added to the // discovered targets. // - // It requires Prometheus >= v2.35.0. + // It requires Prometheus >= v2.37.0. // // +optional AttachMetadata *AttachMetadata `json:"attachMetadata,omitempty"` 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 16c927ad6..4e8427c6c 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 @@ -30,13 +30,7 @@ const ( // +k8s:openapi-gen=true // +kubebuilder:resource:categories="prometheus-operator",shortName="prb" -// The `Probe` custom resource definition (CRD) defines how to scrape metrics from prober exporters such as the [blackbox exporter](https://github.com/prometheus/blackbox_exporter). -// -// The `Probe` resource needs 2 pieces of information: -// * The list of probed addresses which can be defined statically or by discovering Kubernetes Ingress objects. -// * The prober which exposes the availability of probed endpoints (over various protocols such HTTP, TCP, ICMP, ...) as Prometheus metrics. -// -// `Prometheus` and `PrometheusAgent` objects select `Probe` objects using label and namespace selectors. +// Probe defines monitoring for a set of static targets or ingresses. type Probe struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -112,8 +106,6 @@ type ProbeSpec struct { // Only valid in Prometheus versions 2.27.0 and newer. // +optional LabelValueLengthLimit *uint64 `json:"labelValueLengthLimit,omitempty"` - - NativeHistogramConfig `json:",inline"` // Per-scrape limit on the number of targets dropped by relabeling // that will be kept in memory. 0 means no limit. // 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 406613435..e22d785fb 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 @@ -41,15 +41,6 @@ const ( // +kubebuilder:validation:Enum=PrometheusProto;OpenMetricsText0.0.1;OpenMetricsText1.0.0;PrometheusText0.0.4 type ScrapeProtocol string -// RuntimeConfig configures the values for the process behavior. -type RuntimeConfig struct { - // The Go garbage collection target percentage. Lowering this number may increase the CPU usage. - // See: https://tip.golang.org/doc/gc-guide#GOGC - // +optional - // +kubebuilder:validation:Minimum=-1 - GoGC *int32 `json:"goGC,omitempty"` -} - // PrometheusInterface is used by Prometheus and PrometheusAgent to share common methods, e.g. config generation. // +k8s:deepcopy-gen=false type PrometheusInterface interface { @@ -307,16 +298,6 @@ type CommonPrometheusFields struct { // It requires Prometheus >= v2.33.0. EnableRemoteWriteReceiver bool `json:"enableRemoteWriteReceiver,omitempty"` - // List of the protobuf message versions to accept when receiving the - // remote writes. - // - // It requires Prometheus >= v2.54.0. - // - // +kubebuilder:validation:MinItems=1 - // +listType:=set - // +optional - RemoteWriteReceiverMessageVersions []RemoteWriteMessageVersion `json:"remoteWriteReceiverMessageVersions,omitempty"` - // Enable access to Prometheus feature flags. By default, no features are enabled. // // Enabling features which are disabled by default is entirely outside the @@ -387,7 +368,6 @@ type CommonPrometheusFields struct { // object, which shall be mounted into the Prometheus Pods. // Each Secret is added to the StatefulSet definition as a volume named `secret-`. // The Secrets are mounted into /etc/prometheus/secrets/ in the 'prometheus' container. - // +listType:=set Secrets []string `json:"secrets,omitempty"` // ConfigMaps is a list of ConfigMaps in the same namespace as the Prometheus // object, which shall be mounted into the Prometheus Pods. @@ -410,25 +390,11 @@ type CommonPrometheusFields struct { // +optional RemoteWrite []RemoteWriteSpec `json:"remoteWrite,omitempty"` - // Settings related to the OTLP receiver feature. - // It requires Prometheus >= v2.55.0. - // - // +optional - OTLP *OTLPConfig `json:"otlp,omitempty"` - // SecurityContext holds pod-level security attributes and common container settings. // This defaults to the default PodSecurityContext. // +optional SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` - // Defines the DNS policy for the pods. - // - // +optional - DNSPolicy *DNSPolicy `json:"dnsPolicy,omitempty"` - // Defines the DNS configuration for the pods. - // - // +optional - DNSConfig *PodDNSConfig `json:"dnsConfig,omitempty"` // When true, the Prometheus server listens on the loopback address // instead of the Pod IP's address. ListenLocal bool `json:"listenLocal,omitempty"` @@ -710,8 +676,7 @@ type CommonPrometheusFields struct { // it (https://kubernetes.io/docs/concepts/configuration/overview/). // // When hostNetwork is enabled, this will set the DNS policy to - // `ClusterFirstWithHostNet` automatically (unless `.spec.DNSPolicy` is set - // to a different value). + // `ClusterFirstWithHostNet` automatically. HostNetwork bool `json:"hostNetwork,omitempty"` // PodTargetLabels are appended to the `spec.podTargetLabels` field of all @@ -806,21 +771,6 @@ type CommonPrometheusFields struct { // +listType=map // +listMapKey=name ScrapeClasses []ScrapeClass `json:"scrapeClasses,omitempty"` - - // Defines the service discovery role used to discover targets from - // `ServiceMonitor` objects and Alertmanager endpoints. - // - // If set, the value should be either "Endpoints" or "EndpointSlice". - // If unset, the operator assumes the "Endpoints" role. - // - // +optional - ServiceDiscoveryRole *ServiceDiscoveryRole `json:"serviceDiscoveryRole,omitempty"` - - // Defines the runtime reloadable configuration of the timeseries database(TSDB). - // It requires Prometheus >= v2.39.0 or PrometheusAgent >= v2.54.0. - // - // +optional - TSDB *TSDBSpec `json:"tsdb,omitempty"` } // +kubebuilder:validation:Enum=HTTP;ProcessSignal @@ -834,14 +784,6 @@ const ( ProcessSignalReloadStrategyType ReloadStrategyType = "ProcessSignal" ) -// +kubebuilder:validation:Enum=Endpoints;EndpointSlice -type ServiceDiscoveryRole string - -const ( - EndpointsRole ServiceDiscoveryRole = "Endpoints" - EndpointSliceRole ServiceDiscoveryRole = "EndpointSlice" -) - func (cpf *CommonPrometheusFields) PrometheusURIScheme() string { if cpf.Web != nil && cpf.Web.TLSConfig != nil { return "https" @@ -873,13 +815,7 @@ func (cpf *CommonPrometheusFields) WebRoutePrefix() string { // +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/api/autoscaling/v1.Scale // +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/api/autoscaling/v1.Scale,result=k8s.io/api/autoscaling/v1.Scale -// The `Prometheus` custom resource definition (CRD) defines a desired [Prometheus](https://prometheus.io/docs/prometheus) setup to run in a Kubernetes cluster. It allows to specify many options such as the number of replicas, persistent storage, and Alertmanagers where firing alerts should be sent and many more. -// -// For each `Prometheus` resource, the Operator deploys one or several `StatefulSet` objects in the same namespace. The number of StatefulSets is equal to the number of shards which is 1 by default. -// -// The resource defines via label and namespace selectors which `ServiceMonitor`, `PodMonitor`, `Probe` and `PrometheusRule` objects should be associated to the deployed Prometheus instances. -// -// The Operator continuously reconciles the scrape and rules configuration and a sidecar container running in the Prometheus pods triggers a reload of the configuration when needed. +// Prometheus defines a Prometheus deployment. type Prometheus struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -919,10 +855,6 @@ func (l *PrometheusList) DeepCopyObject() runtime.Object { type PrometheusSpec struct { CommonPrometheusFields `json:",inline"` - // RuntimeConfig configures the values for the Prometheus process behavior - // +optional - Runtime *RuntimeConfig `json:"runtime,omitempty"` - // Deprecated: use 'spec.image' instead. BaseImage string `json:"baseImage,omitempty"` // Deprecated: use 'spec.image' instead. The image's tag can be specified as part of the image name. @@ -1037,11 +969,6 @@ type PrometheusSpec struct { // +kubebuilder:default:="30s" EvaluationInterval Duration `json:"evaluationInterval,omitempty"` - // Defines the offset the rule evaluation timestamp of this particular group by the specified duration into the past. - // It requires Prometheus >= v2.53.0. - // +optional - RuleQueryOffset *Duration `json:"ruleQueryOffset,omitempty"` - // Enables access to the Prometheus web admin API. // // WARNING: Enabling the admin APIs enables mutating endpoints, to delete data, @@ -1052,6 +979,10 @@ type PrometheusSpec struct { // For more information: // https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis EnableAdminAPI bool `json:"enableAdminAPI,omitempty"` + + // Defines the runtime reloadable configuration of the timeseries database + // (TSDB). + TSDB TSDBSpec `json:"tsdb,omitempty"` } type PrometheusTracingConfig struct { @@ -1129,7 +1060,7 @@ type PrometheusStatus struct { // AlertingSpec defines parameters for alerting configuration of Prometheus servers. // +k8s:openapi-gen=true type AlertingSpec struct { - // Alertmanager endpoints where Prometheus should send alerts to. + // AlertmanagerEndpoints Prometheus should fire alerts against. Alertmanagers []AlertmanagerEndpoints `json:"alertmanagers"` } @@ -1348,8 +1279,6 @@ type ThanosSpec struct { // +k8s:openapi-gen=true type RemoteWriteSpec struct { // The URL of the endpoint to send samples to. - // +kubebuilder:validation:MinLength=1 - // +required URL string `json:"url"` // The name of the remote write queue, it must be unique if specified. The @@ -1357,27 +1286,10 @@ type RemoteWriteSpec struct { // // It requires Prometheus >= v2.15.0. // - //+optional - Name *string `json:"name,omitempty"` - - // The Remote Write message's version to use when writing to the endpoint. - // - // `Version1.0` corresponds to the `prometheus.WriteRequest` protobuf message introduced in Remote Write 1.0. - // `Version2.0` corresponds to the `io.prometheus.write.v2.Request` protobuf message introduced in Remote Write 2.0. - // - // When `Version2.0` is selected, Prometheus will automatically be - // configured to append the metadata of scraped metrics to the WAL. - // - // Before setting this field, consult with your remote storage provider - // what message version it supports. - // - // It requires Prometheus >= v2.54.0. - // - // +optional - MessageVersion *RemoteWriteMessageVersion `json:"messageVersion,omitempty"` + Name string `json:"name,omitempty"` // Enables sending of exemplars over remote write. Note that - // exemplar-storage itself must be enabled using the `spec.enableFeatures` + // exemplar-storage itself must be enabled using the `spec.enableFeature` // option for exemplars to be scraped in the first place. // // It requires Prometheus >= v2.27.0. @@ -1394,8 +1306,7 @@ type RemoteWriteSpec struct { SendNativeHistograms *bool `json:"sendNativeHistograms,omitempty"` // Timeout for requests to the remote write endpoint. - // +optional - RemoteTimeout *Duration `json:"remoteTimeout,omitempty"` + RemoteTimeout Duration `json:"remoteTimeout,omitempty"` // 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. @@ -1416,19 +1327,16 @@ type RemoteWriteSpec struct { // Cannot be set at the same time as `sigv4`, `authorization`, `basicAuth`, or `azureAd`. // +optional OAuth2 *OAuth2 `json:"oauth2,omitempty"` - // BasicAuth configuration for the URL. // // Cannot be set at the same time as `sigv4`, `authorization`, `oauth2`, or `azureAd`. // // +optional BasicAuth *BasicAuth `json:"basicAuth,omitempty"` - // File from which to read bearer token for the URL. // // Deprecated: this will be removed in a future release. Prefer using `authorization`. BearerTokenFile string `json:"bearerTokenFile,omitempty"` - // Authorization section for the URL. // // It requires Prometheus >= v2.26.0. @@ -1437,7 +1345,6 @@ type RemoteWriteSpec struct { // // +optional Authorization *Authorization `json:"authorization,omitempty"` - // Sigv4 allows to configures AWS's Signature Verification 4 for the URL. // // It requires Prometheus >= v2.26.0. @@ -1490,16 +1397,6 @@ type RemoteWriteSpec struct { EnableHttp2 *bool `json:"enableHTTP2,omitempty"` } -// +kubebuilder:validation:Enum=V1.0;V2.0 -type RemoteWriteMessageVersion string - -const ( - // Remote Write message's version 1.0. - RemoteWriteMessageVersion1_0 = RemoteWriteMessageVersion("V1.0") - // Remote Write message's version 2.0. - RemoteWriteMessageVersion2_0 = RemoteWriteMessageVersion("V2.0") -) - // QueueConfig allows the tuning of remote write's queue_config parameters. // This object is referenced in the RemoteWriteSpec object. // +k8s:openapi-gen=true @@ -1637,8 +1534,7 @@ type RemoteReadSpec struct { RequiredMatchers map[string]string `json:"requiredMatchers,omitempty"` // Timeout for requests to the remote read endpoint. - // +optional - RemoteTimeout *Duration `json:"remoteTimeout,omitempty"` + RemoteTimeout Duration `json:"remoteTimeout,omitempty"` // Custom HTTP headers to be sent along with each remote read request. // Be aware that headers that are set by Prometheus itself can't be overwritten. @@ -1809,18 +1705,8 @@ type APIServerConfig struct { // +k8s:openapi-gen=true type AlertmanagerEndpoints struct { // Namespace of the Endpoints object. - // - // If not set, the object will be discovered in the namespace of the - // Prometheus object. - // - // +kubebuilder:validation:MinLength:=1 - // +optional - Namespace *string `json:"namespace,omitempty"` - + Namespace string `json:"namespace"` // Name of the Endpoints object in the namespace. - // - // +kubebuilder:validation:MinLength:=1 - // +required Name string `json:"name"` // Port on which the Alertmanager API is exposed. @@ -1955,9 +1841,8 @@ type TSDBSpec struct { // This is an *experimental feature*, it may change in any upcoming release // in a breaking way. // - // It requires Prometheus >= v2.39.0 or PrometheusAgent >= v2.54.0. - // +optional - OutOfOrderTimeWindow *Duration `json:"outOfOrderTimeWindow,omitempty"` + // It requires Prometheus >= v2.39.0. + OutOfOrderTimeWindow Duration `json:"outOfOrderTimeWindow,omitempty"` } type Exemplars struct { @@ -2084,24 +1969,4 @@ type ScrapeClass struct { // // +optional MetricRelabelings []RelabelConfig `json:"metricRelabelings,omitempty"` - - // AttachMetadata configures additional metadata to the discovered targets. - // When the scrape object defines its own configuration, it takes - // precedence over the scrape class configuration. - // - // +optional - AttachMetadata *AttachMetadata `json:"attachMetadata,omitempty"` -} - -// OTLPConfig is the configuration for writing to the OTLP endpoint. -// -// +k8s:openapi-gen=true -type OTLPConfig struct { - // List of OpenTelemetry Attributes that should be promoted to metric labels, defaults to none. - // - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:items:MinLength=1 - // +listType=set - // +optional - PromoteResourceAttributes []string `json:"promoteResourceAttributes,omitempty"` } diff --git a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/prometheusrule_types.go b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/prometheusrule_types.go index b321bafc3..8c9a4afe6 100644 --- a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/prometheusrule_types.go +++ b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/prometheusrule_types.go @@ -30,9 +30,7 @@ const ( // +k8s:openapi-gen=true // +kubebuilder:resource:categories="prometheus-operator",shortName="promrule" -// The `PrometheusRule` custom resource definition (CRD) defines [alerting](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) and [recording](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/) rules to be evaluated by `Prometheus` or `ThanosRuler` objects. -// -// `Prometheus` and `ThanosRuler` objects select `PrometheusRule` objects using label and namespace selectors. +// PrometheusRule defines recording and alerting rules for a Prometheus instance type PrometheusRule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -66,12 +64,6 @@ type RuleGroup struct { // Interval determines how often rules in the group are evaluated. // +optional Interval *Duration `json:"interval,omitempty"` - // Defines the offset the rule evaluation timestamp of this particular group by the specified duration into the past. - // - // It requires Prometheus >= v2.53.0. - // It is not supported for ThanosRuler. - // +optional - QueryOffset *Duration `json:"query_offset,omitempty"` // List of alerting and recording rules. // +optional Rules []Rule `json:"rules,omitempty"` 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 0b40e4a9e..8002a1328 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 @@ -29,14 +29,7 @@ const ( // +k8s:openapi-gen=true // +kubebuilder:resource:categories="prometheus-operator",shortName="smon" -// The `ServiceMonitor` custom resource definition (CRD) defines how `Prometheus` and `PrometheusAgent` can scrape metrics from a group of services. -// Among other things, it allows to specify: -// * The services to scrape via label selectors. -// * The container ports to scrape. -// * Authentication credentials to use. -// * Target and metric relabeling. -// -// `Prometheus` and `PrometheusAgent` objects select `ServiceMonitor` objects using label and namespace selectors. +// ServiceMonitor defines monitoring for a set of services. type ServiceMonitor struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -77,14 +70,14 @@ type ServiceMonitorSpec struct { PodTargetLabels []string `json:"podTargetLabels,omitempty"` // List of endpoints part of this ServiceMonitor. - // Defines how to scrape metrics from Kubernetes [Endpoints](https://kubernetes.io/docs/concepts/services-networking/service/#endpoints) objects. - // In most cases, an Endpoints object is backed by a Kubernetes [Service](https://kubernetes.io/docs/concepts/services-networking/service/) object with the same name and labels. + // + // +optional Endpoints []Endpoint `json:"endpoints"` - // Label selector to select the Kubernetes `Endpoints` objects to scrape metrics from. + // Label selector to select the Kubernetes `Endpoints` objects. Selector metav1.LabelSelector `json:"selector"` - // `namespaceSelector` defines in which namespace(s) Prometheus should discover the services. - // By default, the services are discovered in the same namespace as the `ServiceMonitor` object but it is possible to select pods across different/all namespaces. + // Selector to select which namespaces the Kubernetes `Endpoints` objects + // are discovered from. NamespaceSelector NamespaceSelector `json:"namespaceSelector,omitempty"` // `sampleLimit` defines a per-scrape limit on the number of scraped samples @@ -128,9 +121,6 @@ type ServiceMonitorSpec struct { // // +optional LabelValueLengthLimit *uint64 `json:"labelValueLengthLimit,omitempty"` - - NativeHistogramConfig `json:",inline"` - // Per-scrape limit on the number of targets dropped by relabeling // that will be kept in memory. 0 means no limit. // diff --git a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/thanos_types.go b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/thanos_types.go index e25590d2e..82c569ee1 100644 --- a/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/thanos_types.go +++ b/vendor/github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1/thanos_types.go @@ -38,11 +38,7 @@ const ( // +kubebuilder:printcolumn:name="Paused",type="boolean",JSONPath=".status.paused",description="Whether the resource reconciliation is paused or not",priority=1 // +kubebuilder:subresource:status -// The `ThanosRuler` custom resource definition (CRD) defines a desired [Thanos Ruler](https://github.com/thanos-io/thanos/blob/main/docs/components/rule.md) setup to run in a Kubernetes cluster. -// -// A `ThanosRuler` instance requires at least one compatible Prometheus API endpoint (either Thanos Querier or Prometheus services). -// -// The resource defines via label and namespace selectors which `PrometheusRule` objects should be associated to the deployed Thanos Ruler instances. +// ThanosRuler defines a ThanosRuler deployment. type ThanosRuler struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -110,15 +106,6 @@ type ThanosRulerSpec struct { // SecurityContext holds pod-level security attributes and common container settings. // This defaults to the default PodSecurityContext. SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` - // Defines the DNS policy for the pods. - // - // +optional - DNSPolicy *DNSPolicy `json:"dnsPolicy,omitempty"` - // Defines the DNS configuration for the pods. - // - // +optional - DNSConfig *PodDNSConfig `json:"dnsConfig,omitempty"` - // Priority class assigned to the Pods PriorityClassName string `json:"priorityClassName,omitempty"` // ServiceAccountName is the name of the ServiceAccount to use to run the @@ -305,7 +292,7 @@ type ThanosRulerStatus struct { AvailableReplicas int32 `json:"availableReplicas"` // Total number of unavailable pods targeted by this ThanosRuler deployment. UnavailableReplicas int32 `json:"unavailableReplicas"` - // The current state of the ThanosRuler object. + // The current state of the Alertmanager object. // +listType=map // +listMapKey=type // +optional 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 6d43b90c7..5676566fa 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 @@ -17,11 +17,8 @@ package v1 import ( "errors" "fmt" - "reflect" - "strings" v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/intstr" @@ -82,6 +79,7 @@ type PrometheusRuleExcludeConfig struct { type ProxyConfig struct { // `proxyURL` defines the HTTP proxy server to use. // + // It requires Prometheus >= v2.43.0. // +kubebuilder:validation:Pattern:="^http(s)?://.+$" // +optional ProxyURL *string `json:"proxyUrl,omitempty"` @@ -89,67 +87,24 @@ type ProxyConfig struct { // that should be excluded from proxying. IP and domain names can // contain port numbers. // - // It requires Prometheus >= v2.43.0 or Alertmanager >= 0.25.0. + // It requires Prometheus >= v2.43.0. // +optional NoProxy *string `json:"noProxy,omitempty"` // Whether to use the proxy configuration defined by environment variables (HTTP_PROXY, HTTPS_PROXY, and NO_PROXY). + // If unset, Prometheus uses its default value. // - // It requires Prometheus >= v2.43.0 or Alertmanager >= 0.25.0. + // It requires Prometheus >= v2.43.0. // +optional ProxyFromEnvironment *bool `json:"proxyFromEnvironment,omitempty"` // ProxyConnectHeader optionally specifies headers to send to // proxies during CONNECT requests. // - // It requires Prometheus >= v2.43.0 or Alertmanager >= 0.25.0. + // It requires Prometheus >= v2.43.0. // +optional // +mapType:=atomic ProxyConnectHeader map[string][]v1.SecretKeySelector `json:"proxyConnectHeader,omitempty"` } -// Validate semantically validates the given ProxyConfig. -func (pc *ProxyConfig) Validate() error { - if pc == nil { - return nil - } - - if reflect.ValueOf(pc).IsZero() { - return nil - } - - proxyFromEnvironmentDefined := pc.ProxyFromEnvironment != nil && *pc.ProxyFromEnvironment - proxyURLDefined := pc.ProxyURL != nil && *pc.ProxyURL != "" - noProxyDefined := pc.NoProxy != nil && *pc.NoProxy != "" - - if len(pc.ProxyConnectHeader) > 0 && (!proxyFromEnvironmentDefined && !proxyURLDefined) { - return fmt.Errorf("if proxyConnectHeader is configured, proxyUrl or proxyFromEnvironment must also be configured") - } - - if proxyFromEnvironmentDefined && proxyURLDefined { - return fmt.Errorf("if proxyFromEnvironment is configured, proxyUrl must not be configured") - } - - if proxyFromEnvironmentDefined && noProxyDefined { - return fmt.Errorf("if proxyFromEnvironment is configured, noProxy must not be configured") - } - - if !proxyURLDefined && noProxyDefined { - return fmt.Errorf("if noProxy is configured, proxyUrl must also be configured") - } - - for k, v := range pc.ProxyConnectHeader { - if len(v) == 0 { - return fmt.Errorf("proxyConnetHeader[%s]: selector must not be empty", k) - } - for i, sel := range v { - if sel == (v1.SecretKeySelector{}) { - return fmt.Errorf("proxyConnectHeader[%s][%d]: selector must be defined", k, i) - } - } - } - - return nil -} - // ObjectReference references a PodMonitor, ServiceMonitor, Probe or PrometheusRule object. type ObjectReference struct { // Group of the referent. When not specified, it defaults to `monitoring.coreos.com` @@ -359,16 +314,16 @@ type WebHTTPHeaders struct { // WebTLSConfig defines the TLS parameters for HTTPS. // +k8s:openapi-gen=true type WebTLSConfig struct { - // Contains the TLS certificate for the server. - Cert SecretOrConfigMap `json:"cert,omitempty"` - // Contains the CA certificate for client certificate authentication to the server. - ClientCA SecretOrConfigMap `json:"client_ca,omitempty"` // Secret containing the TLS key for the server. - KeySecret v1.SecretKeySelector `json:"keySecret,omitempty"` + KeySecret v1.SecretKeySelector `json:"keySecret"` + // Contains the TLS certificate for the server. + Cert SecretOrConfigMap `json:"cert"` // Server policy for client authentication. Maps to ClientAuth Policies. // For more detail on clientAuth options: // https://golang.org/pkg/crypto/tls/#ClientAuthType ClientAuthType string `json:"clientAuthType,omitempty"` + // Contains the CA certificate for client certificate authentication to the server. + ClientCA SecretOrConfigMap `json:"client_ca,omitempty"` // Minimum TLS version that is acceptable. Defaults to TLS12. MinVersion string `json:"minVersion,omitempty"` // Maximum TLS version that is acceptable. Defaults to TLS13. @@ -386,19 +341,10 @@ type WebTLSConfig struct { // order. Available curves are documented in the go documentation: // https://golang.org/pkg/crypto/tls/#CurveID CurvePreferences []string `json:"curvePreferences,omitempty"` - // Path to the TLS key file in the Prometheus container for the server. - // Mutually exclusive with `keySecret`. - KeyFile string `json:"keyFile,omitempty"` - // Path to the TLS certificate file in the Prometheus container for the server. - // Mutually exclusive with `cert`. - CertFile string `json:"certFile,omitempty"` - // Path to the CA certificate file for client certificate authentication to the server. - // Mutually exclusive with `client_ca`. - ClientCAFile string `json:"clientCAFile,omitempty"` } // 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 +// A valid WebTLSConfig should have Cert and KeySecret fields which are not // zero values. func (c *WebTLSConfig) Validate() error { if c == nil { @@ -406,39 +352,21 @@ func (c *WebTLSConfig) Validate() error { } if c.ClientCA != (SecretOrConfigMap{}) { - if c.ClientCAFile != "" { - return errors.New("cannot specify both clientCAFile and clientCA") - } - if err := c.ClientCA.Validate(); err != nil { - return fmt.Errorf("invalid web tls config: %s", err.Error()) - } - } - - if c.Cert != (SecretOrConfigMap{}) { - if c.CertFile != "" { - return errors.New("cannot specify both cert and certFile") - } - if err := c.Cert.Validate(); err != nil { - return fmt.Errorf("invalid web tls config: %s", err.Error()) + return fmt.Errorf("client CA: %w", err) } } - if c.KeyFile != "" && c.KeySecret != (v1.SecretKeySelector{}) { - return errors.New("cannot specify both keyFile and keySecret") + if c.Cert == (SecretOrConfigMap{}) { + return errors.New("TLS cert must be defined") + } else if err := c.Cert.Validate(); err != nil { + return fmt.Errorf("TLS cert: %w", err) } - hasCert := c.CertFile != "" || c.Cert != (SecretOrConfigMap{}) - hasKey := c.KeyFile != "" || c.KeySecret != (v1.SecretKeySelector{}) - - if !hasKey { + if c.KeySecret == (v1.SecretKeySelector{}) { return errors.New("TLS key must be defined") } - if !hasCert { - return errors.New("TLS certificate must be defined") - } - return nil } @@ -603,11 +531,8 @@ type Endpoint struct { } type AttachMetadata struct { - // When set to true, Prometheus attaches node metadata to the discovered - // targets. - // - // The Prometheus service account must have the `list` and `watch` - // permissions on the `Nodes` objects. + // When set to true, Prometheus must have the `get` permission on the + // `Nodes` objects. // // +optional Node *bool `json:"node,omitempty"` @@ -640,18 +565,6 @@ type OAuth2 struct { // // +optional EndpointParams map[string]string `json:"endpointParams,omitempty"` - - // TLS configuration to use when connecting to the OAuth2 server. - // It requires Prometheus >= v2.43.0. - // - // +optional - TLSConfig *SafeTLSConfig `json:"tlsConfig,omitempty"` - - // Proxy configuration to use when connecting to the OAuth2 server. - // It requires Prometheus >= v2.43.0. - // - // +optional - ProxyConfig `json:",inline"` } type OAuth2ValidationError struct { @@ -677,12 +590,6 @@ func (o *OAuth2) Validate() error { } } - if err := o.TLSConfig.Validate(); err != nil { - return &OAuth2ValidationError{ - err: fmt.Sprintf("invalid OAuth2 tlsConfig: %s", err.Error()), - } - } - return nil } @@ -735,16 +642,6 @@ func (c *SecretOrConfigMap) String() string { return "" } -// +kubebuilder:validation:Enum=TLS10;TLS11;TLS12;TLS13 -type TLSVersion string - -const ( - TLSVersion10 TLSVersion = "TLS10" - TLSVersion11 TLSVersion = "TLS11" - TLSVersion12 TLSVersion = "TLS12" - TLSVersion13 TLSVersion = "TLS13" -) - // SafeTLSConfig specifies safe TLS configuration parameters. // +k8s:openapi-gen=true type SafeTLSConfig struct { @@ -758,32 +655,16 @@ type SafeTLSConfig struct { KeySecret *v1.SecretKeySelector `json:"keySecret,omitempty"` // Used to verify the hostname for the targets. - // +optional + //+optional ServerName *string `json:"serverName,omitempty"` // Disable target certificate validation. - // +optional + //+optional InsecureSkipVerify *bool `json:"insecureSkipVerify,omitempty"` - - // Minimum acceptable TLS version. - // - // It requires Prometheus >= v2.35.0. - // +optional - MinVersion *TLSVersion `json:"minVersion,omitempty"` - - // Maximum acceptable TLS version. - // - // It requires Prometheus >= v2.41.0. - // +optional - MaxVersion *TLSVersion `json:"maxVersion,omitempty"` } // Validate semantically validates the given SafeTLSConfig. func (c *SafeTLSConfig) Validate() error { - if c == nil { - return nil - } - if c.CA != (SecretOrConfigMap{}) { if err := c.CA.Validate(); err != nil { return fmt.Errorf("ca %s: %w", c.CA.String(), err) @@ -804,10 +685,6 @@ func (c *SafeTLSConfig) Validate() error { return fmt.Errorf("client key specified without client cert") } - if c.MaxVersion != nil && c.MinVersion != nil && strings.Compare(string(*c.MaxVersion), string(*c.MinVersion)) == -1 { - return fmt.Errorf("maxVersion must more than or equal to minVersion") - } - return nil } @@ -825,10 +702,6 @@ type TLSConfig struct { // Validate semantically validates the given TLSConfig. func (c *TLSConfig) Validate() error { - if c == nil { - return nil - } - if c.CA != (SecretOrConfigMap{}) { if c.CAFile != "" { return fmt.Errorf("cannot specify both caFile and ca") @@ -862,10 +735,6 @@ func (c *TLSConfig) Validate() error { return fmt.Errorf("cannot specify client key without client cert") } - if c.MaxVersion != nil && c.MinVersion != nil && strings.Compare(string(*c.MaxVersion), string(*c.MinVersion)) == -1 { - return fmt.Errorf("maxVersion must more than or equal to minVersion") - } - return nil } @@ -906,27 +775,3 @@ const ( RoleEndpointSlice = "endpointslice" RoleIngress = "ingress" ) - -// NativeHistogramConfig extends the native histogram configuration settings. -// +k8s:openapi-gen=true -type NativeHistogramConfig struct { - // Whether to scrape a classic histogram that is also exposed as a native histogram. - // It requires Prometheus >= v2.45.0. - // - // +optional - ScrapeClassicHistograms *bool `json:"scrapeClassicHistograms,omitempty"` - - // If there are more than this many buckets in a native histogram, - // buckets will be merged to stay within the limit. - // It requires Prometheus >= v2.45.0. - // - // +optional - NativeHistogramBucketLimit *uint64 `json:"nativeHistogramBucketLimit,omitempty"` - - // If the growth factor of one bucket to the next is smaller than this, - // buckets will be merged to increase the factor sufficiently. - // It requires Prometheus >= v2.50.0. - // - // +optional - NativeHistogramMinBucketFactor *resource.Quantity `json:"nativeHistogramMinBucketFactor,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 43d2e9b83..51c19b2b5 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 @@ -141,11 +141,6 @@ func (in *AlertmanagerConfiguration) DeepCopy() *AlertmanagerConfiguration { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AlertmanagerEndpoints) DeepCopyInto(out *AlertmanagerEndpoints) { *out = *in - if in.Namespace != nil { - in, out := &in.Namespace, &out.Namespace - *out = new(string) - **out = **in - } out.Port = in.Port if in.TLSConfig != nil { in, out := &in.TLSConfig, &out.TLSConfig @@ -356,16 +351,6 @@ func (in *AlertmanagerSpec) DeepCopyInto(out *AlertmanagerSpec) { *out = new(corev1.PodSecurityContext) (*in).DeepCopyInto(*out) } - if in.DNSPolicy != nil { - in, out := &in.DNSPolicy, &out.DNSPolicy - *out = new(DNSPolicy) - **out = **in - } - if in.DNSConfig != nil { - in, out := &in.DNSConfig, &out.DNSConfig - *out = new(PodDNSConfig) - (*in).DeepCopyInto(*out) - } if in.Containers != nil { in, out := &in.Containers, &out.Containers *out = make([]corev1.Container, len(*in)) @@ -395,12 +380,12 @@ func (in *AlertmanagerSpec) DeepCopyInto(out *AlertmanagerSpec) { *out = new(metav1.LabelSelector) (*in).DeepCopyInto(*out) } + out.AlertmanagerConfigMatcherStrategy = in.AlertmanagerConfigMatcherStrategy if in.AlertmanagerConfigNamespaceSelector != nil { in, out := &in.AlertmanagerConfigNamespaceSelector, &out.AlertmanagerConfigNamespaceSelector *out = new(metav1.LabelSelector) (*in).DeepCopyInto(*out) } - out.AlertmanagerConfigMatcherStrategy = in.AlertmanagerConfigMatcherStrategy if in.MinReadySeconds != nil { in, out := &in.MinReadySeconds, &out.MinReadySeconds *out = new(uint32) @@ -752,11 +737,6 @@ func (in *CommonPrometheusFields) DeepCopyInto(out *CommonPrometheusFields) { (*out)[key] = val } } - if in.RemoteWriteReceiverMessageVersions != nil { - in, out := &in.RemoteWriteReceiverMessageVersions, &out.RemoteWriteReceiverMessageVersions - *out = make([]RemoteWriteMessageVersion, len(*in)) - copy(*out, *in) - } if in.EnableFeatures != nil { in, out := &in.EnableFeatures, &out.EnableFeatures *out = make([]EnableFeature, len(*in)) @@ -840,26 +820,11 @@ func (in *CommonPrometheusFields) DeepCopyInto(out *CommonPrometheusFields) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.OTLP != nil { - in, out := &in.OTLP, &out.OTLP - *out = new(OTLPConfig) - (*in).DeepCopyInto(*out) - } if in.SecurityContext != nil { in, out := &in.SecurityContext, &out.SecurityContext *out = new(corev1.PodSecurityContext) (*in).DeepCopyInto(*out) } - if in.DNSPolicy != nil { - in, out := &in.DNSPolicy, &out.DNSPolicy - *out = new(DNSPolicy) - **out = **in - } - if in.DNSConfig != nil { - in, out := &in.DNSConfig, &out.DNSConfig - *out = new(PodDNSConfig) - (*in).DeepCopyInto(*out) - } if in.Containers != nil { in, out := &in.Containers, &out.Containers *out = make([]corev1.Container, len(*in)) @@ -1004,16 +969,6 @@ func (in *CommonPrometheusFields) DeepCopyInto(out *CommonPrometheusFields) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.ServiceDiscoveryRole != nil { - in, out := &in.ServiceDiscoveryRole, &out.ServiceDiscoveryRole - *out = new(ServiceDiscoveryRole) - **out = **in - } - if in.TSDB != nil { - in, out := &in.TSDB, &out.TSDB - *out = new(TSDBSpec) - (*in).DeepCopyInto(*out) - } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonPrometheusFields. @@ -1338,7 +1293,6 @@ func (in *HTTPConfig) DeepCopyInto(out *HTTPConfig) { *out = new(SafeTLSConfig) (*in).DeepCopyInto(*out) } - in.ProxyConfig.DeepCopyInto(&out.ProxyConfig) if in.FollowRedirects != nil { in, out := &in.FollowRedirects, &out.FollowRedirects *out = new(bool) @@ -1441,36 +1395,6 @@ func (in *NamespaceSelector) DeepCopy() *NamespaceSelector { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NativeHistogramConfig) DeepCopyInto(out *NativeHistogramConfig) { - *out = *in - if in.ScrapeClassicHistograms != nil { - in, out := &in.ScrapeClassicHistograms, &out.ScrapeClassicHistograms - *out = new(bool) - **out = **in - } - if in.NativeHistogramBucketLimit != nil { - in, out := &in.NativeHistogramBucketLimit, &out.NativeHistogramBucketLimit - *out = new(uint64) - **out = **in - } - if in.NativeHistogramMinBucketFactor != nil { - in, out := &in.NativeHistogramMinBucketFactor, &out.NativeHistogramMinBucketFactor - x := (*in).DeepCopy() - *out = &x - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NativeHistogramConfig. -func (in *NativeHistogramConfig) DeepCopy() *NativeHistogramConfig { - if in == nil { - return nil - } - out := new(NativeHistogramConfig) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OAuth2) DeepCopyInto(out *OAuth2) { *out = *in @@ -1488,12 +1412,6 @@ func (in *OAuth2) DeepCopyInto(out *OAuth2) { (*out)[key] = val } } - if in.TLSConfig != nil { - in, out := &in.TLSConfig, &out.TLSConfig - *out = new(SafeTLSConfig) - (*in).DeepCopyInto(*out) - } - in.ProxyConfig.DeepCopyInto(&out.ProxyConfig) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuth2. @@ -1521,26 +1439,6 @@ func (in *OAuth2ValidationError) DeepCopy() *OAuth2ValidationError { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OTLPConfig) DeepCopyInto(out *OTLPConfig) { - *out = *in - if in.PromoteResourceAttributes != nil { - in, out := &in.PromoteResourceAttributes, &out.PromoteResourceAttributes - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OTLPConfig. -func (in *OTLPConfig) DeepCopy() *OTLPConfig { - if in == nil { - return nil - } - out := new(OTLPConfig) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ObjectReference) DeepCopyInto(out *ObjectReference) { *out = *in @@ -1556,58 +1454,6 @@ func (in *ObjectReference) DeepCopy() *ObjectReference { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodDNSConfig) DeepCopyInto(out *PodDNSConfig) { - *out = *in - if in.Nameservers != nil { - in, out := &in.Nameservers, &out.Nameservers - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Searches != nil { - in, out := &in.Searches, &out.Searches - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Options != nil { - in, out := &in.Options, &out.Options - *out = make([]PodDNSConfigOption, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDNSConfig. -func (in *PodDNSConfig) DeepCopy() *PodDNSConfig { - if in == nil { - return nil - } - out := new(PodDNSConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodDNSConfigOption) DeepCopyInto(out *PodDNSConfigOption) { - *out = *in - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDNSConfigOption. -func (in *PodDNSConfigOption) DeepCopy() *PodDNSConfigOption { - if in == nil { - return nil - } - out := new(PodDNSConfigOption) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PodMetricsEndpoint) DeepCopyInto(out *PodMetricsEndpoint) { *out = *in @@ -1802,7 +1648,6 @@ func (in *PodMonitorSpec) DeepCopyInto(out *PodMonitorSpec) { *out = new(uint64) **out = **in } - in.NativeHistogramConfig.DeepCopyInto(&out.NativeHistogramConfig) if in.KeepDroppedTargets != nil { in, out := &in.KeepDroppedTargets, &out.KeepDroppedTargets *out = new(uint64) @@ -1944,7 +1789,6 @@ func (in *ProbeSpec) DeepCopyInto(out *ProbeSpec) { *out = new(uint64) **out = **in } - in.NativeHistogramConfig.DeepCopyInto(&out.NativeHistogramConfig) if in.KeepDroppedTargets != nil { in, out := &in.KeepDroppedTargets, &out.KeepDroppedTargets *out = new(uint64) @@ -2214,11 +2058,6 @@ func (in *PrometheusRuleSpec) DeepCopy() *PrometheusRuleSpec { func (in *PrometheusSpec) DeepCopyInto(out *PrometheusSpec) { *out = *in in.CommonPrometheusFields.DeepCopyInto(&out.CommonPrometheusFields) - if in.Runtime != nil { - in, out := &in.Runtime, &out.Runtime - *out = new(RuntimeConfig) - (*in).DeepCopyInto(*out) - } out.Rules = in.Rules if in.PrometheusRulesExcludedFromEnforce != nil { in, out := &in.PrometheusRulesExcludedFromEnforce, &out.PrometheusRulesExcludedFromEnforce @@ -2272,11 +2111,7 @@ func (in *PrometheusSpec) DeepCopyInto(out *PrometheusSpec) { *out = new(Exemplars) (*in).DeepCopyInto(*out) } - if in.RuleQueryOffset != nil { - in, out := &in.RuleQueryOffset, &out.RuleQueryOffset - *out = new(Duration) - **out = **in - } + out.TSDB = in.TSDB } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusSpec. @@ -2552,11 +2387,6 @@ func (in *RemoteReadSpec) DeepCopyInto(out *RemoteReadSpec) { (*out)[key] = val } } - if in.RemoteTimeout != nil { - in, out := &in.RemoteTimeout, &out.RemoteTimeout - *out = new(Duration) - **out = **in - } if in.Headers != nil { in, out := &in.Headers, &out.Headers *out = make(map[string]string, len(*in)) @@ -2610,16 +2440,6 @@ func (in *RemoteReadSpec) DeepCopy() *RemoteReadSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RemoteWriteSpec) DeepCopyInto(out *RemoteWriteSpec) { *out = *in - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - if in.MessageVersion != nil { - in, out := &in.MessageVersion, &out.MessageVersion - *out = new(RemoteWriteMessageVersion) - **out = **in - } if in.SendExemplars != nil { in, out := &in.SendExemplars, &out.SendExemplars *out = new(bool) @@ -2630,11 +2450,6 @@ func (in *RemoteWriteSpec) DeepCopyInto(out *RemoteWriteSpec) { *out = new(bool) **out = **in } - if in.RemoteTimeout != nil { - in, out := &in.RemoteTimeout, &out.RemoteTimeout - *out = new(Duration) - **out = **in - } if in.Headers != nil { in, out := &in.Headers, &out.Headers *out = make(map[string]string, len(*in)) @@ -2760,11 +2575,6 @@ func (in *RuleGroup) DeepCopyInto(out *RuleGroup) { *out = new(Duration) **out = **in } - if in.QueryOffset != nil { - in, out := &in.QueryOffset, &out.QueryOffset - *out = new(Duration) - **out = **in - } if in.Rules != nil { in, out := &in.Rules, &out.Rules *out = make([]Rule, len(*in)) @@ -2820,26 +2630,6 @@ func (in *RulesAlert) DeepCopy() *RulesAlert { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RuntimeConfig) DeepCopyInto(out *RuntimeConfig) { - *out = *in - if in.GoGC != nil { - in, out := &in.GoGC, &out.GoGC - *out = new(int32) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuntimeConfig. -func (in *RuntimeConfig) DeepCopy() *RuntimeConfig { - if in == nil { - return nil - } - out := new(RuntimeConfig) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SafeAuthorization) DeepCopyInto(out *SafeAuthorization) { *out = *in @@ -2880,16 +2670,6 @@ func (in *SafeTLSConfig) DeepCopyInto(out *SafeTLSConfig) { *out = new(bool) **out = **in } - if in.MinVersion != nil { - in, out := &in.MinVersion, &out.MinVersion - *out = new(TLSVersion) - **out = **in - } - if in.MaxVersion != nil { - in, out := &in.MaxVersion, &out.MaxVersion - *out = new(TLSVersion) - **out = **in - } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SafeTLSConfig. @@ -2929,11 +2709,6 @@ func (in *ScrapeClass) DeepCopyInto(out *ScrapeClass) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - if in.AttachMetadata != nil { - in, out := &in.AttachMetadata, &out.AttachMetadata - *out = new(AttachMetadata) - (*in).DeepCopyInto(*out) - } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScrapeClass. @@ -3069,7 +2844,6 @@ func (in *ServiceMonitorSpec) DeepCopyInto(out *ServiceMonitorSpec) { *out = new(uint64) **out = **in } - in.NativeHistogramConfig.DeepCopyInto(&out.NativeHistogramConfig) if in.KeepDroppedTargets != nil { in, out := &in.KeepDroppedTargets, &out.KeepDroppedTargets *out = new(uint64) @@ -3187,11 +2961,6 @@ func (in *TLSConfig) DeepCopy() *TLSConfig { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TSDBSpec) DeepCopyInto(out *TSDBSpec) { *out = *in - if in.OutOfOrderTimeWindow != nil { - in, out := &in.OutOfOrderTimeWindow, &out.OutOfOrderTimeWindow - *out = new(Duration) - **out = **in - } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TSDBSpec. @@ -3301,16 +3070,6 @@ func (in *ThanosRulerSpec) DeepCopyInto(out *ThanosRulerSpec) { *out = new(corev1.PodSecurityContext) (*in).DeepCopyInto(*out) } - if in.DNSPolicy != nil { - in, out := &in.DNSPolicy, &out.DNSPolicy - *out = new(DNSPolicy) - **out = **in - } - if in.DNSConfig != nil { - in, out := &in.DNSConfig, &out.DNSConfig - *out = new(PodDNSConfig) - (*in).DeepCopyInto(*out) - } if in.Storage != nil { in, out := &in.Storage, &out.Storage *out = new(StorageSpec) @@ -3660,9 +3419,9 @@ func (in *WebHTTPHeaders) DeepCopy() *WebHTTPHeaders { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WebTLSConfig) DeepCopyInto(out *WebTLSConfig) { *out = *in + in.KeySecret.DeepCopyInto(&out.KeySecret) in.Cert.DeepCopyInto(&out.Cert) in.ClientCA.DeepCopyInto(&out.ClientCA) - in.KeySecret.DeepCopyInto(&out.KeySecret) if in.CipherSuites != nil { in, out := &in.CipherSuites, &out.CipherSuites *out = make([]string, len(*in)) diff --git a/vendor/modules.txt b/vendor/modules.txt index 3766694bb..7ecfbdd2a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -179,8 +179,8 @@ github.com/operator-framework/api/pkg/operators/v1alpha1 # github.com/pkg/errors v0.9.1 ## explicit github.com/pkg/errors -# github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.78.1 -## explicit; go 1.23 +# github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.75.2 +## explicit; go 1.22.0 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1 # github.com/prometheus/client_golang v1.19.1