diff --git a/.ci-operator.yaml b/.ci-operator.yaml index 810dbb511..1a05e6069 100644 --- a/.ci-operator.yaml +++ b/.ci-operator.yaml @@ -1,4 +1,4 @@ build_root_image: name: tools namespace: openstack-k8s-operators - tag: ci-build-root-golang-1.21-sdk-1.31 + tag: ci-build-root-golang-1.24-sdk-1.31 diff --git a/.github/workflows/build-telemetry-operator.yaml b/.github/workflows/build-telemetry-operator.yaml index 796ce273a..38628439d 100644 --- a/.github/workflows/build-telemetry-operator.yaml +++ b/.github/workflows/build-telemetry-operator.yaml @@ -15,7 +15,7 @@ jobs: uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/reusable-build-operator.yaml@main with: operator_name: telemetry - go_version: 1.21.x + go_version: 1.24.x operator_sdk_version: 1.31.0 secrets: IMAGENAMESPACE: ${{ secrets.IMAGENAMESPACE }} diff --git a/.github/workflows/force-bump-pr-manual.yaml b/.github/workflows/force-bump-pr-manual.yaml index 2013075c6..2b02ec55f 100644 --- a/.github/workflows/force-bump-pr-manual.yaml +++ b/.github/workflows/force-bump-pr-manual.yaml @@ -9,5 +9,6 @@ jobs: with: operator_name: telemetry branch_name: ${{ github.ref_name }} + custom_image: quay.io/openstack-k8s-operators/openstack-k8s-operators-ci-build-tools:golang-1.24-sdk-1.31 secrets: FORCE_BUMP_PULL_REQUEST_PAT: ${{ secrets.FORCE_BUMP_PULL_REQUEST_PAT }} diff --git a/.github/workflows/force-bump-pr-scheduled.yaml b/.github/workflows/force-bump-pr-scheduled.yaml index bdf93ea2b..b060f3f15 100644 --- a/.github/workflows/force-bump-pr-scheduled.yaml +++ b/.github/workflows/force-bump-pr-scheduled.yaml @@ -10,5 +10,6 @@ jobs: uses: openstack-k8s-operators/openstack-k8s-operators-ci/.github/workflows/force-bump-branches.yaml@main with: operator_name: telemetry + custom_image: quay.io/openstack-k8s-operators/openstack-k8s-operators-ci-build-tools:golang-1.24-sdk-1.31 secrets: FORCE_BUMP_PULL_REQUEST_PAT: ${{ secrets.FORCE_BUMP_PULL_REQUEST_PAT }} diff --git a/.golangci.yaml b/.golangci.yaml index 937a37eac..bfdf6541c 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,3 +1,5 @@ +version: 2 + linters: # Enable specific linter # https://golangci-lint.run/usage/linters/#enabled-by-default @@ -5,7 +7,14 @@ linters: - errorlint - revive - ginkgolinter - - gofmt - govet + - gosec + - errname + - err113 + +formatters: + enable: + - gofmt + run: timeout: 5m diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ff527db1d..fa11165a3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -63,7 +63,7 @@ repos: entry: bashate --error . --ignore=E006,E040,E011,E020,E012 - repo: https://github.com/golangci/golangci-lint - rev: v1.59.1 + rev: v2.4.0 hooks: - id: golangci-lint-full args: ["-v"] diff --git a/Dockerfile b/Dockerfile index 90b96b9f9..fddb0a0bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.21 +ARG GOLANG_BUILDER=registry.access.redhat.com/ubi9/go-toolset:1.24 ARG OPERATOR_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal:latest # Build the manager binary diff --git a/Makefile b/Makefile index 528fb24b4..1b7a97ea8 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ OPERATOR_SDK_VERSION ?= v1.31.0 DEFAULT_IMG ?= quay.io/openstack-k8s-operators/telemetry-operator:latest IMG ?= $(DEFAULT_IMG) # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. -ENVTEST_K8S_VERSION = 1.29 +ENVTEST_K8S_VERSION = 1.31 # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) @@ -198,8 +198,8 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest ## Tool Versions KUSTOMIZE_VERSION ?= v3.8.7 -CONTROLLER_TOOLS_VERSION ?= v0.14.0 -GOTOOLCHAIN_VERSION ?= go1.21.0 +CONTROLLER_TOOLS_VERSION ?= v0.18.0 +GOTOOLCHAIN_VERSION ?= go1.24.0 KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" .PHONY: kustomize @@ -220,7 +220,7 @@ $(CONTROLLER_GEN): $(LOCALBIN) .PHONY: envtest envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. $(ENVTEST): $(LOCALBIN) - test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@c7e1dc9b + test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest .PHONY: operator-sdk OPERATOR_SDK ?= $(LOCALBIN)/operator-sdk diff --git a/api/bases/telemetry.openstack.org_autoscalings.yaml b/api/bases/telemetry.openstack.org_autoscalings.yaml index 4cfabab58..7c7d682bc 100644 --- a/api/bases/telemetry.openstack.org_autoscalings.yaml +++ b/api/bases/telemetry.openstack.org_autoscalings.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: autoscalings.telemetry.openstack.org spec: group: telemetry.openstack.org @@ -95,7 +95,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. logging.conf or policy.json. But can also be used to add additional files. Those get added to the service config dir in /etc/ . - TODO: -> implement type: object evaluatorImage: type: string @@ -143,7 +142,7 @@ spec: Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ type: object labels: additionalProperties: @@ -152,7 +151,7 @@ spec: Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ type: object type: object spec: @@ -395,10 +394,13 @@ spec: valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its key must be defined diff --git a/api/bases/telemetry.openstack.org_ceilometers.yaml b/api/bases/telemetry.openstack.org_ceilometers.yaml index 824f5daa5..99fd948a1 100644 --- a/api/bases/telemetry.openstack.org_ceilometers.yaml +++ b/api/bases/telemetry.openstack.org_ceilometers.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: ceilometers.telemetry.openstack.org spec: group: telemetry.openstack.org @@ -133,7 +133,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. logging.conf or policy.json. But can also be used to add additional files. Those get added to the service config dir in /etc/ . - TODO: -> implement type: object ipmiImage: type: string diff --git a/api/bases/telemetry.openstack.org_loggings.yaml b/api/bases/telemetry.openstack.org_loggings.yaml index 1f4022e1c..b80f84cd0 100644 --- a/api/bases/telemetry.openstack.org_loggings.yaml +++ b/api/bases/telemetry.openstack.org_loggings.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: loggings.telemetry.openstack.org spec: group: telemetry.openstack.org diff --git a/api/bases/telemetry.openstack.org_metricstorages.yaml b/api/bases/telemetry.openstack.org_metricstorages.yaml index bacf517e2..6dacddaf4 100644 --- a/api/bases/telemetry.openstack.org_metricstorages.yaml +++ b/api/bases/telemetry.openstack.org_metricstorages.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: metricstorages.telemetry.openstack.org spec: group: telemetry.openstack.org @@ -110,11 +110,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -156,6 +158,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: description: |- dataSource field can be used to specify either: @@ -295,11 +298,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -327,8 +332,8 @@ spec: If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be 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/persistent-volumes#volumeattributesclass - (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. + More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ + (Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default). type: string volumeMode: description: |- @@ -351,10 +356,8 @@ spec: description: |- Authorization section for the URL. - It requires Prometheus >= v2.26.0. - Cannot be set at the same time as `sigv4`, `basicAuth`, `oauth2`, or `azureAd`. properties: credentials: @@ -366,10 +369,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its @@ -387,10 +393,8 @@ spec: description: |- Defines the authentication type. The value is case-insensitive. - "Basic" is not a supported value. - Default: "Bearer" type: string type: object @@ -398,10 +402,8 @@ spec: description: |- AzureAD for the URL. - It requires Prometheus >= v2.45.0. - Cannot be set at the same time as `authorization`, `basicAuth`, `oauth2`, or `sigv4`. properties: cloud: @@ -428,7 +430,6 @@ spec: OAuth defines the oauth config that is being used to authenticate. Cannot be set at the same time as `managedIdentity`. - It requires Prometheus >= v2.48.0. properties: clientId: @@ -448,10 +449,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -478,7 +482,6 @@ spec: description: |- BasicAuth configuration for the URL. - Cannot be set at the same time as `sigv4`, `authorization`, `oauth2`, or `azureAd`. properties: password: @@ -491,10 +494,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its @@ -514,10 +520,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its @@ -533,14 +542,12 @@ spec: *Warning: this field shouldn't be used because the token value appears in clear-text. Prefer using `authorization`.* - Deprecated: this will be removed in a future release. type: string bearerTokenFile: description: |- File from which to read bearer token for the URL. - Deprecated: this will be removed in a future release. Prefer using `authorization`. type: string enableHTTP2: @@ -553,7 +560,6 @@ spec: 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. - It requires Prometheus >= v2.25.0. type: object metadataConfig: @@ -575,17 +581,14 @@ spec: The name of the remote write queue, it must be unique if specified. The name is used in metrics and logging in order to differentiate queues. - It requires Prometheus >= v2.15.0. type: string oauth2: description: |- OAuth2 configuration for the URL. - It requires Prometheus >= v2.27.0. - Cannot be set at the same time as `sigv4`, `authorization`, `basicAuth`, or `azureAd`. properties: clientId: @@ -601,10 +604,13 @@ spec: description: The key to select. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap @@ -623,10 +629,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -647,10 +656,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its @@ -739,7 +751,6 @@ spec: 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. type: boolean sendNativeHistograms: @@ -747,17 +758,14 @@ spec: Enables sending of native histograms, also known as sparse histograms over remote write. - It requires Prometheus >= v2.40.0. type: boolean sigv4: description: |- Sigv4 allows to configures AWS's Signature Verification 4 for the URL. - It requires Prometheus >= v2.26.0. - Cannot be set at the same time as `authorization`, `basicAuth`, `oauth2`, or `azureAd`. properties: accessKey: @@ -770,10 +778,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its @@ -806,10 +817,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its @@ -835,10 +849,13 @@ spec: description: The key to select. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap @@ -857,10 +874,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -887,10 +907,13 @@ spec: description: The key to select. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap @@ -909,10 +932,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -943,10 +969,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its @@ -972,7 +1001,6 @@ spec: RelabelConfig allows dynamic rewriting of the label set for targets, alerts, scraped samples and remote write samples. - More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config properties: action: @@ -980,11 +1008,9 @@ spec: description: |- Action to perform based on the regex matching. - `Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0. `DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0. - Default: "Replace" enum: - replace @@ -1014,7 +1040,6 @@ spec: description: |- Modulus to take of the hash of the source label values. - Only applicable when the action is `HashMod`. format: int64 type: integer @@ -1027,7 +1052,6 @@ spec: Replacement value against which a Replace action is performed if the regular expression matches. - Regex capture groups are available. type: string separator: @@ -1050,11 +1074,9 @@ spec: description: |- Label to which the resulting string is written in a replacement. - It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and `DropEqual` actions. - Regex capture groups are available. type: string type: object @@ -1108,11 +1130,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1139,11 +1163,9 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers. items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. @@ -1154,6 +1176,12 @@ spec: the Pod where this field is used. It makes that resource available inside a container. type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. + type: string required: - name type: object @@ -1272,11 +1300,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string diff --git a/api/bases/telemetry.openstack.org_telemetries.yaml b/api/bases/telemetry.openstack.org_telemetries.yaml index 6c18bdfc4..11cf9354e 100644 --- a/api/bases/telemetry.openstack.org_telemetries.yaml +++ b/api/bases/telemetry.openstack.org_telemetries.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: telemetries.telemetry.openstack.org spec: group: telemetry.openstack.org @@ -98,7 +98,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. logging.conf or policy.json. But can also be used to add additional files. Those get added to the service config dir in /etc/ . - TODO: -> implement type: object evaluatorImage: type: string @@ -146,7 +145,7 @@ spec: Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ type: object labels: additionalProperties: @@ -155,7 +154,7 @@ spec: Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ type: object type: object spec: @@ -403,10 +402,13 @@ spec: a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its key must be @@ -443,7 +445,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. logging.conf or policy.json. But can also be used to add additional files. Those get added to the service config dir in /etc/ . - TODO: -> implement type: object enabled: default: true @@ -696,11 +697,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -742,6 +745,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: description: |- dataSource field can be used to specify either: @@ -886,11 +890,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -918,8 +924,8 @@ spec: If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be 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/persistent-volumes#volumeattributesclass - (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. + More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ + (Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default). type: string volumeMode: description: |- @@ -942,10 +948,8 @@ spec: description: |- Authorization section for the URL. - It requires Prometheus >= v2.26.0. - Cannot be set at the same time as `sigv4`, `basicAuth`, `oauth2`, or `azureAd`. properties: credentials: @@ -958,10 +962,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -979,10 +986,8 @@ spec: description: |- Defines the authentication type. The value is case-insensitive. - "Basic" is not a supported value. - Default: "Bearer" type: string type: object @@ -990,10 +995,8 @@ spec: description: |- AzureAD for the URL. - It requires Prometheus >= v2.45.0. - Cannot be set at the same time as `authorization`, `basicAuth`, `oauth2`, or `sigv4`. properties: cloud: @@ -1020,7 +1023,6 @@ spec: OAuth defines the oauth config that is being used to authenticate. Cannot be set at the same time as `managedIdentity`. - It requires Prometheus >= v2.48.0. properties: clientId: @@ -1041,10 +1043,13 @@ spec: key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1071,7 +1076,6 @@ spec: description: |- BasicAuth configuration for the URL. - Cannot be set at the same time as `sigv4`, `authorization`, `oauth2`, or `azureAd`. properties: password: @@ -1084,10 +1088,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1107,10 +1114,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1126,14 +1136,12 @@ spec: *Warning: this field shouldn't be used because the token value appears in clear-text. Prefer using `authorization`.* - Deprecated: this will be removed in a future release. type: string bearerTokenFile: description: |- File from which to read bearer token for the URL. - Deprecated: this will be removed in a future release. Prefer using `authorization`. type: string enableHTTP2: @@ -1146,7 +1154,6 @@ spec: 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. - It requires Prometheus >= v2.25.0. type: object metadataConfig: @@ -1168,17 +1175,14 @@ spec: The name of the remote write queue, it must be unique if specified. The name is used in metrics and logging in order to differentiate queues. - It requires Prometheus >= v2.15.0. type: string oauth2: description: |- OAuth2 configuration for the URL. - It requires Prometheus >= v2.27.0. - Cannot be set at the same time as `sigv4`, `authorization`, `basicAuth`, or `azureAd`. properties: clientId: @@ -1194,10 +1198,13 @@ spec: description: The key to select. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap @@ -1217,10 +1224,13 @@ spec: key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1241,10 +1251,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1334,7 +1347,6 @@ spec: 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. type: boolean sendNativeHistograms: @@ -1342,17 +1354,14 @@ spec: Enables sending of native histograms, also known as sparse histograms over remote write. - It requires Prometheus >= v2.40.0. type: boolean sigv4: description: |- Sigv4 allows to configures AWS's Signature Verification 4 for the URL. - It requires Prometheus >= v2.26.0. - Cannot be set at the same time as `authorization`, `basicAuth`, `oauth2`, or `azureAd`. properties: accessKey: @@ -1365,10 +1374,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1401,10 +1413,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1430,10 +1445,13 @@ spec: description: The key to select. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap @@ -1453,10 +1471,13 @@ spec: key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1483,10 +1504,13 @@ spec: description: The key to select. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap @@ -1506,10 +1530,13 @@ spec: key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1540,10 +1567,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1569,7 +1599,6 @@ spec: RelabelConfig allows dynamic rewriting of the label set for targets, alerts, scraped samples and remote write samples. - More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config properties: action: @@ -1577,11 +1606,9 @@ spec: description: |- Action to perform based on the regex matching. - `Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0. `DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0. - Default: "Replace" enum: - replace @@ -1611,7 +1638,6 @@ spec: description: |- Modulus to take of the hash of the source label values. - Only applicable when the action is `HashMod`. format: int64 type: integer @@ -1624,7 +1650,6 @@ spec: Replacement value against which a Replace action is performed if the regular expression matches. - Regex capture groups are available. type: string separator: @@ -1647,11 +1672,9 @@ spec: description: |- Label to which the resulting string is written in a replacement. - It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and `DropEqual` actions. - Regex capture groups are available. type: string type: object @@ -1705,11 +1728,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1736,11 +1761,9 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers. items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. @@ -1751,6 +1774,12 @@ spec: the Pod where this field is used. It makes that resource available inside a container. type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. + type: string required: - name type: object @@ -1875,11 +1904,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string diff --git a/api/go.mod b/api/go.mod index 45ced249b..b04ab2dbf 100644 --- a/api/go.mod +++ b/api/go.mod @@ -1,26 +1,27 @@ module github.com/openstack-k8s-operators/telemetry-operator/api -go 1.21 +go 1.24 require ( github.com/onsi/ginkgo/v2 v2.20.1 github.com/onsi/gomega v1.34.1 - github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250821143610-c8ef7b9a21ec - github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250823121217-7e1cd2e3dd03 + github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250922155301-057562fb7182 + github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250922082314-c83d83092a04 github.com/rhobs/observability-operator v0.3.1 - k8s.io/api v0.29.15 - k8s.io/apimachinery v0.29.15 - k8s.io/client-go v0.29.15 - sigs.k8s.io/controller-runtime v0.17.6 + k8s.io/api v0.31.12 + k8s.io/apimachinery v0.31.12 + k8s.io/client-go v0.31.12 + sigs.k8s.io/controller-runtime v0.19.7 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/emicklei/go-restful/v3 v3.12.0 // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/zapr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect @@ -43,34 +44,32 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.13.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring v0.71.0-rhobs1 // indirect - github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/spf13/pflag v1.0.5 // indirect + github.com/x448/float16 v0.8.4 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect golang.org/x/net v0.28.0 // indirect - golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sys v0.23.0 // indirect golang.org/x/term v0.23.0 // indirect golang.org/x/text v0.17.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.24.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.29.15 // indirect - k8s.io/component-base v0.29.15 // indirect - k8s.io/klog/v2 v2.120.1 // indirect + k8s.io/apiextensions-apiserver v0.31.12 // indirect + k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240322212309-b815d8309940 // indirect - k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect + k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect diff --git a/api/go.sum b/api/go.sum index 52e132f55..b01e589be 100644 --- a/api/go.sum +++ b/api/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -14,6 +14,8 @@ github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0 github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= @@ -30,13 +32,10 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 h1:0VpGH+cDhbDtdcweoyCVsF3fhN8kejK6rFe/2FFX2nU= github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49/go.mod h1:BkkQ4L1KS1xMt2aWSPStnn55ChGC0DPOn2FQYj+f25M= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -72,23 +71,23 @@ github.com/onsi/ginkgo/v2 v2.20.1 h1:YlVIbqct+ZmnEph770q9Q7NVAz4wwIiVNahee6JyUzo github.com/onsi/ginkgo/v2 v2.20.1/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= -github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250821143610-c8ef7b9a21ec h1:Jvz2BuTWCvjeCbDzpPzlPMrUQpEe04Rzi8LPNxeW0Ts= -github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250821143610-c8ef7b9a21ec/go.mod h1:Dv8qpmBIQy3Jv/EyQnOyc0w61X8vyfxpjcIQONP5CwY= -github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250823121217-7e1cd2e3dd03 h1:9VanDdvg1APf9B1nzGElLvWr6dM5GsSayMLSV/nJZnE= -github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250823121217-7e1cd2e3dd03/go.mod h1:Z+rmtn3qhuPZfx2EDVmloUh2MkYbvDMgcpJneRYerS0= +github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250922155301-057562fb7182 h1:Ea+FZQOW0Eha1jorgSECFeqI9UrKz8TZlGnSM7X8Yf4= +github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250922155301-057562fb7182/go.mod h1:3Im8PFiRKPaOZpOuqYShJRN2O2pfjUuhDTUpW4KMHZw= +github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250922082314-c83d83092a04 h1:JqJd39rF8rD9KIHmOEFbHP8UyYgttfuouj+kAFNtymU= +github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250922082314-c83d83092a04/go.mod h1:SmKRclrynSSRCXSLOoWlETalJPvt62ObHsfW8iPvtDA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 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/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= -github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= -github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= +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.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring v0.71.0-rhobs1 h1:NBdZFQUVKllUnmh6suuH02+K8VS8ibErnOhxNiH+aio= github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring v0.71.0-rhobs1/go.mod h1:oDJbA/Byh5LNU7zBgBZYRM5263mgL16NtysHl/uVtGY= github.com/rhobs/observability-operator v0.3.1 h1:vVGCt/a7Ds5VeqikaKZJz18oOPV9p4YUaezlVlwdpIM= @@ -101,9 +100,10 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -113,43 +113,30 @@ go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= -golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= -golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= @@ -158,7 +145,6 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -167,15 +153,13 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -183,24 +167,22 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 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.29.15 h1:QxPcAheYujeBwkdiE0vMyKkAtqUq5YNyXVqimT+me44= -k8s.io/api v0.29.15/go.mod h1:16duIp2ez6GiLPq1g8XtZNIkw6hJpIitpxZSvv0dZ6E= -k8s.io/apiextensions-apiserver v0.29.15 h1:XI5axgsWqMlIIgpHbcz5vPjk06i3ibHv5FUdSfdtQLU= -k8s.io/apiextensions-apiserver v0.29.15/go.mod h1:6ZU61z32I8WUwbBTPIANUesTj5G40sZek0ojmeoMJI8= -k8s.io/apimachinery v0.29.15 h1:aLc0wghElkdnTO7TMVTxTrifoXah1lqRL8s6szDHGbg= -k8s.io/apimachinery v0.29.15/go.mod h1:i3FJVwhvSp/6n8Fl4K97PJEP8C+MM+aoDq4+ZJBf70Y= -k8s.io/client-go v0.29.15 h1:zCBOXKCtz9Hl8boKUGs8zbtZEP6pc7O8Ov3ma+gnS6o= -k8s.io/client-go v0.29.15/go.mod h1:xPy0D3p4sonPhZhI3QoYo4m7oLKoPjFf4vYF9oxoxNM= -k8s.io/component-base v0.29.15 h1:CvmXXTDyk43FDaiJ/Rp+yWFjw6hkUI2t7mIJUrK5j00= -k8s.io/component-base v0.29.15/go.mod h1:jH/sbuvmXew2Fz2iIKNMeNw8o/d1KR9tAg6uekQKnVk= -k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= -k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/api v0.31.12 h1:yysm83xHIoKAwfm2w0dT6Yz7vfWzl841AEMI7Y8wDa8= +k8s.io/api v0.31.12/go.mod h1:f/srhhI7aDs9K4s0W1GX4/zb+cIf5uWrBjGyoO/XgJc= +k8s.io/apiextensions-apiserver v0.31.12 h1:d32I3VReAly5Qoc9ZXhO4/iObYmm7Jk6VvAeRAbg/MA= +k8s.io/apiextensions-apiserver v0.31.12/go.mod h1:KcBI/Z/WQmbffBwfqQmqHhALhvun5JNJJh8Y29CJwUo= +k8s.io/apimachinery v0.31.12 h1:y34W8rNKc+jDxUvEXarjahqM6vOV5iqgZPuRqRuyEh8= +k8s.io/apimachinery v0.31.12/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.12 h1:JJhouOoU1bKdPWplkZ2CpYA74+lxj3Zsn15aoGLX6Hk= +k8s.io/client-go v0.31.12/go.mod h1:kjQ5WSec9ShP3T1auTDFW4bTqgmJdBuZPsjq5FqeuYE= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240322212309-b815d8309940 h1:qVoMaQV5t62UUvHe16Q3eb2c5HPzLHYzsi0Tu/xLndo= k8s.io/kube-openapi v0.0.0-20240322212309-b815d8309940/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.17.6 h1:12IXsozEsIXWAMRpgRlYS1jjAHQXHtWEOMdULh3DbEw= -sigs.k8s.io/controller-runtime v0.17.6/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY= +k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d h1:wAhiDyZ4Tdtt7e46e9M5ZSAJ/MnPGPs+Ki1gHw4w1R0= +k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/controller-runtime v0.19.7 h1:DLABZfMr20A+AwCZOHhcbcu+TqBXnJZaVBri9K3EO48= +sigs.k8s.io/controller-runtime v0.19.7/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= diff --git a/config/crd/bases/telemetry.openstack.org_autoscalings.yaml b/config/crd/bases/telemetry.openstack.org_autoscalings.yaml index 4cfabab58..7c7d682bc 100644 --- a/config/crd/bases/telemetry.openstack.org_autoscalings.yaml +++ b/config/crd/bases/telemetry.openstack.org_autoscalings.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: autoscalings.telemetry.openstack.org spec: group: telemetry.openstack.org @@ -95,7 +95,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. logging.conf or policy.json. But can also be used to add additional files. Those get added to the service config dir in /etc/ . - TODO: -> implement type: object evaluatorImage: type: string @@ -143,7 +142,7 @@ spec: Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ type: object labels: additionalProperties: @@ -152,7 +151,7 @@ spec: Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ type: object type: object spec: @@ -395,10 +394,13 @@ spec: valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its key must be defined diff --git a/config/crd/bases/telemetry.openstack.org_ceilometers.yaml b/config/crd/bases/telemetry.openstack.org_ceilometers.yaml index 824f5daa5..99fd948a1 100644 --- a/config/crd/bases/telemetry.openstack.org_ceilometers.yaml +++ b/config/crd/bases/telemetry.openstack.org_ceilometers.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: ceilometers.telemetry.openstack.org spec: group: telemetry.openstack.org @@ -133,7 +133,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. logging.conf or policy.json. But can also be used to add additional files. Those get added to the service config dir in /etc/ . - TODO: -> implement type: object ipmiImage: type: string diff --git a/config/crd/bases/telemetry.openstack.org_loggings.yaml b/config/crd/bases/telemetry.openstack.org_loggings.yaml index 1f4022e1c..b80f84cd0 100644 --- a/config/crd/bases/telemetry.openstack.org_loggings.yaml +++ b/config/crd/bases/telemetry.openstack.org_loggings.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: loggings.telemetry.openstack.org spec: group: telemetry.openstack.org diff --git a/config/crd/bases/telemetry.openstack.org_metricstorages.yaml b/config/crd/bases/telemetry.openstack.org_metricstorages.yaml index bacf517e2..6dacddaf4 100644 --- a/config/crd/bases/telemetry.openstack.org_metricstorages.yaml +++ b/config/crd/bases/telemetry.openstack.org_metricstorages.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: metricstorages.telemetry.openstack.org spec: group: telemetry.openstack.org @@ -110,11 +110,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -156,6 +158,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: description: |- dataSource field can be used to specify either: @@ -295,11 +298,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -327,8 +332,8 @@ spec: If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be 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/persistent-volumes#volumeattributesclass - (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. + More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ + (Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default). type: string volumeMode: description: |- @@ -351,10 +356,8 @@ spec: description: |- Authorization section for the URL. - It requires Prometheus >= v2.26.0. - Cannot be set at the same time as `sigv4`, `basicAuth`, `oauth2`, or `azureAd`. properties: credentials: @@ -366,10 +369,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its @@ -387,10 +393,8 @@ spec: description: |- Defines the authentication type. The value is case-insensitive. - "Basic" is not a supported value. - Default: "Bearer" type: string type: object @@ -398,10 +402,8 @@ spec: description: |- AzureAD for the URL. - It requires Prometheus >= v2.45.0. - Cannot be set at the same time as `authorization`, `basicAuth`, `oauth2`, or `sigv4`. properties: cloud: @@ -428,7 +430,6 @@ spec: OAuth defines the oauth config that is being used to authenticate. Cannot be set at the same time as `managedIdentity`. - It requires Prometheus >= v2.48.0. properties: clientId: @@ -448,10 +449,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -478,7 +482,6 @@ spec: description: |- BasicAuth configuration for the URL. - Cannot be set at the same time as `sigv4`, `authorization`, `oauth2`, or `azureAd`. properties: password: @@ -491,10 +494,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its @@ -514,10 +520,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its @@ -533,14 +542,12 @@ spec: *Warning: this field shouldn't be used because the token value appears in clear-text. Prefer using `authorization`.* - Deprecated: this will be removed in a future release. type: string bearerTokenFile: description: |- File from which to read bearer token for the URL. - Deprecated: this will be removed in a future release. Prefer using `authorization`. type: string enableHTTP2: @@ -553,7 +560,6 @@ spec: 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. - It requires Prometheus >= v2.25.0. type: object metadataConfig: @@ -575,17 +581,14 @@ spec: The name of the remote write queue, it must be unique if specified. The name is used in metrics and logging in order to differentiate queues. - It requires Prometheus >= v2.15.0. type: string oauth2: description: |- OAuth2 configuration for the URL. - It requires Prometheus >= v2.27.0. - Cannot be set at the same time as `sigv4`, `authorization`, `basicAuth`, or `azureAd`. properties: clientId: @@ -601,10 +604,13 @@ spec: description: The key to select. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap @@ -623,10 +629,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -647,10 +656,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its @@ -739,7 +751,6 @@ spec: 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. type: boolean sendNativeHistograms: @@ -747,17 +758,14 @@ spec: Enables sending of native histograms, also known as sparse histograms over remote write. - It requires Prometheus >= v2.40.0. type: boolean sigv4: description: |- Sigv4 allows to configures AWS's Signature Verification 4 for the URL. - It requires Prometheus >= v2.26.0. - Cannot be set at the same time as `authorization`, `basicAuth`, `oauth2`, or `azureAd`. properties: accessKey: @@ -770,10 +778,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its @@ -806,10 +817,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its @@ -835,10 +849,13 @@ spec: description: The key to select. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap @@ -857,10 +874,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -887,10 +907,13 @@ spec: description: The key to select. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap @@ -909,10 +932,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -943,10 +969,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its @@ -972,7 +1001,6 @@ spec: RelabelConfig allows dynamic rewriting of the label set for targets, alerts, scraped samples and remote write samples. - More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config properties: action: @@ -980,11 +1008,9 @@ spec: description: |- Action to perform based on the regex matching. - `Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0. `DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0. - Default: "Replace" enum: - replace @@ -1014,7 +1040,6 @@ spec: description: |- Modulus to take of the hash of the source label values. - Only applicable when the action is `HashMod`. format: int64 type: integer @@ -1027,7 +1052,6 @@ spec: Replacement value against which a Replace action is performed if the regular expression matches. - Regex capture groups are available. type: string separator: @@ -1050,11 +1074,9 @@ spec: description: |- Label to which the resulting string is written in a replacement. - It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and `DropEqual` actions. - Regex capture groups are available. type: string type: object @@ -1108,11 +1130,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1139,11 +1163,9 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers. items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. @@ -1154,6 +1176,12 @@ spec: the Pod where this field is used. It makes that resource available inside a container. type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. + type: string required: - name type: object @@ -1272,11 +1300,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string diff --git a/config/crd/bases/telemetry.openstack.org_telemetries.yaml b/config/crd/bases/telemetry.openstack.org_telemetries.yaml index 6c18bdfc4..11cf9354e 100644 --- a/config/crd/bases/telemetry.openstack.org_telemetries.yaml +++ b/config/crd/bases/telemetry.openstack.org_telemetries.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.18.0 name: telemetries.telemetry.openstack.org spec: group: telemetry.openstack.org @@ -98,7 +98,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. logging.conf or policy.json. But can also be used to add additional files. Those get added to the service config dir in /etc/ . - TODO: -> implement type: object evaluatorImage: type: string @@ -146,7 +145,7 @@ spec: Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ type: object labels: additionalProperties: @@ -155,7 +154,7 @@ spec: Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ type: object type: object spec: @@ -403,10 +402,13 @@ spec: a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret or its key must be @@ -443,7 +445,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. logging.conf or policy.json. But can also be used to add additional files. Those get added to the service config dir in /etc/ . - TODO: -> implement type: object enabled: default: true @@ -696,11 +697,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -742,6 +745,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic dataSource: description: |- dataSource field can be used to specify either: @@ -886,11 +890,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -918,8 +924,8 @@ spec: If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be 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/persistent-volumes#volumeattributesclass - (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. + More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ + (Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default). type: string volumeMode: description: |- @@ -942,10 +948,8 @@ spec: description: |- Authorization section for the URL. - It requires Prometheus >= v2.26.0. - Cannot be set at the same time as `sigv4`, `basicAuth`, `oauth2`, or `azureAd`. properties: credentials: @@ -958,10 +962,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -979,10 +986,8 @@ spec: description: |- Defines the authentication type. The value is case-insensitive. - "Basic" is not a supported value. - Default: "Bearer" type: string type: object @@ -990,10 +995,8 @@ spec: description: |- AzureAD for the URL. - It requires Prometheus >= v2.45.0. - Cannot be set at the same time as `authorization`, `basicAuth`, `oauth2`, or `sigv4`. properties: cloud: @@ -1020,7 +1023,6 @@ spec: OAuth defines the oauth config that is being used to authenticate. Cannot be set at the same time as `managedIdentity`. - It requires Prometheus >= v2.48.0. properties: clientId: @@ -1041,10 +1043,13 @@ spec: key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1071,7 +1076,6 @@ spec: description: |- BasicAuth configuration for the URL. - Cannot be set at the same time as `sigv4`, `authorization`, `oauth2`, or `azureAd`. properties: password: @@ -1084,10 +1088,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1107,10 +1114,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1126,14 +1136,12 @@ spec: *Warning: this field shouldn't be used because the token value appears in clear-text. Prefer using `authorization`.* - Deprecated: this will be removed in a future release. type: string bearerTokenFile: description: |- File from which to read bearer token for the URL. - Deprecated: this will be removed in a future release. Prefer using `authorization`. type: string enableHTTP2: @@ -1146,7 +1154,6 @@ spec: 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. - It requires Prometheus >= v2.25.0. type: object metadataConfig: @@ -1168,17 +1175,14 @@ spec: The name of the remote write queue, it must be unique if specified. The name is used in metrics and logging in order to differentiate queues. - It requires Prometheus >= v2.15.0. type: string oauth2: description: |- OAuth2 configuration for the URL. - It requires Prometheus >= v2.27.0. - Cannot be set at the same time as `sigv4`, `authorization`, `basicAuth`, or `azureAd`. properties: clientId: @@ -1194,10 +1198,13 @@ spec: description: The key to select. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap @@ -1217,10 +1224,13 @@ spec: key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1241,10 +1251,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1334,7 +1347,6 @@ spec: 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. type: boolean sendNativeHistograms: @@ -1342,17 +1354,14 @@ spec: Enables sending of native histograms, also known as sparse histograms over remote write. - It requires Prometheus >= v2.40.0. type: boolean sigv4: description: |- Sigv4 allows to configures AWS's Signature Verification 4 for the URL. - It requires Prometheus >= v2.26.0. - Cannot be set at the same time as `authorization`, `basicAuth`, `oauth2`, or `azureAd`. properties: accessKey: @@ -1365,10 +1374,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1401,10 +1413,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1430,10 +1445,13 @@ spec: description: The key to select. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap @@ -1453,10 +1471,13 @@ spec: key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1483,10 +1504,13 @@ spec: description: The key to select. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the ConfigMap @@ -1506,10 +1530,13 @@ spec: key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1540,10 +1567,13 @@ spec: from. Must be a valid secret key. type: string name: + default: "" description: |- Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? type: string optional: description: Specify whether the Secret @@ -1569,7 +1599,6 @@ spec: RelabelConfig allows dynamic rewriting of the label set for targets, alerts, scraped samples and remote write samples. - More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config properties: action: @@ -1577,11 +1606,9 @@ spec: description: |- Action to perform based on the regex matching. - `Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0. `DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0. - Default: "Replace" enum: - replace @@ -1611,7 +1638,6 @@ spec: description: |- Modulus to take of the hash of the source label values. - Only applicable when the action is `HashMod`. format: int64 type: integer @@ -1624,7 +1650,6 @@ spec: Replacement value against which a Replace action is performed if the regular expression matches. - Regex capture groups are available. type: string separator: @@ -1647,11 +1672,9 @@ spec: description: |- Label to which the resulting string is written in a replacement. - It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`, `KeepEqual` and `DropEqual` actions. - Regex capture groups are available. type: string type: object @@ -1705,11 +1728,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string @@ -1736,11 +1761,9 @@ spec: Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - This field is immutable. It can only be set for containers. items: description: ResourceClaim references one entry in PodSpec.ResourceClaims. @@ -1751,6 +1774,12 @@ spec: the Pod where this field is used. It makes that resource available inside a container. type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. + type: string required: - name type: object @@ -1875,11 +1904,13 @@ spec: items: type: string type: array + x-kubernetes-list-type: atomic required: - key - operator type: object type: array + x-kubernetes-list-type: atomic matchLabels: additionalProperties: type: string diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 022f8b579..7ef77f99a 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -7,37 +7,10 @@ rules: - apiGroups: - "" resources: - - serviceaccounts - verbs: - - create - - get - - list - - patch - - update - - watch -- apiGroups: - - apiextensions.k8s.io - resources: - - customresourcedefinitions - verbs: - - get - - list -- apiGroups: - - apps - resources: - - statefulsets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - batch - resources: - - jobs + - configmaps + - pods + - secrets + - services verbs: - create - delete @@ -49,31 +22,25 @@ rules: - apiGroups: - "" resources: - - configmaps + - serviceaccounts verbs: - create - - delete - get - list - patch - update - watch - apiGroups: - - "" + - apiextensions.k8s.io resources: - - pods + - customresourcedefinitions verbs: - - create - - delete - get - list - - patch - - update - - watch - apiGroups: - - "" + - apps resources: - - secrets + - statefulsets verbs: - create - delete @@ -83,9 +50,9 @@ rules: - update - watch - apiGroups: - - "" + - batch resources: - - services + - jobs verbs: - create - delete @@ -122,17 +89,6 @@ rules: - keystone.openstack.org resources: - keystoneendpoints - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - keystone.openstack.org - resources: - keystoneservices verbs: - create @@ -154,24 +110,6 @@ rules: - mariadb.openstack.org resources: - mariadbaccounts - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - mariadb.openstack.org - resources: - - mariadbaccounts/finalizers - verbs: - - patch - - update -- apiGroups: - - mariadb.openstack.org - resources: - mariadbdatabases verbs: - create @@ -184,6 +122,7 @@ rules: - apiGroups: - mariadb.openstack.org resources: + - mariadbaccounts/finalizers - mariadbdatabases/finalizers verbs: - patch @@ -200,28 +139,6 @@ rules: - monitoring.rhobs resources: - alertmanagers - verbs: - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - monitoring.rhobs - resources: - - monitoringstacks - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - monitoring.rhobs - resources: - prometheuses verbs: - delete @@ -233,18 +150,8 @@ rules: - apiGroups: - monitoring.rhobs resources: + - monitoringstacks - prometheusrules - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - monitoring.rhobs - resources: - scrapeconfigs verbs: - create @@ -312,16 +219,6 @@ rules: - rbac.authorization.k8s.io resources: - rolebindings - verbs: - - create - - get - - list - - patch - - update - - watch -- apiGroups: - - rbac.authorization.k8s.io - resources: - roles verbs: - create @@ -342,90 +239,10 @@ rules: - telemetry.openstack.org resources: - autoscalings - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - telemetry.openstack.org - resources: - - autoscalings/finalizers - verbs: - - delete - - patch - - update -- apiGroups: - - telemetry.openstack.org - resources: - - autoscalings/status - verbs: - - get - - patch - - update -- apiGroups: - - telemetry.openstack.org - resources: - ceilometers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - telemetry.openstack.org - resources: - - ceilometers/finalizers - verbs: - - delete - - patch - - update -- apiGroups: - - telemetry.openstack.org - resources: - - ceilometers/status - verbs: - - get - - patch - - update -- apiGroups: - - telemetry.openstack.org - resources: - loggings - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - telemetry.openstack.org - resources: - - loggings/finalizers - verbs: - - delete - - patch - - update -- apiGroups: - - telemetry.openstack.org - resources: - - loggings/status - verbs: - - get - - patch - - update -- apiGroups: - - telemetry.openstack.org - resources: - metricstorages + - telemetries verbs: - create - delete @@ -437,6 +254,9 @@ rules: - apiGroups: - telemetry.openstack.org resources: + - autoscalings/finalizers + - ceilometers/finalizers + - loggings/finalizers - metricstorages/finalizers verbs: - delete @@ -445,23 +265,15 @@ rules: - apiGroups: - telemetry.openstack.org resources: + - autoscalings/status + - ceilometers/status + - loggings/status - metricstorages/status + - telemetries/status verbs: - get - patch - update -- apiGroups: - - telemetry.openstack.org - resources: - - telemetries - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - apiGroups: - telemetry.openstack.org resources: @@ -469,14 +281,6 @@ rules: verbs: - patch - update -- apiGroups: - - telemetry.openstack.org - resources: - - telemetries/status - verbs: - - get - - patch - - update - apiGroups: - topology.openstack.org resources: diff --git a/controllers/aodh_controller.go b/controllers/aodh_controller.go index 31191bf4f..c4b20ebfa 100644 --- a/controllers/aodh_controller.go +++ b/controllers/aodh_controller.go @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package controllers contains the Kubernetes controllers for managing telemetry components package controllers import ( @@ -539,7 +540,7 @@ func (r *AutoscalingReconciler) reconcileNormalAodh( condition.TLSInputReadyCondition, condition.RequestedReason, condition.SeverityInfo, - fmt.Sprintf(condition.TLSInputReadyWaitingMessage, instance.Spec.Aodh.TLS.CaBundleSecretName))) + condition.TLSInputReadyWaitingMessage, instance.Spec.Aodh.TLS.CaBundleSecretName)) return ctrl.Result{}, nil } instance.Status.Conditions.Set(condition.FalseCondition( @@ -563,7 +564,7 @@ func (r *AutoscalingReconciler) reconcileNormalAodh( condition.TLSInputReadyCondition, condition.RequestedReason, condition.SeverityInfo, - fmt.Sprintf(condition.TLSInputReadyWaitingMessage, err.Error()))) + condition.TLSInputReadyWaitingMessage, err.Error())) return ctrl.Result{}, nil } instance.Status.Conditions.Set(condition.FalseCondition( diff --git a/controllers/autoscaling_controller.go b/controllers/autoscaling_controller.go index 8da664a5f..013633a5d 100644 --- a/controllers/autoscaling_controller.go +++ b/controllers/autoscaling_controller.go @@ -23,6 +23,7 @@ import ( "time" "github.com/openstack-k8s-operators/telemetry-operator/pkg/metricstorage" + telemetry "github.com/openstack-k8s-operators/telemetry-operator/pkg/telemetry" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" @@ -111,7 +112,7 @@ func (r *AutoscalingReconciler) Reconcile(ctx context.Context, req ctrl.Request) // Fetch the Autoscaling instance instance := &telemetryv1.Autoscaling{} - err := r.Client.Get(ctx, req.NamespacedName, instance) + err := r.Get(ctx, req.NamespacedName, instance) if err != nil { if k8s_errors.IsNotFound(err) { // Request object not found, could have been deleted after reconcile request. @@ -220,7 +221,7 @@ func (r *AutoscalingReconciler) Reconcile(ctx context.Context, req ctrl.Request) // fields to index to reconcile when change const ( autoscalingPasswordSecretField = ".spec.secret" - autoscalingCaBundleSecretNameField = ".spec.tls.caBundleSecretName" + autoscalingCaBundleSecretNameField = ".spec.tls.caBundleSecretName" //nolint:gosec // G101: Not actual credentials, just field path autoscalingTLSAPIInternalField = ".spec.tls.api.internal.secretName" autoscalingTLSAPIPublicField = ".spec.tls.api.public.secretName" autoscalingTLSField = ".spec.tls.secretName" @@ -453,7 +454,7 @@ func (r *AutoscalingReconciler) reconcileNormal( // NOTE: Always do this before calling the generateServiceConfig to get the newest values in the ServiceConfig // prometheusEndpointSecret := &corev1.Secret{} - err = r.Client.Get(ctx, client.ObjectKey{ + err = r.Get(ctx, client.ObjectKey{ Name: autoscaling.PrometheusEndpointSecret, Namespace: instance.Namespace, }, prometheusEndpointSecret) @@ -474,7 +475,10 @@ func (r *AutoscalingReconciler) reconcileNormal( if err != nil { return ctrlResult, err } - instance.Status.PrometheusPort = int32(port) + if port < 0 || port > 65535 { + return ctrlResult, fmt.Errorf("%w: %d", telemetry.ErrInvalidPortNumber, port) + } + instance.Status.PrometheusPort = int32(port) //nolint:gosec // G109: Port validated to be within valid range } } else { instance.Status.PrometheusPort = instance.Spec.PrometheusPort @@ -482,7 +486,7 @@ func (r *AutoscalingReconciler) reconcileNormal( if instance.Spec.PrometheusHost == "" { // We're using MetricStorage for Prometheus. Set TLS accordingly metricStorage := &telemetryv1.MetricStorage{} - err := r.Client.Get(ctx, client.ObjectKey{ + err := r.Get(ctx, client.ObjectKey{ Namespace: instance.Namespace, Name: telemetryv1.DefaultServiceName, }, metricStorage) @@ -788,7 +792,7 @@ func (r *AutoscalingReconciler) SetupWithManager(ctx context.Context, mgr ctrl.M listOpts := []client.ListOption{ client.InNamespace(o.GetNamespace()), } - if err := r.Client.List(context.Background(), autoscalings, listOpts...); err != nil { + if err := r.List(context.Background(), autoscalings, listOpts...); err != nil { Log.Error(err, "Unable to retrieve Autoscaling CRs %v") return nil } @@ -821,7 +825,7 @@ func (r *AutoscalingReconciler) SetupWithManager(ctx context.Context, mgr ctrl.M listOpts := []client.ListOption{ client.InNamespace(o.GetNamespace()), } - if err := r.Client.List(context.Background(), autoscalings, listOpts...); err != nil { + if err := r.List(context.Background(), autoscalings, listOpts...); err != nil { Log.Error(err, "Unable to retrieve Autoscaling CRs %w") return nil } @@ -849,7 +853,7 @@ func (r *AutoscalingReconciler) SetupWithManager(ctx context.Context, mgr ctrl.M listOpts := []client.ListOption{ client.InNamespace(o.GetNamespace()), } - if err := r.Client.List(context.Background(), autoscalings, listOpts...); err != nil { + if err := r.List(context.Background(), autoscalings, listOpts...); err != nil { Log.Error(err, "Unable to retrieve Autoscaling CRs %w") return nil } @@ -966,7 +970,7 @@ func (r *AutoscalingReconciler) findObjectsForSrc(ctx context.Context, src clien FieldSelector: fields.OneTermEqualSelector(field, src.GetName()), Namespace: src.GetNamespace(), } - err := r.Client.List(ctx, crList, listOps) + err := r.List(ctx, crList, listOps) if err != nil { return []reconcile.Request{} } @@ -997,7 +1001,7 @@ func (r *AutoscalingReconciler) findObjectForSrc(ctx context.Context, src client listOps := &client.ListOptions{ Namespace: src.GetNamespace(), } - err := r.Client.List(ctx, crList, listOps) + err := r.List(ctx, crList, listOps) if err != nil { Log.Error(err, fmt.Sprintf("listing %s for namespace: %s", crList.GroupVersionKind().Kind, src.GetNamespace())) return requests diff --git a/controllers/ceilometer_controller.go b/controllers/ceilometer_controller.go index ca83a67c5..82851efa4 100644 --- a/controllers/ceilometer_controller.go +++ b/controllers/ceilometer_controller.go @@ -114,7 +114,7 @@ func (r *CeilometerReconciler) Reconcile(ctx context.Context, req ctrl.Request) // Fetch the Ceilometer instance instance := &telemetryv1.Ceilometer{} - err := r.Client.Get(ctx, req.NamespacedName, instance) + err := r.Get(ctx, req.NamespacedName, instance) if err != nil { if k8s_errors.IsNotFound(err) { // Request object not found, could have been deleted after reconcile request. @@ -236,11 +236,11 @@ func (r *CeilometerReconciler) Reconcile(ctx context.Context, req ctrl.Request) // fields to index to reconcile when change const ( ceilometerPasswordSecretField = ".spec.secret" - ceilometerCaBundleSecretNameField = ".spec.tls.caBundleSecretName" + ceilometerCaBundleSecretNameField = ".spec.tls.caBundleSecretName" //nolint:gosec // G101: Not actual credentials, just field path ceilometerTLSField = ".spec.tls.secretName" - ksmCaBundleSecretNameField = ".spec.ksmTls.caBundleSecretName" + ksmCaBundleSecretNameField = ".spec.ksmTls.caBundleSecretName" //nolint:gosec // G101: Not actual credentials, just field path ksmTLSField = ".spec.ksmTls.secretName" - mysqldExporterCaBundleSecretNameField = ".spec.mysqldExporterTls.caBundleSecretName" + mysqldExporterCaBundleSecretNameField = ".spec.mysqldExporterTls.caBundleSecretName" //nolint:gosec // G101: Not actual credentials, just field path mysqldExporterTLSField = ".spec.mysqldExporterTls.secretName" ) @@ -620,7 +620,7 @@ func (r *CeilometerReconciler) reconcileCeilometer( condition.TLSInputReadyCondition, condition.RequestedReason, condition.SeverityInfo, - fmt.Sprintf(condition.TLSInputReadyWaitingMessage, instance.Spec.TLS.CaBundleSecretName))) + condition.TLSInputReadyWaitingMessage, instance.Spec.TLS.CaBundleSecretName)) return ctrl.Result{}, nil } instance.Status.Conditions.Set(condition.FalseCondition( @@ -646,7 +646,7 @@ func (r *CeilometerReconciler) reconcileCeilometer( condition.TLSInputReadyCondition, condition.RequestedReason, condition.SeverityInfo, - fmt.Sprintf(condition.TLSInputReadyWaitingMessage, err.Error()))) + condition.TLSInputReadyWaitingMessage, err.Error())) return ctrl.Result{}, nil } instance.Status.Conditions.Set(condition.FalseCondition( @@ -850,7 +850,7 @@ func (r *CeilometerReconciler) reconcileMysqldExporter( telemetryv1.MysqldExporterTLSInputReadyCondition, condition.RequestedReason, condition.SeverityInfo, - fmt.Sprintf(condition.TLSInputReadyWaitingMessage, instance.Spec.MysqldExporterTLS.CaBundleSecretName))) + condition.TLSInputReadyWaitingMessage, instance.Spec.MysqldExporterTLS.CaBundleSecretName)) return ctrl.Result{}, nil } instance.Status.Conditions.Set(condition.FalseCondition( @@ -876,7 +876,7 @@ func (r *CeilometerReconciler) reconcileMysqldExporter( telemetryv1.MysqldExporterTLSInputReadyCondition, condition.RequestedReason, condition.SeverityInfo, - fmt.Sprintf(condition.TLSInputReadyWaitingMessage, err.Error()))) + condition.TLSInputReadyWaitingMessage, err.Error())) return ctrl.Result{}, nil } instance.Status.Conditions.Set(condition.FalseCondition( @@ -1029,7 +1029,7 @@ func (r *CeilometerReconciler) reconcileKSM( telemetryv1.KSMTLSInputReadyCondition, condition.RequestedReason, condition.SeverityInfo, - fmt.Sprintf(condition.TLSInputReadyWaitingMessage, instance.Spec.KSMTLS.CaBundleSecretName))) + condition.TLSInputReadyWaitingMessage, instance.Spec.KSMTLS.CaBundleSecretName)) return ctrl.Result{}, nil } instance.Status.Conditions.Set(condition.FalseCondition( @@ -1406,7 +1406,7 @@ func (r *CeilometerReconciler) mysqldExporterEnsureDB( // Unfortunatelly access to the database is granted only after creating a db. db := mariadbv1.NewDatabaseForAccount( dbInstance, // mariadb/galera service to target - strings.Replace(databaseName, "-", "_", -1), // name used in CREATE DATABASE in mariadb + strings.ReplaceAll(databaseName, "-", "_"), // name used in CREATE DATABASE in mariadb databaseName, // CR name for MariaDBDatabase accountName, // CR name for MariaDBAccount instance.Namespace, // namespace @@ -1469,7 +1469,7 @@ func (r *CeilometerReconciler) generateMysqldExporterServiceConfig( listOpts := []client.ListOption{ client.InNamespace(instance.GetNamespace()), } - if err := r.Client.List(context.Background(), galeras, listOpts...); err != nil { + if err := r.List(context.Background(), galeras, listOpts...); err != nil { return ctrl.Result{}, err } @@ -1623,7 +1623,7 @@ func (r *CeilometerReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Ma listOpts := []client.ListOption{ client.InNamespace(o.GetNamespace()), } - if err := r.Client.List(context.Background(), ceilometers, listOpts...); err != nil { + if err := r.List(context.Background(), ceilometers, listOpts...); err != nil { Log.Error(err, "Unable to retrieve Ceilometer CRs %v") return nil } @@ -1668,7 +1668,7 @@ func (r *CeilometerReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Ma listOpts := []client.ListOption{ client.InNamespace(o.GetNamespace()), } - if err := r.Client.List(context.Background(), ceilometers, listOpts...); err != nil { + if err := r.List(context.Background(), ceilometers, listOpts...); err != nil { Log.Error(err, "Unable to retrieve Ceilometer CRs %v") return nil } @@ -1837,7 +1837,7 @@ func (r *CeilometerReconciler) findObjectsForSrc(ctx context.Context, src client FieldSelector: fields.OneTermEqualSelector(field, src.GetName()), Namespace: src.GetNamespace(), } - err := r.Client.List(ctx, crList, listOps) + err := r.List(ctx, crList, listOps) if err != nil { Log.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace())) return requests @@ -1869,7 +1869,7 @@ func (r *CeilometerReconciler) findObjectForSrc(ctx context.Context, src client. listOps := &client.ListOptions{ Namespace: src.GetNamespace(), } - err := r.Client.List(ctx, crList, listOps) + err := r.List(ctx, crList, listOps) if err != nil { Log.Error(err, fmt.Sprintf("listing %s for namespace: %s", crList.GroupVersionKind().Kind, src.GetNamespace())) return requests diff --git a/controllers/logging_controller.go b/controllers/logging_controller.go index b31d9a405..b6b7694a6 100644 --- a/controllers/logging_controller.go +++ b/controllers/logging_controller.go @@ -78,7 +78,7 @@ func (r *LoggingReconciler) Reconcile(ctx context.Context, req ctrl.Request) (re // Fetch the Logging instance instance := &telemetryv1.Logging{} - err := r.Client.Get(ctx, req.NamespacedName, instance) + err := r.Get(ctx, req.NamespacedName, instance) if err != nil { if k8s_errors.IsNotFound(err) { // Request object not found, could have been deleted after reconcile request. @@ -329,7 +329,7 @@ func (r *LoggingReconciler) retrieveOpenshiftCA(ctx context.Context) []byte { Namespace: "openshift-service-ca", } instance := &corev1.Secret{} - err := r.Client.Get(ctx, namespacedName, instance) + err := r.Get(ctx, namespacedName, instance) if err != nil { // No Openshift CA secret in the cluster return nil diff --git a/controllers/metricstorage_controller.go b/controllers/metricstorage_controller.go index 795b24423..93a52de76 100644 --- a/controllers/metricstorage_controller.go +++ b/controllers/metricstorage_controller.go @@ -139,7 +139,7 @@ func (r *MetricStorageReconciler) Reconcile(ctx context.Context, req ctrl.Reques // Fetch the MetricStorage instance instance := &telemetryv1.MetricStorage{} - err := r.Client.Get(ctx, req.NamespacedName, instance) + err := r.Get(ctx, req.NamespacedName, instance) if err != nil { if k8s_errors.IsNotFound(err) { // Request object not found, could have been deleted after reconcile request. @@ -302,7 +302,7 @@ func (r *MetricStorageReconciler) reconcileNormal( Log := r.GetLogger(ctx) Log.Info(fmt.Sprintf("Reconciling Service '%s'", instance.Name)) - var eventHandler handler.EventHandler = handler.EnqueueRequestForOwner( + eventHandler := handler.EnqueueRequestForOwner( r.Scheme, r.RESTMapper, &telemetryv1.MetricStorage{}, @@ -348,7 +348,7 @@ func (r *MetricStorageReconciler) reconcileNormal( Log.Info(fmt.Sprintf("Using CustomMonitoringStack for MonitoringStack %s definition", monitoringStack.Name)) instance.Spec.CustomMonitoringStack.DeepCopyInto(&monitoringStack.Spec) } - monitoringStack.ObjectMeta.Labels = serviceLabels + monitoringStack.Labels = serviceLabels err := controllerutil.SetControllerReference(instance, monitoringStack, r.Scheme) return err }) @@ -378,7 +378,7 @@ func (r *MetricStorageReconciler) reconcileNormal( return ctrl.Result{RequeueAfter: telemetryv1.PauseBetweenWatchAttempts}, nil } prometheusTLSPatch := metricstorage.PrometheusTLS(instance) - err = r.Client.Patch(context.Background(), &prometheusTLSPatch, client.Merge, client.FieldOwner("telemetry-operator")) + err = r.Patch(context.Background(), &prometheusTLSPatch, client.Merge, client.FieldOwner("telemetry-operator")) if err != nil { Log.Error(err, "Can't patch Prometheus resource") return ctrl.Result{}, err @@ -392,7 +392,7 @@ func (r *MetricStorageReconciler) reconcileNormal( Name: instance.Name, }, } - err = r.Client.Delete(context.Background(), &prometheus) + err = r.Delete(context.Background(), &prometheus) if err != nil && !k8s_errors.IsNotFound(err) { instance.Status.Conditions.MarkFalse(telemetryv1.PrometheusReadyCondition, condition.Reason("Can't delete old Prometheus CR to remove TLS configuration"), @@ -413,7 +413,7 @@ func (r *MetricStorageReconciler) reconcileNormal( // Patch Prometheus service to add route creation prometheusServicePatch := metricstorage.PrometheusService(instance) - err = r.Client.Patch(context.Background(), &prometheusServicePatch, client.Apply, client.FieldOwner("telemetry-operator")) + err = r.Patch(context.Background(), &prometheusServicePatch, client.Apply, client.FieldOwner("telemetry-operator")) if err != nil { Log.Error(err, "Can't patch Prometheus service resource") return ctrl.Result{}, err @@ -422,7 +422,7 @@ func (r *MetricStorageReconciler) reconcileNormal( // Patch Alertmanager service to add route creation if instance.Spec.MonitoringStack != nil && instance.Spec.MonitoringStack.AlertingEnabled { alertmanagerServicePatch := metricstorage.AlertmanagerService(instance) - err = r.Client.Patch(context.Background(), &alertmanagerServicePatch, client.Apply, client.FieldOwner("telemetry-operator")) + err = r.Patch(context.Background(), &alertmanagerServicePatch, client.Apply, client.FieldOwner("telemetry-operator")) if err != nil { Log.Error(err, "Can't patch Alertmanager service resource") return ctrl.Result{}, err @@ -435,7 +435,7 @@ func (r *MetricStorageReconciler) reconcileNormal( instance.Status.Conditions.MarkFalse(telemetryv1.MonitoringStackReadyCondition, condition.Reason(c.Reason), condition.SeverityError, - c.Message) + "%s", c.Message) monitoringStackReady = false break } @@ -484,7 +484,7 @@ func (r *MetricStorageReconciler) reconcileNormal( condition.TLSInputReadyCondition, condition.RequestedReason, condition.SeverityInfo, - fmt.Sprintf(condition.TLSInputReadyWaitingMessage, instance.Spec.PrometheusTLS.CaBundleSecretName))) + condition.TLSInputReadyWaitingMessage, instance.Spec.PrometheusTLS.CaBundleSecretName)) return ctrl.Result{}, nil } instance.Status.Conditions.Set(condition.FalseCondition( @@ -506,7 +506,7 @@ func (r *MetricStorageReconciler) reconcileNormal( condition.TLSInputReadyCondition, condition.RequestedReason, condition.SeverityInfo, - fmt.Sprintf(condition.TLSInputReadyWaitingMessage, err.Error()))) + condition.TLSInputReadyWaitingMessage, err.Error())) return ctrl.Result{}, nil } instance.Status.Conditions.Set(condition.FalseCondition( @@ -539,7 +539,7 @@ func (r *MetricStorageReconciler) reconcileNormal( condition.SeverityInfo, condition.NetworkAttachmentsReadyWaitingMessage, netAtt)) - return ctrl.Result{RequeueAfter: time.Second * 10}, fmt.Errorf("network-attachment-definition %s not found", netAtt) + return ctrl.Result{RequeueAfter: time.Second * 10}, fmt.Errorf("%w: %s", telemetry.ErrNetworkAttachmentDefinitionNotFound, netAtt) } instance.Status.Conditions.Set(condition.FalseCondition( condition.NetworkAttachmentsReadyCondition, @@ -555,7 +555,6 @@ func (r *MetricStorageReconciler) reconcileNormal( } networkAnnotations, err := nad.EnsureNetworksAnnotation(nadList) - if err != nil { err = fmt.Errorf("failed create network annotation from %s: %w", instance.Spec.NetworkAttachments, err) instance.Status.Conditions.MarkFalse( @@ -587,7 +586,7 @@ func (r *MetricStorageReconciler) reconcileNormal( return ctrl.Result{RequeueAfter: telemetryv1.PauseBetweenWatchAttempts}, nil } prometheusNADPatch := metricstorage.PrometheusNAD(instance, networkAnnotations) - err = r.Client.Patch(context.Background(), &prometheusNADPatch, client.Merge, client.FieldOwner("telemetry-operator")) + err = r.Patch(context.Background(), &prometheusNADPatch, client.Merge, client.FieldOwner("telemetry-operator")) if err != nil { Log.Error(err, "Can't patch Prometheus resource") return ctrl.Result{}, err @@ -601,7 +600,7 @@ func (r *MetricStorageReconciler) reconcileNormal( Name: instance.Name, }, } - err = r.Client.Delete(context.Background(), &prometheus) + err = r.Delete(context.Background(), &prometheus) if err != nil && !k8s_errors.IsNotFound(err) { instance.Status.Conditions.MarkFalse(telemetryv1.PrometheusReadyCondition, condition.Reason("Can't delete old Prometheus CR to remove NAD configuration"), @@ -670,7 +669,7 @@ func (r *MetricStorageReconciler) prometheusEndpointSecret( return err } - if err := r.Client.Patch(ctx, secret, client.RawPatch(types.StrategicMergePatchType, patch)); err != nil { + if err := r.Patch(ctx, secret, client.RawPatch(types.StrategicMergePatchType, patch)); err != nil { return err } } @@ -694,7 +693,7 @@ func (r *MetricStorageReconciler) createServiceScrapeConfig( } op, err := controllerutil.CreateOrPatch(ctx, r.Client, scrapeConfig, func() error { desiredScrapeConfig.Spec.DeepCopyInto(&scrapeConfig.Spec) - scrapeConfig.ObjectMeta.Labels = desiredScrapeConfig.ObjectMeta.Labels + scrapeConfig.Labels = desiredScrapeConfig.Labels err := controllerutil.SetControllerReference(instance, scrapeConfig, r.Scheme) return err }) @@ -762,7 +761,7 @@ func (r *MetricStorageReconciler) createScrapeConfigs( listOpts := []client.ListOption{ client.InNamespace(instance.GetNamespace()), } - err = r.Client.List(ctx, rabbitList, listOpts...) + err = r.List(ctx, rabbitList, listOpts...) if err != nil && !k8s_errors.IsNotFound(err) { return ctrl.Result{}, err } @@ -791,7 +790,7 @@ func (r *MetricStorageReconciler) createScrapeConfigs( } ceilometerInstance := &telemetryv1.Ceilometer{} - err = r.Client.Get(ctx, ceilometerNamespacedName, ceilometerInstance) + err = r.Get(ctx, ceilometerNamespacedName, ceilometerInstance) if err != nil && !k8s_errors.IsNotFound(err) { Log.Info(fmt.Sprintf("Cannot get ceilometer. Scrape configs not created. Error: %s", err)) } @@ -913,7 +912,7 @@ func (r *MetricStorageReconciler) createComputeScrapeConfig( targetsTLS, targetsNonTLS := getExporterTargets(connectionInfo, exporterPort) // ScrapeConfig for non-tls nodes - //NOTE(mmagr): remove TLS suppression functionality once Kepler supports TLS + // NOTE(mmagr): remove TLS suppression functionality once Kepler supports TLS targets := targetsNonTLS if suppressTLS { targets = targetsTLS @@ -1093,7 +1092,7 @@ func (r *MetricStorageReconciler) createDashboardObjects(ctx context.Context, in op, err = controllerutil.CreateOrPatch(ctx, r.Client, prometheusRule, func() error { desiredPrometheusRule := metricstorage.DashboardPrometheusRule(instance, serviceLabels) desiredPrometheusRule.Spec.DeepCopyInto(&prometheusRule.Spec) - prometheusRule.ObjectMeta.Labels = desiredPrometheusRule.ObjectMeta.Labels + prometheusRule.Labels = desiredPrometheusRule.Labels err = controllerutil.SetControllerReference(instance, prometheusRule, r.Scheme) return err }) @@ -1115,7 +1114,7 @@ func (r *MetricStorageReconciler) createDashboardObjects(ctx context.Context, in } dataSourceSuccess := false op, err = controllerutil.CreateOrPatch(ctx, r.Client, datasourceCM, func() error { - datasourceCM.ObjectMeta.Labels = map[string]string{ + datasourceCM.Labels = map[string]string{ "console.openshift.io/dashboard-datasource": "true", } datasourceCM.Data, err = metricstorage.DashboardDatasourceData(ctx, r.Client, instance, datasourceName, metricstorage.DashboardArtifactsNamespace) @@ -1174,7 +1173,7 @@ func (r *MetricStorageReconciler) createDashboardObjects(ctx context.Context, in }, } op, err = controllerutil.CreateOrPatch(ctx, r.Client, dashboardCM, func() error { - dashboardCM.ObjectMeta.Labels = desiredCM.ObjectMeta.Labels + dashboardCM.Labels = desiredCM.Labels dashboardCM.Data = desiredCM.Data return nil }) @@ -1215,7 +1214,7 @@ func (r *MetricStorageReconciler) ensureWatches( Version: "v1", }) - err := r.Client.Get(context.Background(), client.ObjectKey{ + err := r.Get(context.Background(), client.ObjectKey{ Name: name, }, u) if err != nil { @@ -1223,9 +1222,7 @@ func (r *MetricStorageReconciler) ensureWatches( } Log.Info(fmt.Sprintf("Starting to watch %s", name)) - err = r.Controller.Watch(source.Kind(r.Cache, kind), - handler, - ) + err = r.Controller.Watch(source.Kind(r.Cache, kind, handler)) if err == nil { r.Watching = append(r.Watching, name) } @@ -1285,11 +1282,11 @@ func getComputeNodesConnectionInfo( address, _ = getAddressFromAnsibleHost(&item) } else { // we were unable to find an IP or HostName for a node, so we do not go further - return connectionInfo, fmt.Errorf("failed to find an IP or HostName for node %s", name) + return connectionInfo, fmt.Errorf("%w %s", telemetry.ErrNodeIPOrHostnameNotFound, name) } if address == "" { // we were unable to find an IP or HostName for a node, so we do not go further - return connectionInfo, fmt.Errorf("failed to find an IP or HostName for node %s", name) + return connectionInfo, fmt.Errorf("%w %s", telemetry.ErrNodeIPOrHostnameNotFound, name) } fqdn, _ := getCanonicalHostname(&item) @@ -1442,7 +1439,7 @@ func (r *MetricStorageReconciler) SetupWithManager(ctx context.Context, mgr ctrl listOpts := []client.ListOption{ client.InNamespace(o.GetNamespace()), } - if err := r.Client.List(context.Background(), metricStorages, listOpts...); err != nil { + if err := r.List(context.Background(), metricStorages, listOpts...); err != nil { Log.Error(err, "Unable to retrieve MetricStorage CRs %w") return nil } @@ -1474,7 +1471,7 @@ func (r *MetricStorageReconciler) SetupWithManager(ctx context.Context, mgr ctrl listOpts := []client.ListOption{ client.InNamespace(o.GetNamespace()), } - if err := r.Client.List(context.Background(), metricStorages, listOpts...); err != nil { + if err := r.List(context.Background(), metricStorages, listOpts...); err != nil { Log.Error(err, "Unable to retrieve MetricStorage CRs %w") return nil } @@ -1500,7 +1497,7 @@ func (r *MetricStorageReconciler) SetupWithManager(ctx context.Context, mgr ctrl listOpts := []client.ListOption{ client.InNamespace(o.GetNamespace()), } - if err := r.Client.List(context.Background(), metricStorages, listOpts...); err != nil { + if err := r.List(context.Background(), metricStorages, listOpts...); err != nil { Log.Error(err, "Unable to retrieve MetricStorage CRs %w") return nil } @@ -1599,7 +1596,7 @@ func (r *MetricStorageReconciler) findObjectsForSrc(ctx context.Context, src cli FieldSelector: fields.OneTermEqualSelector(field, src.GetName()), Namespace: src.GetNamespace(), } - err := r.Client.List(ctx, crList, listOps) + err := r.List(ctx, crList, listOps) if err != nil { return []reconcile.Request{} } @@ -1631,7 +1628,7 @@ func (r *MetricStorageReconciler) nodeSetWatchFn(ctx context.Context, o client.O listOpts := []client.ListOption{ client.InNamespace(o.GetNamespace()), } - if err := r.Client.List(ctx, metricstorages, listOpts...); err != nil { + if err := r.List(ctx, metricstorages, listOpts...); err != nil { Log.Error(err, "Unable to retrieve MetricStorage CRs %v") return nil } diff --git a/controllers/telemetry_controller.go b/controllers/telemetry_controller.go index e053c7600..a4cb1ce51 100644 --- a/controllers/telemetry_controller.go +++ b/controllers/telemetry_controller.go @@ -74,7 +74,7 @@ func (r *TelemetryReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( // Fetch the Telemetry instance instance := &telemetryv1.Telemetry{} - err := r.Client.Get(ctx, req.NamespacedName, instance) + err := r.Get(ctx, req.NamespacedName, instance) if err != nil { if k8s_errors.IsNotFound(err) { // Request object not found, could have been deleted after reconcile request. @@ -573,7 +573,7 @@ func (r *TelemetryReconciler) checkCeilometerGeneration( listOpts := []client.ListOption{ client.InNamespace(instance.Namespace), } - if err := r.Client.List(context.Background(), clm, listOpts...); err != nil { + if err := r.List(context.Background(), clm, listOpts...); err != nil { Log.Error(err, "Unable to retrieve Ceilometer CR %w") return false, err } @@ -594,7 +594,7 @@ func (r *TelemetryReconciler) checkAutoscalingGeneration( listOpts := []client.ListOption{ client.InNamespace(instance.Namespace), } - if err := r.Client.List(context.Background(), as, listOpts...); err != nil { + if err := r.List(context.Background(), as, listOpts...); err != nil { Log.Error(err, "Unable to retrieve Autoscaling CR %w") return false, err } @@ -615,7 +615,7 @@ func (r *TelemetryReconciler) checkMetricsStorageGeneration( listOpts := []client.ListOption{ client.InNamespace(instance.Namespace), } - if err := r.Client.List(context.Background(), ms, listOpts...); err != nil { + if err := r.List(context.Background(), ms, listOpts...); err != nil { Log.Error(err, "Unable to retrieve MetricsStorage CR %w") return false, err } @@ -636,7 +636,7 @@ func (r *TelemetryReconciler) checkLoggingGeneration( listOpts := []client.ListOption{ client.InNamespace(instance.Namespace), } - if err := r.Client.List(context.Background(), l, listOpts...); err != nil { + if err := r.List(context.Background(), l, listOpts...); err != nil { Log.Error(err, "Unable to retrieve Logging CR %w") return false, err } diff --git a/go.mod b/go.mod index 3175a5e01..2030322e8 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/openstack-k8s-operators/telemetry-operator -go 1.21 +go 1.24 replace github.com/openstack-k8s-operators/telemetry-operator/api => ./api @@ -9,31 +9,32 @@ require ( github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.7.7 github.com/onsi/ginkgo/v2 v2.20.1 github.com/onsi/gomega v1.34.1 - github.com/openstack-k8s-operators/heat-operator/api v0.6.1-0.20250820104720-73ab3731cbd1 - github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250821143610-c8ef7b9a21ec - github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20250818180001-057253e3d233 - github.com/openstack-k8s-operators/lib-common/modules/ansible v0.6.1-0.20250730071847-837b07f8d72f - github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250823121217-7e1cd2e3dd03 - github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20250819151523-e1c898c710cb - github.com/openstack-k8s-operators/ovn-operator/api v0.6.1-0.20250902142123-a16588bf7967 + github.com/openstack-k8s-operators/heat-operator/api v0.6.1-0.20250916093004-20a0505e2327 + github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250922155301-057562fb7182 + github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20250916093250-82a76386143d + github.com/openstack-k8s-operators/lib-common/modules/ansible v0.6.1-0.20250922082314-c83d83092a04 + github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250922082314-c83d83092a04 + github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20250922154138-e032ee393bab + github.com/openstack-k8s-operators/ovn-operator/api v0.6.1-0.20250918124008-71fb50adbeb5 github.com/openstack-k8s-operators/telemetry-operator/api v0.3.1-0.20240529090522-c780bd90b147 github.com/rabbitmq/cluster-operator v1.14.0 github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring v0.71.0-rhobs1 github.com/rhobs/observability-operator v0.3.1 - k8s.io/api v0.29.15 - k8s.io/apimachinery v0.29.15 - k8s.io/client-go v0.29.15 - k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 - sigs.k8s.io/controller-runtime v0.17.6 + k8s.io/api v0.31.12 + k8s.io/apimachinery v0.31.12 + k8s.io/client-go v0.31.12 + k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d + sigs.k8s.io/controller-runtime v0.19.7 ) require ( github.com/beorn7/perks v1.0.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/emicklei/go-restful/v3 v3.12.0 // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-logr/zapr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect @@ -56,43 +57,42 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/openshift/api v3.9.0+incompatible // indirect - github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20250730071847-837b07f8d72f // indirect - github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250730071847-837b07f8d72f // indirect + github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20250922082314-c83d83092a04 // indirect + github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250922082314-c83d83092a04 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.19.0 // indirect - github.com/prometheus/client_model v0.6.0 // indirect - github.com/prometheus/common v0.53.0 // indirect - github.com/prometheus/procfs v0.13.0 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rabbitmq/cluster-operator/v2 v2.9.0 // indirect github.com/spf13/pflag v1.0.5 // indirect + github.com/x448/float16 v0.8.4 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect golang.org/x/net v0.28.0 // indirect - golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sys v0.23.0 // indirect golang.org/x/term v0.23.0 // indirect golang.org/x/text v0.17.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.24.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.29.15 // indirect - k8s.io/component-base v0.29.15 // indirect - k8s.io/klog/v2 v2.120.1 // indirect + k8s.io/apiextensions-apiserver v0.31.12 // indirect + k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240322212309-b815d8309940 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) -// mschuppert: map to latest commit from release-4.16 tag +// mschuppert: map to latest commit from release-4.18 tag // must consistent within modules and service operators -replace github.com/openshift/api => github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094 //allow-merging +replace github.com/openshift/api => github.com/openshift/api v0.0.0-20250711200046-c86d80652a9e //allow-merging // custom RabbitmqClusterSpecCore for OpenStackControlplane (v2.6.0_patches_tag) replace github.com/rabbitmq/cluster-operator/v2 => github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20250717122149-12f70b7f3d8d //allow-merging diff --git a/go.sum b/go.sum index 91e708219..56eda1302 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -14,6 +14,8 @@ github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0 github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= @@ -30,13 +32,10 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 h1:0VpGH+cDhbDtdcweoyCVsF3fhN8kejK6rFe/2FFX2nU= github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49/go.mod h1:BkkQ4L1KS1xMt2aWSPStnn55ChGC0DPOn2FQYj+f25M= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -76,26 +75,26 @@ github.com/onsi/ginkgo/v2 v2.20.1 h1:YlVIbqct+ZmnEph770q9Q7NVAz4wwIiVNahee6JyUzo github.com/onsi/ginkgo/v2 v2.20.1/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= -github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094 h1:J1wuGhVxpsHykZBa6Beb1gQ96Ptej9AE/BvwCBiRj1E= -github.com/openshift/api v0.0.0-20240830023148-b7d0481c9094/go.mod h1:CxgbWAlvu2iQB0UmKTtRu1YfepRg1/vJ64n2DlIEVz4= -github.com/openstack-k8s-operators/heat-operator/api v0.6.1-0.20250820104720-73ab3731cbd1 h1:P3thny+ZBr/sjJEYEha1WOTFi63oBjvdFk4ho+W9Eo4= -github.com/openstack-k8s-operators/heat-operator/api v0.6.1-0.20250820104720-73ab3731cbd1/go.mod h1:2gEEgsZ3c02OXw8zB+jyS0aqvu0gB4zNddI8GnrrvM8= -github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250821143610-c8ef7b9a21ec h1:Jvz2BuTWCvjeCbDzpPzlPMrUQpEe04Rzi8LPNxeW0Ts= -github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250821143610-c8ef7b9a21ec/go.mod h1:Dv8qpmBIQy3Jv/EyQnOyc0w61X8vyfxpjcIQONP5CwY= -github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20250818180001-057253e3d233 h1:1Kuny36wIpijE4RsFu8e+b0uUK8Gh0PgvlEVOOhG+uo= -github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20250818180001-057253e3d233/go.mod h1:qevkmDP/Yr7FTM0ZVe2fABjSjrfkkdZkYeMho71OVG0= -github.com/openstack-k8s-operators/lib-common/modules/ansible v0.6.1-0.20250730071847-837b07f8d72f h1:7w9WseH9LSKnLX3UW1AfWPaozN7fimdVoUtOYHnsQKY= -github.com/openstack-k8s-operators/lib-common/modules/ansible v0.6.1-0.20250730071847-837b07f8d72f/go.mod h1:0bajRHochTUT6Ecfriw27l3vL0yezVrnUmt3bcIpu4w= -github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250823121217-7e1cd2e3dd03 h1:9VanDdvg1APf9B1nzGElLvWr6dM5GsSayMLSV/nJZnE= -github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250823121217-7e1cd2e3dd03/go.mod h1:Z+rmtn3qhuPZfx2EDVmloUh2MkYbvDMgcpJneRYerS0= -github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20250730071847-837b07f8d72f h1:nGYLHcpM7EjiSzN4bmiLZbxty9u0k0Qzvkqn+1s1TF0= -github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20250730071847-837b07f8d72f/go.mod h1:nachFP0Yicw/e8ZlqZzvnBN6w9kjMcnqrhaDw36PGjw= -github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250730071847-837b07f8d72f h1:/e/jQu3GThcystmZFyzlQq6nOKpORQq84HhcbkKxAq4= -github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250730071847-837b07f8d72f/go.mod h1:U3LQ4Nz2+syTPfW66bSLv6OzefLpsqxWLdX9AFotRPA= -github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20250819151523-e1c898c710cb h1:10W54mDBhON+L5PItSHV3ahOAmZH3Xi4dvEK5yhNLRE= -github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20250819151523-e1c898c710cb/go.mod h1:0dWVKC1svlk2h+vyJGlKDcwgq4yJaovKXBhGZNi5tQ0= -github.com/openstack-k8s-operators/ovn-operator/api v0.6.1-0.20250902142123-a16588bf7967 h1:r5+yw+vAt26OsZfbO0Xa7Ox4MYxMFrKCVgKnY3ZamiM= -github.com/openstack-k8s-operators/ovn-operator/api v0.6.1-0.20250902142123-a16588bf7967/go.mod h1:K6h5wmoAsxwzq7VSItwMg36RVsexLidHNNuSfK5mbSc= +github.com/openshift/api v0.0.0-20250711200046-c86d80652a9e h1:E1OdwSpqWuDPCedyUt0GEdoAE+r5TXy7YS21yNEo+2U= +github.com/openshift/api v0.0.0-20250711200046-c86d80652a9e/go.mod h1:Shkl4HanLwDiiBzakv+con/aMGnVE2MAGvoKp5oyYUo= +github.com/openstack-k8s-operators/heat-operator/api v0.6.1-0.20250916093004-20a0505e2327 h1:Suiu+GI++jNb3mGhggmtUFV0BhWHJAYGVH28caFBMns= +github.com/openstack-k8s-operators/heat-operator/api v0.6.1-0.20250916093004-20a0505e2327/go.mod h1:FTwd2VQgKqSngqCXVW3uZ9wqm50rIFHyVBBJi/6GFl4= +github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250922155301-057562fb7182 h1:Ea+FZQOW0Eha1jorgSECFeqI9UrKz8TZlGnSM7X8Yf4= +github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250922155301-057562fb7182/go.mod h1:3Im8PFiRKPaOZpOuqYShJRN2O2pfjUuhDTUpW4KMHZw= +github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20250916093250-82a76386143d h1:lSRMftk/MbN4qd8ihHh9ucdX4sfR/HUudEcy2h/BNhQ= +github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20250916093250-82a76386143d/go.mod h1:7ZuNZNtwRYklS2H5E5YSjsHOI2sYbAl1AD+N0W/G+8A= +github.com/openstack-k8s-operators/lib-common/modules/ansible v0.6.1-0.20250922082314-c83d83092a04 h1:LJ8HkJVBvsO5sQSN+2u12wVE97KSrRpdVwc35LHGWJg= +github.com/openstack-k8s-operators/lib-common/modules/ansible v0.6.1-0.20250922082314-c83d83092a04/go.mod h1:/t8UOevAIOdAu7SAkfwfyZj6p2pkuupl3mZJPMNqNOo= +github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250922082314-c83d83092a04 h1:JqJd39rF8rD9KIHmOEFbHP8UyYgttfuouj+kAFNtymU= +github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250922082314-c83d83092a04/go.mod h1:SmKRclrynSSRCXSLOoWlETalJPvt62ObHsfW8iPvtDA= +github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20250922082314-c83d83092a04 h1:1t4qZshLvaTzytFb9foCBtTtKT4uXzYtVaYTlgYbt+4= +github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20250922082314-c83d83092a04/go.mod h1:IO6+EHBk1Ttd4L8mfnMtG58cc36tDyvdxzCytn+hKeE= +github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250922082314-c83d83092a04 h1:j5P/ehO4bQ+VqNvqNiX7N/R8wnBweFy7MX685nh4mmY= +github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250922082314-c83d83092a04/go.mod h1:WbDAhyvX2UTyK9LzYZKjRvEGdn2fsQJHUo5l2J5q/vg= +github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20250922154138-e032ee393bab h1:CE1/GgLlgxcOBG9euwGU5VF+8Rdj1SmGoAO2++ibDYY= +github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20250922154138-e032ee393bab/go.mod h1:x3xIYBq+TbbXgxH/Xf159P8Dil+pxck4C2GwrYMm+d0= +github.com/openstack-k8s-operators/ovn-operator/api v0.6.1-0.20250918124008-71fb50adbeb5 h1:kjCoac5RqGN2m3Iw0+XmaiEwo/FuGB9MfWAeHT+6caI= +github.com/openstack-k8s-operators/ovn-operator/api v0.6.1-0.20250918124008-71fb50adbeb5/go.mod h1:gxQk8WOaA2lQ9oy4ZKXK35oKuD6pKo4Ce2XkUkFjkE4= github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20250717122149-12f70b7f3d8d h1:0KCWljk2IEJ+aWNK+RiGpIdu51KPXrYA5RfyUcV4Mb4= github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20250717122149-12f70b7f3d8d/go.mod h1:6Mq2N/KtNFW20L+PQC5qkeK8R8UGadmGBXL8HDY6lcg= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -103,14 +102,14 @@ 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/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU= -github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= -github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= -github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= -github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= +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.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rabbitmq/cluster-operator v1.14.0 h1:1/nMyd9v/8T5IHA1BVcWbV0nrzN31F+gLP+0Ges6Y5E= github.com/rabbitmq/cluster-operator v1.14.0/go.mod h1:7XVU6ngbVJSPDXld+uMVk6nu68GH7fM6yYYY2MdYKek= github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring v0.71.0-rhobs1 h1:NBdZFQUVKllUnmh6suuH02+K8VS8ibErnOhxNiH+aio= @@ -125,9 +124,10 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -137,47 +137,37 @@ go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= -golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= -golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= @@ -186,7 +176,6 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -195,15 +184,13 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -211,24 +198,22 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 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.29.15 h1:QxPcAheYujeBwkdiE0vMyKkAtqUq5YNyXVqimT+me44= -k8s.io/api v0.29.15/go.mod h1:16duIp2ez6GiLPq1g8XtZNIkw6hJpIitpxZSvv0dZ6E= -k8s.io/apiextensions-apiserver v0.29.15 h1:XI5axgsWqMlIIgpHbcz5vPjk06i3ibHv5FUdSfdtQLU= -k8s.io/apiextensions-apiserver v0.29.15/go.mod h1:6ZU61z32I8WUwbBTPIANUesTj5G40sZek0ojmeoMJI8= -k8s.io/apimachinery v0.29.15 h1:aLc0wghElkdnTO7TMVTxTrifoXah1lqRL8s6szDHGbg= -k8s.io/apimachinery v0.29.15/go.mod h1:i3FJVwhvSp/6n8Fl4K97PJEP8C+MM+aoDq4+ZJBf70Y= -k8s.io/client-go v0.29.15 h1:zCBOXKCtz9Hl8boKUGs8zbtZEP6pc7O8Ov3ma+gnS6o= -k8s.io/client-go v0.29.15/go.mod h1:xPy0D3p4sonPhZhI3QoYo4m7oLKoPjFf4vYF9oxoxNM= -k8s.io/component-base v0.29.15 h1:CvmXXTDyk43FDaiJ/Rp+yWFjw6hkUI2t7mIJUrK5j00= -k8s.io/component-base v0.29.15/go.mod h1:jH/sbuvmXew2Fz2iIKNMeNw8o/d1KR9tAg6uekQKnVk= -k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= -k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/api v0.31.12 h1:yysm83xHIoKAwfm2w0dT6Yz7vfWzl841AEMI7Y8wDa8= +k8s.io/api v0.31.12/go.mod h1:f/srhhI7aDs9K4s0W1GX4/zb+cIf5uWrBjGyoO/XgJc= +k8s.io/apiextensions-apiserver v0.31.12 h1:d32I3VReAly5Qoc9ZXhO4/iObYmm7Jk6VvAeRAbg/MA= +k8s.io/apiextensions-apiserver v0.31.12/go.mod h1:KcBI/Z/WQmbffBwfqQmqHhALhvun5JNJJh8Y29CJwUo= +k8s.io/apimachinery v0.31.12 h1:y34W8rNKc+jDxUvEXarjahqM6vOV5iqgZPuRqRuyEh8= +k8s.io/apimachinery v0.31.12/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.12 h1:JJhouOoU1bKdPWplkZ2CpYA74+lxj3Zsn15aoGLX6Hk= +k8s.io/client-go v0.31.12/go.mod h1:kjQ5WSec9ShP3T1auTDFW4bTqgmJdBuZPsjq5FqeuYE= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240322212309-b815d8309940 h1:qVoMaQV5t62UUvHe16Q3eb2c5HPzLHYzsi0Tu/xLndo= k8s.io/kube-openapi v0.0.0-20240322212309-b815d8309940/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.17.6 h1:12IXsozEsIXWAMRpgRlYS1jjAHQXHtWEOMdULh3DbEw= -sigs.k8s.io/controller-runtime v0.17.6/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY= +k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d h1:wAhiDyZ4Tdtt7e46e9M5ZSAJ/MnPGPs+Ki1gHw4w1R0= +k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/controller-runtime v0.19.7 h1:DLABZfMr20A+AwCZOHhcbcu+TqBXnJZaVBri9K3EO48= +sigs.k8s.io/controller-runtime v0.19.7/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= diff --git a/main.go b/main.go index 7d42c3794..e37f1ac73 100644 --- a/main.go +++ b/main.go @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package main is the entry point for the Telemetry operator package main import ( diff --git a/pkg/autoscaling/aodh_statefulset.go b/pkg/autoscaling/aodh_statefulset.go index 190264b8d..fb0a4ee2e 100644 --- a/pkg/autoscaling/aodh_statefulset.go +++ b/pkg/autoscaling/aodh_statefulset.go @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package autoscaling provides functionality for managing OpenStack telemetry autoscaling components package autoscaling import ( @@ -98,7 +99,7 @@ func AodhStatefulSet( // add prometheus CA cert if defined if instance.Spec.PrometheusTLSCaCertSecret != nil { - volumes = append(volumes, getCustomPrometheusCaVolume(instance.Spec.PrometheusTLSCaCertSecret.LocalObjectReference.Name)) + volumes = append(volumes, getCustomPrometheusCaVolume(instance.Spec.PrometheusTLSCaCertSecret.Name)) evaluatorVolumeMounts = append(evaluatorVolumeMounts, getCustomPrometheusCaVolumeMount(instance.Spec.PrometheusTLSCaCertSecret.Key)) } diff --git a/pkg/autoscaling/const.go b/pkg/autoscaling/const.go index 2720df035..814acf07c 100644 --- a/pkg/autoscaling/const.go +++ b/pkg/autoscaling/const.go @@ -42,6 +42,7 @@ const ( // CustomPrometheusCaCertFolderPath - CustomPrometheusCaCertFolderPath = "/etc/pki/ca-trust/extracted/pem/" + // PrometheusEndpointSecret is the name of the secret containing Prometheus endpoint configuration PrometheusEndpointSecret = "metric-storage-prometheus-endpoint" ) diff --git a/pkg/availability/const.go b/pkg/availability/const.go index e6cb443b2..ead933577 100644 --- a/pkg/availability/const.go +++ b/pkg/availability/const.go @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package availability provides functionality for managing telemetry availability monitoring components package availability const ( diff --git a/pkg/availability/secret.go b/pkg/availability/secret.go index 072d1768b..374a2ef44 100644 --- a/pkg/availability/secret.go +++ b/pkg/availability/secret.go @@ -42,11 +42,13 @@ tls_server_config:` ) var ( + // TLSCertPath is the path to the TLS certificate file TLSCertPath = fmt.Sprintf("/etc/pki/tls/certs/%s", tls.CertKey) - TLSKeyPath = fmt.Sprintf("/etc/pki/tls/private/%s", tls.PrivateKey) + // TLSKeyPath is the path to the TLS private key file + TLSKeyPath = fmt.Sprintf("/etc/pki/tls/private/%s", tls.PrivateKey) ) -// KSMDeployment requests Deployment of kube-state-metrics +// KSMTLSConfig creates TLS configuration for kube-state-metrics func KSMTLSConfig( instance *telemetryv1.Ceilometer, labels map[string]string, diff --git a/pkg/availability/statefulset.go b/pkg/availability/statefulset.go index 83aa97145..f09c39059 100644 --- a/pkg/availability/statefulset.go +++ b/pkg/availability/statefulset.go @@ -85,7 +85,7 @@ func KSMStatefulSet( volumes := []corev1.Volume{} mounts := []corev1.VolumeMount{} if instance.Spec.KSMTLS.Enabled() { - svc, err := instance.Spec.KSMTLS.GenericService.ToService() + svc, err := instance.Spec.KSMTLS.ToService() if err != nil { return nil, err } diff --git a/pkg/ceilometer/const.go b/pkg/ceilometer/const.go index 87c1ec91a..8945fe175 100644 --- a/pkg/ceilometer/const.go +++ b/pkg/ceilometer/const.go @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package ceilometer provides functionality for managing OpenStack Ceilometer telemetry components package ceilometer const ( diff --git a/pkg/ceilometer/service.go b/pkg/ceilometer/service.go index 060e6c9da..ae406828c 100644 --- a/pkg/ceilometer/service.go +++ b/pkg/ceilometer/service.go @@ -19,6 +19,7 @@ import ( helper "github.com/openstack-k8s-operators/lib-common/modules/common/helper" svc "github.com/openstack-k8s-operators/lib-common/modules/common/service" telemetryv1 "github.com/openstack-k8s-operators/telemetry-operator/api/v1beta1" + telemetry "github.com/openstack-k8s-operators/telemetry-operator/pkg/telemetry" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" @@ -44,12 +45,16 @@ func Service( }, } + if port < 0 || port > 65535 { + return nil, controllerutil.OperationResultNone, fmt.Errorf("%w: %d", telemetry.ErrInvalidPortNumber, port) + } + op, err := controllerutil.CreateOrUpdate(context.TODO(), helper.GetClient(), service, func() error { service.Labels = labels service.Spec.Selector = labels service.Spec.Ports = []corev1.ServicePort{{ Protocol: "TCP", - Port: int32(port), + Port: int32(port), //nolint:gosec // G115: Port validated to be within valid range TargetPort: intstr.FromInt(port), }} diff --git a/pkg/ceilometer/statefulset.go b/pkg/ceilometer/statefulset.go index b87ffc84c..b3aae53ae 100644 --- a/pkg/ceilometer/statefulset.go +++ b/pkg/ceilometer/statefulset.go @@ -35,8 +35,10 @@ import ( const ( // ServiceCommand - - ServiceCommand = "/usr/local/bin/kolla_set_configs && /usr/local/bin/kolla_start" - CentralHCScript = "/var/lib/openstack/bin/centralhealth.py" + ServiceCommand = "/usr/local/bin/kolla_set_configs && /usr/local/bin/kolla_start" + // CentralHCScript is the path to the central health check script + CentralHCScript = "/var/lib/openstack/bin/centralhealth.py" + // NotificationHCScript is the path to the notification health check script NotificationHCScript = "/var/lib/openstack/bin/notificationhealth.py" ) @@ -110,7 +112,7 @@ func StatefulSet( httpdVolumeMounts := getHttpdVolumeMounts() if instance.Spec.TLS.Enabled() { - svc, err := instance.Spec.TLS.GenericService.ToService() + svc, err := instance.Spec.TLS.ToService() if err != nil { return nil, err } diff --git a/pkg/dashboards/openstack-ceilometer-ipmi.go b/pkg/dashboards/openstack-ceilometer-ipmi.go index 3e96fc80d..8be1133b4 100644 --- a/pkg/dashboards/openstack-ceilometer-ipmi.go +++ b/pkg/dashboards/openstack-ceilometer-ipmi.go @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package dashboards provides OpenStack monitoring dashboard configurations package dashboards import ( @@ -21,6 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// OpenstackCeilometerIpmi creates a ConfigMap containing the OpenStack Ceilometer IPMI dashboard func OpenstackCeilometerIpmi(dsName string) *corev1.ConfigMap { dashboardCM := &corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/dashboards/openstack-cloud.go b/pkg/dashboards/openstack-cloud.go index 7597490e0..c8ec5dff3 100644 --- a/pkg/dashboards/openstack-cloud.go +++ b/pkg/dashboards/openstack-cloud.go @@ -21,6 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// OpenstackCloud creates a ConfigMap containing the OpenStack Cloud dashboard func OpenstackCloud(dsName string) *corev1.ConfigMap { dashboardCM := &corev1.ConfigMap{ diff --git a/pkg/dashboards/openstack-kepler.go b/pkg/dashboards/openstack-kepler.go index b21bf3fa7..a3e2b85f8 100644 --- a/pkg/dashboards/openstack-kepler.go +++ b/pkg/dashboards/openstack-kepler.go @@ -21,6 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// OpenstackKepler creates a ConfigMap containing the OpenStack Kepler power monitoring dashboard func OpenstackKepler(dsName string) *corev1.ConfigMap { dashboardCM := &corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/dashboards/openstack-network-traffic.go b/pkg/dashboards/openstack-network-traffic.go index 5611ffda4..0ef5dcdf4 100644 --- a/pkg/dashboards/openstack-network-traffic.go +++ b/pkg/dashboards/openstack-network-traffic.go @@ -21,6 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// OpenstackNetworkTraffic creates a ConfigMap containing the OpenStack network traffic dashboard func OpenstackNetworkTraffic(dsName string) *corev1.ConfigMap { dashboardCM := &corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/dashboards/openstack-node.go b/pkg/dashboards/openstack-node.go index 66d7fde6b..b89f8785b 100644 --- a/pkg/dashboards/openstack-node.go +++ b/pkg/dashboards/openstack-node.go @@ -21,6 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// OpenstackNode creates a ConfigMap containing the OpenStack node monitoring dashboard func OpenstackNode(dsName string) *corev1.ConfigMap { dashboardCM := &corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/dashboards/openstack-openstack-network.go b/pkg/dashboards/openstack-openstack-network.go index ba23ff34e..57a232d08 100644 --- a/pkg/dashboards/openstack-openstack-network.go +++ b/pkg/dashboards/openstack-openstack-network.go @@ -21,6 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// OpenstackOpenstackNetwork creates a ConfigMap containing the OpenStack network monitoring dashboard func OpenstackOpenstackNetwork(dsName string, hasDpdk bool) *corev1.ConfigMap { dashBoardOVN := `{ diff --git a/pkg/dashboards/openstack-rabbitmq.go b/pkg/dashboards/openstack-rabbitmq.go index 35ab7b4a0..3cb541147 100644 --- a/pkg/dashboards/openstack-rabbitmq.go +++ b/pkg/dashboards/openstack-rabbitmq.go @@ -21,6 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// OpenstackRabbitmq creates a ConfigMap containing the OpenStack RabbitMQ monitoring dashboard func OpenstackRabbitmq(dsName string) *corev1.ConfigMap { dashboardCM := &corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/dashboards/openstack-vm.go b/pkg/dashboards/openstack-vm.go index fbedb4524..fda9c595a 100644 --- a/pkg/dashboards/openstack-vm.go +++ b/pkg/dashboards/openstack-vm.go @@ -21,6 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// OpenstackVM creates a ConfigMap containing the OpenStack virtual machine monitoring dashboard func OpenstackVM(dsName string) *corev1.ConfigMap { dashboardCM := &corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/logging/const.go b/pkg/logging/const.go index 14458fb11..bb1203fa6 100644 --- a/pkg/logging/const.go +++ b/pkg/logging/const.go @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package logging provides constants and utilities for telemetry logging functionality package logging const ( diff --git a/pkg/metricstorage/alertmanager_service_patch.go b/pkg/metricstorage/alertmanager_service_patch.go index 207485317..1ad353431 100644 --- a/pkg/metricstorage/alertmanager_service_patch.go +++ b/pkg/metricstorage/alertmanager_service_patch.go @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package metricstorage provides functionality for managing telemetry metrics storage components package metricstorage import ( diff --git a/pkg/metricstorage/const.go b/pkg/metricstorage/const.go index 983dcf045..edfb0e8a9 100644 --- a/pkg/metricstorage/const.go +++ b/pkg/metricstorage/const.go @@ -16,10 +16,15 @@ limitations under the License. package metricstorage const ( + // RabbitMQPrometheusPort is the port number for RabbitMQ Prometheus metrics RabbitMQPrometheusPort = 15691 - PrometheusHost = "host" - PrometheusPort = "port" + // PrometheusHost is the key for Prometheus host configuration + PrometheusHost = "host" + // PrometheusPort is the key for Prometheus port configuration + PrometheusPort = "port" + // PrometheusCaCertSecret is the key for Prometheus CA certificate secret PrometheusCaCertSecret = "ca_secret" - PrometheusCaCertKey = "ca_key" + // PrometheusCaCertKey is the key for Prometheus CA certificate key + PrometheusCaCertKey = "ca_key" ) diff --git a/pkg/metricstorage/dashboard_datasource.go b/pkg/metricstorage/dashboard_datasource.go index 330abb2de..c977bf57c 100644 --- a/pkg/metricstorage/dashboard_datasource.go +++ b/pkg/metricstorage/dashboard_datasource.go @@ -26,6 +26,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" ) +// DashboardDatasourceData creates the data map for dashboard datasource configuration func DashboardDatasourceData(ctx context.Context, c client.Client, instance *telemetryv1.MetricStorage, datasourceName string, namespace string) (map[string]string, error) { scheme := "http" diff --git a/pkg/metricstorage/dashboard_objects.go b/pkg/metricstorage/dashboard_objects.go index 059e3fa0c..8afa75f18 100644 --- a/pkg/metricstorage/dashboard_objects.go +++ b/pkg/metricstorage/dashboard_objects.go @@ -29,8 +29,10 @@ import ( monv1 "github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring/v1" ) +// DashboardArtifactsNamespace is the namespace where dashboard artifacts are stored const DashboardArtifactsNamespace = "openshift-config-managed" +// DeleteDashboardObjects removes dashboard-related objects for the MetricStorage instance func DeleteDashboardObjects(ctx context.Context, instance *telemetryv1.MetricStorage, helper *helper.Helper) (ctrl.Result, error) { promRule := &monv1.PrometheusRule{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/metricstorage/dashboard_prometheus_rule.go b/pkg/metricstorage/dashboard_prometheus_rule.go index 3efa11fbf..d8bd66b25 100644 --- a/pkg/metricstorage/dashboard_prometheus_rule.go +++ b/pkg/metricstorage/dashboard_prometheus_rule.go @@ -23,6 +23,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" ) +// DashboardPrometheusRule creates a PrometheusRule for dashboard metrics func DashboardPrometheusRule( instance *telemetryv1.MetricStorage, labels map[string]string, diff --git a/pkg/metricstorage/monitoring_stack.go b/pkg/metricstorage/monitoring_stack.go index 3aec7b20d..347171692 100644 --- a/pkg/metricstorage/monitoring_stack.go +++ b/pkg/metricstorage/monitoring_stack.go @@ -17,10 +17,10 @@ limitations under the License. package metricstorage import ( - "fmt" "reflect" telemetryv1 "github.com/openstack-k8s-operators/telemetry-operator/api/v1beta1" + telemetry "github.com/openstack-k8s-operators/telemetry-operator/pkg/telemetry" monv1 "github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring/v1" obov1 "github.com/rhobs/observability-operator/pkg/apis/monitoring/v1alpha1" corev1 "k8s.io/api/core/v1" @@ -34,7 +34,7 @@ func MonitoringStack( labels map[string]string, ) (*obov1.MonitoringStack, error) { if instance.Spec.MonitoringStack == nil { - return nil, fmt.Errorf("monitoringStack is set to nil") + return nil, telemetry.ErrMonitoringStackNil } pvc, err := getPVCSpec(instance) if err != nil { @@ -56,7 +56,7 @@ func MonitoringStack( ScrapeInterval: &scrapeInterval, PersistentVolumeClaim: pvc, }, - Retention: monv1.Duration(instance.Spec.MonitoringStack.Storage.Retention), + Retention: monv1.Duration(instance.Spec.MonitoringStack.Retention), ResourceSelector: &metav1.LabelSelector{ MatchLabels: labels, }, @@ -66,10 +66,10 @@ func MonitoringStack( } func getPVCSpec(instance *telemetryv1.MetricStorage) (*corev1.PersistentVolumeClaimSpec, error) { - if instance.Spec.MonitoringStack.Storage.Strategy == "persistent" { - persistentSpec := instance.Spec.MonitoringStack.Storage.Persistent + if instance.Spec.MonitoringStack.Strategy == "persistent" { + persistentSpec := instance.Spec.MonitoringStack.Persistent if persistentSpec == nil { - return nil, fmt.Errorf("Received a nil value in persistent storage config") + return nil, telemetry.ErrPersistentStorageConfigNil } pvc := corev1.PersistentVolumeClaimSpec{} if !reflect.DeepEqual(persistentSpec.PvcStorageSelector, metav1.LabelSelector{}) { diff --git a/pkg/metricstorage/scrape_config.go b/pkg/metricstorage/scrape_config.go index b7cb5da78..1d969c2bf 100644 --- a/pkg/metricstorage/scrape_config.go +++ b/pkg/metricstorage/scrape_config.go @@ -27,6 +27,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// LabeledTarget represents a monitoring target with IP and FQDN labels type LabeledTarget struct { IP string FQDN string diff --git a/pkg/mysqldexporter/const.go b/pkg/mysqldexporter/const.go index 66e468257..16001b141 100644 --- a/pkg/mysqldexporter/const.go +++ b/pkg/mysqldexporter/const.go @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package mysqldexporter provides functionality for managing MySQL exporter components package mysqldexporter const ( diff --git a/pkg/mysqldexporter/statefulset.go b/pkg/mysqldexporter/statefulset.go index 74ac47413..cd3ea7ad2 100644 --- a/pkg/mysqldexporter/statefulset.go +++ b/pkg/mysqldexporter/statefulset.go @@ -79,7 +79,7 @@ func StatefulSet( volumeMounts := getVolumeMounts() if instance.Spec.MysqldExporterTLS.Enabled() { - svc, err := instance.Spec.MysqldExporterTLS.GenericService.ToService() + svc, err := instance.Spec.MysqldExporterTLS.ToService() if err != nil { return nil, err } diff --git a/pkg/telemetry/const.go b/pkg/telemetry/const.go index 01e4c5700..3db7c5b17 100644 --- a/pkg/telemetry/const.go +++ b/pkg/telemetry/const.go @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package telemetry provides constants and utilities for OpenStack telemetry service management package telemetry const ( diff --git a/pkg/telemetry/errors.go b/pkg/telemetry/errors.go new file mode 100644 index 000000000..456839bb9 --- /dev/null +++ b/pkg/telemetry/errors.go @@ -0,0 +1,34 @@ +/* +Copyright 2024. + +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 telemetry + +import "errors" + +// ErrNetworkAttachmentDefinitionNotFound indicates that a network-attachment-definition was not found. +var ErrNetworkAttachmentDefinitionNotFound = errors.New("network-attachment-definition not found") + +// ErrNodeIPOrHostnameNotFound indicates that an IP or HostName could not be found for a node. +var ErrNodeIPOrHostnameNotFound = errors.New("failed to find an IP or HostName for node") + +// ErrMonitoringStackNil indicates that the monitoringStack is set to nil. +var ErrMonitoringStackNil = errors.New("monitoringStack is set to nil") + +// ErrPersistentStorageConfigNil indicates that a nil value was received in persistent storage config. +var ErrPersistentStorageConfigNil = errors.New("received a nil value in persistent storage config") + +// ErrInvalidPortNumber indicates that an invalid port number was provided. +var ErrInvalidPortNumber = errors.New("invalid port number, must be between 0 and 65535") diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index e19c58ca3..111d98821 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -14,7 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -package utils +// Package utils provides utility functions for telemetry operator components +package utils //nolint:revive // utils is a legitimate package name for utility functions import ( "context"