diff --git a/.ci-operator.yaml b/.ci-operator.yaml index 810dbb51..1a05e606 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-designate-operator.yaml b/.github/workflows/build-designate-operator.yaml index 7a6ac2bc..b27a6060 100644 --- a/.github/workflows/build-designate-operator.yaml +++ b/.github/workflows/build-designate-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: designate - 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 57b6bb7a..e0bb20f5 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: designate 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 dadc01e6..17654e67 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: designate + 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 8bdf0f3b..bfdf6541 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,10 +1,20 @@ +version: 2 + linters: # Enable specific linter # https://golangci-lint.run/usage/linters/#enabled-by-default enable: - errorlint - revive - - gofmt + - ginkgolinter - govet + - gosec + - errname + - err113 + +formatters: + enable: + - gofmt + run: timeout: 5m diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5cecc353..1504e782 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 61ab7347..38d007f0 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 f24ef46d..4c3f8c7b 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ endif DEFAULT_IMG ?= quay.io/openstack-k8s-operators/designate-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)) @@ -114,9 +114,10 @@ tidy: ## Run go mod tidy on every mod file in the repo go mod tidy cd ./api && go mod tidy +GOLANGCI_LINT_VERSION ?= v2.4.0 .PHONY: golangci-lint golangci-lint: - test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.59.1 + test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s $(GOLANGCI_LINT_VERSION) $(LOCALBIN)/golangci-lint run --fix --timeout=5m .PHONY: test @@ -186,9 +187,9 @@ GINKGO ?= $(LOCALBIN)/ginkgo ## Tool Versions KUSTOMIZE_VERSION ?= v3.8.7 -CONTROLLER_TOOLS_VERSION ?= v0.14.0 +CONTROLLER_TOOLS_VERSION ?= v0.18.0 OPERATOR_SDK_VERSION ?= v1.31.0 -GOTOOLCHAIN_VERSION ?= go1.21.0 +GOTOOLCHAIN_VERSION ?= go1.24.0 KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" .PHONY: kustomize @@ -204,7 +205,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: $(OPERATOR_SDK) ## Download operator-sdk locally if necessary. diff --git a/api/bases/designate.openstack.org_designateapis.yaml b/api/bases/designate.openstack.org_designateapis.yaml index fef19eb5..1a3d526d 100644 --- a/api/bases/designate.openstack.org_designateapis.yaml +++ b/api/bases/designate.openstack.org_designateapis.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: designateapis.designate.openstack.org spec: group: designate.openstack.org @@ -105,7 +105,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment resource @@ -144,7 +143,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: @@ -153,7 +152,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: @@ -308,11 +307,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. @@ -323,6 +320,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 diff --git a/api/bases/designate.openstack.org_designatebackendbind9s.yaml b/api/bases/designate.openstack.org_designatebackendbind9s.yaml index fdbf25b6..e5ef1ec6 100644 --- a/api/bases/designate.openstack.org_designatebackendbind9s.yaml +++ b/api/bases/designate.openstack.org_designatebackendbind9s.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: designatebackendbind9s.designate.openstack.org spec: group: designate.openstack.org @@ -107,7 +107,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 netUtilsImage: description: NetUtilsImage - NetUtils container image @@ -148,7 +147,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: @@ -157,7 +156,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: @@ -310,11 +309,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. @@ -325,6 +322,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 diff --git a/api/bases/designate.openstack.org_designatecentrals.yaml b/api/bases/designate.openstack.org_designatecentrals.yaml index 88693435..41548100 100644 --- a/api/bases/designate.openstack.org_designatecentrals.yaml +++ b/api/bases/designate.openstack.org_designatecentrals.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: designatecentrals.designate.openstack.org spec: group: designate.openstack.org @@ -102,7 +102,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment resource @@ -152,11 +151,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. @@ -167,6 +164,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 diff --git a/api/bases/designate.openstack.org_designatemdnses.yaml b/api/bases/designate.openstack.org_designatemdnses.yaml index 0c5e236a..2116a5bb 100644 --- a/api/bases/designate.openstack.org_designatemdnses.yaml +++ b/api/bases/designate.openstack.org_designatemdnses.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: designatemdnses.designate.openstack.org spec: group: designate.openstack.org @@ -107,7 +107,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 netUtilsImage: description: NetUtilsImage - NetUtils container image @@ -148,7 +147,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: @@ -157,7 +156,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: @@ -310,11 +309,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. @@ -325,6 +322,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 diff --git a/api/bases/designate.openstack.org_designateproducers.yaml b/api/bases/designate.openstack.org_designateproducers.yaml index ff522e09..ed0dd834 100644 --- a/api/bases/designate.openstack.org_designateproducers.yaml +++ b/api/bases/designate.openstack.org_designateproducers.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: designateproducers.designate.openstack.org spec: group: designate.openstack.org @@ -101,7 +101,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment resource @@ -151,11 +150,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. @@ -166,6 +163,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 diff --git a/api/bases/designate.openstack.org_designates.yaml b/api/bases/designate.openstack.org_designates.yaml index f967c2db..d38c581e 100644 --- a/api/bases/designate.openstack.org_designates.yaml +++ b/api/bases/designate.openstack.org_designates.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: designates.designate.openstack.org spec: group: designate.openstack.org @@ -93,7 +93,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 designateAPI: description: DesignateAPI - Spec definition for the API service of @@ -152,7 +151,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment @@ -191,7 +189,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: @@ -200,7 +198,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: @@ -355,11 +353,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. @@ -370,6 +366,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 @@ -532,7 +534,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 netUtilsImage: description: NetUtilsImage - NetUtils container image @@ -573,7 +574,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: @@ -582,7 +583,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: @@ -735,11 +736,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. @@ -750,6 +749,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 @@ -878,7 +883,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment @@ -928,11 +932,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. @@ -943,6 +945,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 @@ -1078,7 +1086,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 netUtilsImage: description: NetUtilsImage - NetUtils container image @@ -1119,7 +1126,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: @@ -1128,7 +1135,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: @@ -1281,11 +1288,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. @@ -1296,6 +1301,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 @@ -1431,7 +1442,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment @@ -1481,11 +1491,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. @@ -1496,6 +1504,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 @@ -1601,7 +1615,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment @@ -1639,7 +1652,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: @@ -1648,7 +1661,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: @@ -1789,11 +1802,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. @@ -1804,6 +1815,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 @@ -1930,7 +1947,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment @@ -1974,11 +1990,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. @@ -1989,6 +2003,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 @@ -2130,11 +2150,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. @@ -2145,6 +2163,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 diff --git a/api/bases/designate.openstack.org_designateunbounds.yaml b/api/bases/designate.openstack.org_designateunbounds.yaml index 58e5cac2..8d6de0e3 100644 --- a/api/bases/designate.openstack.org_designateunbounds.yaml +++ b/api/bases/designate.openstack.org_designateunbounds.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: designateunbounds.designate.openstack.org spec: group: designate.openstack.org @@ -72,7 +72,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment resource @@ -110,7 +109,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: @@ -119,7 +118,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: @@ -260,11 +259,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. @@ -275,6 +272,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 diff --git a/api/bases/designate.openstack.org_designateworkers.yaml b/api/bases/designate.openstack.org_designateworkers.yaml index 0bfc895e..d33875a2 100644 --- a/api/bases/designate.openstack.org_designateworkers.yaml +++ b/api/bases/designate.openstack.org_designateworkers.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: designateworkers.designate.openstack.org spec: group: designate.openstack.org @@ -97,7 +97,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment resource @@ -141,11 +140,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. @@ -156,6 +153,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 diff --git a/api/go.mod b/api/go.mod index e36bb2b5..1be901b0 100644 --- a/api/go.mod +++ b/api/go.mod @@ -1,29 +1,30 @@ module github.com/openstack-k8s-operators/designate-operator/api -go 1.21 +go 1.24 require ( github.com/onsi/ginkgo/v2 v2.20.1 - github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250823121217-7e1cd2e3dd03 - github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250823121217-7e1cd2e3dd03 - 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 + github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250922082314-c83d83092a04 + github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250922082314-c83d83092a04 + 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/onsi/gomega v1.34.1 - github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250909143828-e33d35ffd64f + github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250922155301-057562fb7182 ) 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 @@ -46,32 +47,31 @@ 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.51.1 // 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/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.34.0 // indirect - golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sys v0.30.0 // indirect golang.org/x/term v0.29.0 // indirect golang.org/x/text v0.22.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 4426d607..1bd97c3a 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.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= -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,35 +71,37 @@ 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.20250909143828-e33d35ffd64f h1:chuu4iBT5sXHYw8aPeP/pWC+S3yGo6hdy39foP7c5vs= -github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250909143828-e33d35ffd64f/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/lib-common/modules/storage v0.6.1-0.20250823121217-7e1cd2e3dd03 h1:DrKbzsweRx8VBNb5ur+/XcHSi+MR3VdzCsIEXYGc5SM= -github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250823121217-7e1cd2e3dd03/go.mod h1:U3LQ4Nz2+syTPfW66bSLv6OzefLpsqxWLdX9AFotRPA= +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/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/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 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/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.51.1 h1:eIjN50Bwglz6a/c3hAgSMcofL3nD+nFQkV6Dd4DsQCw= -github.com/prometheus/common v0.51.1/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= -github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= -github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +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.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/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 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= @@ -110,43 +111,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.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= -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.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= golang.org/x/sys v0.30.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.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= 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.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= @@ -155,7 +143,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= @@ -164,15 +151,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= @@ -180,24 +165,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/designate.openstack.org_designateapis.yaml b/config/crd/bases/designate.openstack.org_designateapis.yaml index fef19eb5..1a3d526d 100644 --- a/config/crd/bases/designate.openstack.org_designateapis.yaml +++ b/config/crd/bases/designate.openstack.org_designateapis.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: designateapis.designate.openstack.org spec: group: designate.openstack.org @@ -105,7 +105,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment resource @@ -144,7 +143,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: @@ -153,7 +152,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: @@ -308,11 +307,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. @@ -323,6 +320,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 diff --git a/config/crd/bases/designate.openstack.org_designatebackendbind9s.yaml b/config/crd/bases/designate.openstack.org_designatebackendbind9s.yaml index fdbf25b6..e5ef1ec6 100644 --- a/config/crd/bases/designate.openstack.org_designatebackendbind9s.yaml +++ b/config/crd/bases/designate.openstack.org_designatebackendbind9s.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: designatebackendbind9s.designate.openstack.org spec: group: designate.openstack.org @@ -107,7 +107,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 netUtilsImage: description: NetUtilsImage - NetUtils container image @@ -148,7 +147,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: @@ -157,7 +156,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: @@ -310,11 +309,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. @@ -325,6 +322,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 diff --git a/config/crd/bases/designate.openstack.org_designatecentrals.yaml b/config/crd/bases/designate.openstack.org_designatecentrals.yaml index 88693435..41548100 100644 --- a/config/crd/bases/designate.openstack.org_designatecentrals.yaml +++ b/config/crd/bases/designate.openstack.org_designatecentrals.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: designatecentrals.designate.openstack.org spec: group: designate.openstack.org @@ -102,7 +102,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment resource @@ -152,11 +151,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. @@ -167,6 +164,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 diff --git a/config/crd/bases/designate.openstack.org_designatemdnses.yaml b/config/crd/bases/designate.openstack.org_designatemdnses.yaml index 0c5e236a..2116a5bb 100644 --- a/config/crd/bases/designate.openstack.org_designatemdnses.yaml +++ b/config/crd/bases/designate.openstack.org_designatemdnses.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: designatemdnses.designate.openstack.org spec: group: designate.openstack.org @@ -107,7 +107,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 netUtilsImage: description: NetUtilsImage - NetUtils container image @@ -148,7 +147,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: @@ -157,7 +156,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: @@ -310,11 +309,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. @@ -325,6 +322,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 diff --git a/config/crd/bases/designate.openstack.org_designateproducers.yaml b/config/crd/bases/designate.openstack.org_designateproducers.yaml index ff522e09..ed0dd834 100644 --- a/config/crd/bases/designate.openstack.org_designateproducers.yaml +++ b/config/crd/bases/designate.openstack.org_designateproducers.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: designateproducers.designate.openstack.org spec: group: designate.openstack.org @@ -101,7 +101,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment resource @@ -151,11 +150,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. @@ -166,6 +163,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 diff --git a/config/crd/bases/designate.openstack.org_designates.yaml b/config/crd/bases/designate.openstack.org_designates.yaml index f967c2db..d38c581e 100644 --- a/config/crd/bases/designate.openstack.org_designates.yaml +++ b/config/crd/bases/designate.openstack.org_designates.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: designates.designate.openstack.org spec: group: designate.openstack.org @@ -93,7 +93,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 designateAPI: description: DesignateAPI - Spec definition for the API service of @@ -152,7 +151,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment @@ -191,7 +189,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: @@ -200,7 +198,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: @@ -355,11 +353,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. @@ -370,6 +366,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 @@ -532,7 +534,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 netUtilsImage: description: NetUtilsImage - NetUtils container image @@ -573,7 +574,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: @@ -582,7 +583,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: @@ -735,11 +736,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. @@ -750,6 +749,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 @@ -878,7 +883,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment @@ -928,11 +932,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. @@ -943,6 +945,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 @@ -1078,7 +1086,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 netUtilsImage: description: NetUtilsImage - NetUtils container image @@ -1119,7 +1126,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: @@ -1128,7 +1135,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: @@ -1281,11 +1288,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. @@ -1296,6 +1301,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 @@ -1431,7 +1442,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment @@ -1481,11 +1491,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. @@ -1496,6 +1504,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 @@ -1601,7 +1615,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment @@ -1639,7 +1652,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: @@ -1648,7 +1661,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: @@ -1789,11 +1802,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. @@ -1804,6 +1815,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 @@ -1930,7 +1947,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment @@ -1974,11 +1990,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. @@ -1989,6 +2003,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 @@ -2130,11 +2150,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. @@ -2145,6 +2163,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 diff --git a/config/crd/bases/designate.openstack.org_designateunbounds.yaml b/config/crd/bases/designate.openstack.org_designateunbounds.yaml index 58e5cac2..8d6de0e3 100644 --- a/config/crd/bases/designate.openstack.org_designateunbounds.yaml +++ b/config/crd/bases/designate.openstack.org_designateunbounds.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: designateunbounds.designate.openstack.org spec: group: designate.openstack.org @@ -72,7 +72,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment resource @@ -110,7 +109,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: @@ -119,7 +118,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: @@ -260,11 +259,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. @@ -275,6 +272,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 diff --git a/config/crd/bases/designate.openstack.org_designateworkers.yaml b/config/crd/bases/designate.openstack.org_designateworkers.yaml index 0bfc895e..d33875a2 100644 --- a/config/crd/bases/designate.openstack.org_designateworkers.yaml +++ b/config/crd/bases/designate.openstack.org_designateworkers.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: designateworkers.designate.openstack.org spec: group: designate.openstack.org @@ -97,7 +97,6 @@ spec: description: |- ConfigOverwrite - interface to overwrite default config files like e.g. 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 networkAttachments: description: NetworkAttachments is a list of NetworkAttachment resource @@ -141,11 +140,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. @@ -156,6 +153,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 diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 1f294a4d..702c2951 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -7,7 +7,10 @@ rules: - apiGroups: - "" resources: + - configmaps - pods + - secrets + - services verbs: - create - delete @@ -31,17 +34,6 @@ rules: - apps resources: - deployments - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - apps - resources: - statefulsets verbs: - create @@ -63,241 +55,16 @@ rules: - patch - update - watch -- apiGroups: - - "" - resources: - - configmaps - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - pods - verbs: - - get - - list -- apiGroups: - - "" - resources: - - secrets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - services - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - apiGroups: - designate.openstack.org resources: - designateapis - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - designate.openstack.org - resources: - - designateapis/finalizers - verbs: - - patch - - update -- apiGroups: - - designate.openstack.org - resources: - - designateapis/status - verbs: - - get - - patch - - update -- apiGroups: - - designate.openstack.org - resources: - designatebackendbind9s - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - designate.openstack.org - resources: - - designatebackendbind9s/finalizers - verbs: - - patch - - update -- apiGroups: - - designate.openstack.org - resources: - - designatebackendbind9s/status - verbs: - - get - - patch - - update -- apiGroups: - - designate.openstack.org - resources: - designatecentrals - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - designate.openstack.org - resources: - - designatecentrals/finalizers - verbs: - - patch - - update -- apiGroups: - - designate.openstack.org - resources: - - designatecentrals/status - verbs: - - get - - patch - - update -- apiGroups: - - designate.openstack.org - resources: - designatemdnses - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - designate.openstack.org - resources: - - designatemdnses/finalizers - verbs: - - patch - - update -- apiGroups: - - designate.openstack.org - resources: - - designatemdnses/status - verbs: - - get - - patch - - update -- apiGroups: - - designate.openstack.org - resources: - designateproducers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - designate.openstack.org - resources: - - designateproducers/finalizers - verbs: - - patch - - update -- apiGroups: - - designate.openstack.org - resources: - - designateproducers/status - verbs: - - get - - patch - - update -- apiGroups: - - designate.openstack.org - resources: - designates - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - designate.openstack.org - resources: - - designates/finalizers - verbs: - - patch - - update -- apiGroups: - - designate.openstack.org - resources: - - designates/status - verbs: - - get - - patch - - update -- apiGroups: - - designate.openstack.org - resources: - designateunbounds - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - designate.openstack.org - resources: - - designateunbounds/finalizers - verbs: - - patch - - update -- apiGroups: - - designate.openstack.org - resources: - - designateunbounds/status - verbs: - - get - - patch - - update -- apiGroups: - - designate.openstack.org - resources: - designateworkers verbs: - create @@ -310,6 +77,13 @@ rules: - apiGroups: - designate.openstack.org resources: + - designateapis/finalizers + - designatebackendbind9s/finalizers + - designatecentrals/finalizers + - designatemdnses/finalizers + - designateproducers/finalizers + - designates/finalizers + - designateunbounds/finalizers - designateworkers/finalizers verbs: - patch @@ -317,6 +91,13 @@ rules: - apiGroups: - designate.openstack.org resources: + - designateapis/status + - designatebackendbind9s/status + - designatecentrals/status + - designatemdnses/status + - designateproducers/status + - designates/status + - designateunbounds/status - designateworkers/status verbs: - get @@ -342,17 +123,6 @@ rules: - keystone.openstack.org resources: - keystoneendpoints - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - keystone.openstack.org - resources: - keystoneservices verbs: - create @@ -366,6 +136,7 @@ rules: - mariadb.openstack.org resources: - mariadbaccounts + - mariadbdatabases verbs: - create - delete @@ -381,18 +152,6 @@ rules: verbs: - patch - update -- apiGroups: - - mariadb.openstack.org - resources: - - mariadbdatabases - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - apiGroups: - rabbitmq.openstack.org resources: @@ -409,16 +168,6 @@ rules: - rbac.authorization.k8s.io resources: - rolebindings - verbs: - - create - - get - - list - - patch - - update - - watch -- apiGroups: - - rbac.authorization.k8s.io - resources: - roles verbs: - create diff --git a/controllers/designate_common.go b/controllers/designate_common.go index b664d34b..20f29135 100644 --- a/controllers/designate_common.go +++ b/controllers/designate_common.go @@ -11,6 +11,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package controllers implements the designate-operator Kubernetes controllers. package controllers import ( diff --git a/controllers/designate_controller.go b/controllers/designate_controller.go index 317c4bcf..a9587229 100644 --- a/controllers/designate_controller.go +++ b/controllers/designate_controller.go @@ -181,7 +181,7 @@ func (r *DesignateReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( // Fetch the Designate instance instance := &designatev1beta1.Designate{} - 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. @@ -282,7 +282,7 @@ func (r *DesignateReconciler) Reconcile(ctx context.Context, req ctrl.Request) ( // fields to index to reconcile when change const ( passwordSecretField = ".spec.secret" - caBundleSecretNameField = ".spec.tls.caBundleSecretName" + caBundleSecretNameField = ".spec.tls.caBundleSecretName" // #nosec G101 tlsAPIInternalField = ".spec.tls.api.internal.secretName" tlsAPIPublicField = ".spec.tls.api.public.secretName" topologyField = ".spec.topologyRef.Name" @@ -311,7 +311,7 @@ func (r *DesignateReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Man listOpts := []client.ListOption{ client.InNamespace(o.GetNamespace()), } - if err := r.Client.List(context.Background(), designates, listOpts...); err != nil { + if err := r.List(context.Background(), designates, listOpts...); err != nil { Log.Error(err, "Unable to retrieve Designate CRs %v") return nil } @@ -767,19 +767,19 @@ func (r *DesignateReconciler) reconcileNormal(ctx context.Context, instance *des } // Fetch allocated ips from Mdns and Bind config maps and store them in allocatedIPs - mdnsLabels := labels.GetLabels(instance, labels.GetGroupLabel(instance.ObjectMeta.Name), map[string]string{}) + mdnsLabels := labels.GetLabels(instance, labels.GetGroupLabel(instance.Name), map[string]string{}) mdnsConfigMap, err := r.handleConfigMap(ctx, helper, instance, designate.MdnsPredIPConfigMap, mdnsLabels) if err != nil { return ctrl.Result{}, err } - bindLabels := labels.GetLabels(instance, labels.GetGroupLabel(instance.ObjectMeta.Name), map[string]string{}) + bindLabels := labels.GetLabels(instance, labels.GetGroupLabel(instance.Name), map[string]string{}) bindConfigMap, err := r.handleConfigMap(ctx, helper, instance, designate.BindPredIPConfigMap, bindLabels) if err != nil { return ctrl.Result{}, err } - nsRecordsLabels := labels.GetLabels(instance, labels.GetGroupLabel(instance.ObjectMeta.Name), map[string]string{}) + nsRecordsLabels := labels.GetLabels(instance, labels.GetGroupLabel(instance.Name), map[string]string{}) nsRecords, err := r.getNSRecords(ctx, helper, instance, nsRecordsLabels) if err != nil { return ctrl.Result{}, err @@ -1361,7 +1361,7 @@ func (r *DesignateReconciler) generateServiceConfigMaps( // TLS handling var tlsCfg *tls.Service - if instance.Spec.DesignateAPI.TLS.Ca.CaBundleSecretName != "" { + if instance.Spec.DesignateAPI.TLS.CaBundleSecretName != "" { tlsCfg = &tls.Service{} } @@ -1444,7 +1444,7 @@ func (r *DesignateReconciler) generateServiceConfigMaps( } if len(redisIPs) == 0 { - err = fmt.Errorf("unable to configure designate deployment without Redis") + err = designate.ErrRedisRequired instance.Status.Conditions.Set(condition.FalseCondition( condition.InputReadyCondition, condition.ErrorReason, @@ -1901,7 +1901,7 @@ func (r *DesignateReconciler) checkDesignateAPIGeneration( listOpts := []client.ListOption{ client.InNamespace(instance.Namespace), } - if err := r.Client.List(context.Background(), api, listOpts...); err != nil { + if err := r.List(context.Background(), api, listOpts...); err != nil { Log.Error(err, "Unable to retrieve DesignateAPI %w") return false, err } @@ -1922,7 +1922,7 @@ func (r *DesignateReconciler) checkDesignateCentralGeneration( listOpts := []client.ListOption{ client.InNamespace(instance.Namespace), } - if err := r.Client.List(context.Background(), central, listOpts...); err != nil { + if err := r.List(context.Background(), central, listOpts...); err != nil { Log.Error(err, "Unable to retrieve DesignateCentral %w") return false, err } @@ -1943,7 +1943,7 @@ func (r *DesignateReconciler) checkDesignateWorkerGeneration( listOpts := []client.ListOption{ client.InNamespace(instance.Namespace), } - if err := r.Client.List(context.Background(), worker, listOpts...); err != nil { + if err := r.List(context.Background(), worker, listOpts...); err != nil { Log.Error(err, "Unable to retrieve DesignateWorker %w") return false, err } @@ -1964,7 +1964,7 @@ func (r *DesignateReconciler) checkDesignateMdnsGeneration( listOpts := []client.ListOption{ client.InNamespace(instance.Namespace), } - if err := r.Client.List(context.Background(), mdns, listOpts...); err != nil { + if err := r.List(context.Background(), mdns, listOpts...); err != nil { Log.Error(err, "Unable to retrieve DesignateWorker %w") return false, err } @@ -1985,7 +1985,7 @@ func (r *DesignateReconciler) checkDesignateProducerGeneration( listOpts := []client.ListOption{ client.InNamespace(instance.Namespace), } - if err := r.Client.List(context.Background(), prd, listOpts...); err != nil { + if err := r.List(context.Background(), prd, listOpts...); err != nil { Log.Error(err, "Unable to retrieve DesignateProducer %w") return false, err } @@ -2006,7 +2006,7 @@ func (r *DesignateReconciler) checkDesignateBindGeneration( listOpts := []client.ListOption{ client.InNamespace(instance.Namespace), } - if err := r.Client.List(context.Background(), prd, listOpts...); err != nil { + if err := r.List(context.Background(), prd, listOpts...); err != nil { Log.Error(err, "Unable to retrieve DesignateBind %w") return false, err } @@ -2027,7 +2027,7 @@ func (r *DesignateReconciler) checkDesignateUnboundGeneration( listOpts := []client.ListOption{ client.InNamespace(instance.Namespace), } - if err := r.Client.List(context.Background(), prd, listOpts...); err != nil { + if err := r.List(context.Background(), prd, listOpts...); err != nil { Log.Error(err, "Unable to retrieve DesignateUnbound %w") return false, err } diff --git a/controllers/designateapi_controller.go b/controllers/designateapi_controller.go index 80061b7b..9f0a9cf2 100644 --- a/controllers/designateapi_controller.go +++ b/controllers/designateapi_controller.go @@ -125,7 +125,7 @@ func (r *DesignateAPIReconciler) Reconcile(ctx context.Context, req ctrl.Request // Fetch the DesignateAPI instance instance := &designatev1beta1.DesignateAPI{} - 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. @@ -293,8 +293,8 @@ func (r *DesignateAPIReconciler) SetupWithManager(ctx context.Context, mgr ctrl. } svcSecretFn := func(ctx context.Context, o client.Object) []reconcile.Request { - var namespace string = o.GetNamespace() - var secretName string = o.GetName() + var namespace = o.GetNamespace() + var secretName = o.GetName() result := []reconcile.Request{} // get all API CRs @@ -302,7 +302,7 @@ func (r *DesignateAPIReconciler) SetupWithManager(ctx context.Context, mgr ctrl. listOpts := []client.ListOption{ client.InNamespace(namespace), } - if err := r.Client.List(ctx, apis, listOpts...); err != nil { + if err := r.List(ctx, apis, listOpts...); err != nil { Log.Error(err, "Unable to retrieve API CRs") return nil } @@ -350,7 +350,7 @@ func (r *DesignateAPIReconciler) SetupWithManager(ctx context.Context, mgr ctrl. listOpts := []client.ListOption{ client.InNamespace(o.GetNamespace()), } - if err := r.Client.List(ctx, designateAPIs, listOpts...); err != nil { + if err := r.List(ctx, designateAPIs, listOpts...); err != nil { Log.Error(err, "Unable to retrieve DesignateAPI CRs %v") return nil } @@ -415,7 +415,7 @@ func (r *DesignateAPIReconciler) findObjectsForSrc(ctx context.Context, src clie FieldSelector: fields.OneTermEqualSelector(field, src.GetName()), Namespace: src.GetNamespace(), } - err := r.Client.List(context.TODO(), crList, listOps) + err := r.List(context.TODO(), crList, listOps) if err != nil { Log.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace())) return requests @@ -447,7 +447,7 @@ func (r *DesignateAPIReconciler) findObjectForSrc(ctx context.Context, src clien 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 @@ -760,7 +760,7 @@ func (r *DesignateAPIReconciler) reconcileNormal(ctx context.Context, instance * 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( @@ -784,7 +784,7 @@ func (r *DesignateAPIReconciler) reconcileNormal(ctx context.Context, instance * 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( @@ -1037,7 +1037,7 @@ func (r *DesignateAPIReconciler) reconcileNormal(ctx context.Context, instance * if networkReady { instance.Status.Conditions.MarkTrue(condition.NetworkAttachmentsReadyCondition, condition.NetworkAttachmentsReadyMessage) } else { - err := fmt.Errorf("not all pods have interfaces with ips as configured in NetworkAttachments: %s", instance.Spec.NetworkAttachments) + err := fmt.Errorf("%w: %s", designate.ErrNetworkAttachmentConfig, instance.Spec.NetworkAttachments) instance.Status.Conditions.Set(condition.FalseCondition( condition.NetworkAttachmentsReadyCondition, condition.ErrorReason, diff --git a/controllers/designatebackendbind9_controller.go b/controllers/designatebackendbind9_controller.go index 0fe754af..e04b1fee 100644 --- a/controllers/designatebackendbind9_controller.go +++ b/controllers/designatebackendbind9_controller.go @@ -103,7 +103,7 @@ func (r *DesignateBackendbind9Reconciler) Reconcile(ctx context.Context, req ctr // Fetch the DesignateBackendbind9 instance instance := &designatev1beta1.DesignateBackendbind9{} - 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. @@ -245,7 +245,7 @@ func (r *DesignateBackendbind9Reconciler) SetupWithManager(ctx context.Context, listOpts := []client.ListOption{ client.InNamespace(o.GetNamespace()), } - if err := r.Client.List(context.Background(), apis, listOpts...); err != nil { + if err := r.List(context.Background(), apis, listOpts...); err != nil { Log.Error(err, "Unable to retrieve Backendbind9 CRs %v") return nil } @@ -313,7 +313,7 @@ func (r *DesignateBackendbind9Reconciler) findObjectsForSrc(ctx context.Context, FieldSelector: fields.OneTermEqualSelector(field, src.GetName()), Namespace: src.GetNamespace(), } - err := r.Client.List(context.TODO(), crList, listOps) + err := r.List(context.TODO(), crList, listOps) if err != nil { Log.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace())) return requests @@ -398,7 +398,7 @@ func (r *DesignateBackendbind9Reconciler) reconcileNormal(ctx context.Context, i instance.Status.Conditions.MarkTrue(condition.InputReadyCondition, condition.InputReadyMessage) serviceLabels := map[string]string{ - common.AppSelector: instance.ObjectMeta.Name, + common.AppSelector: instance.Name, common.ComponentSelector: designatebackendbind9.Component, } @@ -631,7 +631,7 @@ func (r *DesignateBackendbind9Reconciler) reconcileNormal(ctx context.Context, i if networkReady { instance.Status.Conditions.MarkTrue(condition.NetworkAttachmentsReadyCondition, condition.NetworkAttachmentsReadyMessage) } else { - err := fmt.Errorf("not all pods have interfaces with ips as configured in NetworkAttachments: %s", instance.Spec.NetworkAttachments) + err := fmt.Errorf("%w: %s", designate.ErrNetworkAttachmentConfig, instance.Spec.NetworkAttachments) instance.Status.Conditions.Set(condition.FalseCondition( condition.NetworkAttachmentsReadyCondition, condition.ErrorReason, @@ -705,7 +705,7 @@ func (r *DesignateBackendbind9Reconciler) generateServiceConfigMaps( // - %-config-data configmap holding custom config for the service's designate.conf // - cmLabels := labels.GetLabels(instance, labels.GetGroupLabel(instance.ObjectMeta.Name), serviceLabels) + cmLabels := labels.GetLabels(instance, labels.GetGroupLabel(instance.Name), serviceLabels) // customData hold any customization for the service. // custom.conf is going to be merged into /etc/designate/designate.conf.d/custom.conf @@ -751,12 +751,12 @@ func (r *DesignateBackendbind9Reconciler) generateServiceConfigMaps( } } if nadInfo == nil { - return fmt.Errorf("unable to locate network attachment %s", instance.Spec.ControlNetworkName) + return fmt.Errorf("%w: %s", designate.ErrNetworkAttachmentNotFound, instance.Spec.ControlNetworkName) } cidr := nadInfo.IPAM.CIDR.String() if cidr == "" { - err := fmt.Errorf("designate control network attachment not configured, check NetworkAttachments and ControlNetworkName") + err := designate.ErrControlNetworkNotConfigured instance.Status.Conditions.Set(condition.FalseCondition( condition.NetworkAttachmentsReadyCondition, condition.ErrorReason, diff --git a/controllers/designatecentral_controller.go b/controllers/designatecentral_controller.go index a03e1407..7f5fb248 100644 --- a/controllers/designatecentral_controller.go +++ b/controllers/designatecentral_controller.go @@ -106,7 +106,7 @@ func (r *DesignateCentralReconciler) Reconcile(ctx context.Context, req ctrl.Req // Fetch the DesignateCentral instance instance := &designatev1beta1.DesignateCentral{} - 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. @@ -242,8 +242,8 @@ func (r *DesignateCentralReconciler) SetupWithManager(ctx context.Context, mgr c } svcSecretFn := func(_ context.Context, o client.Object) []reconcile.Request { - var namespace string = o.GetNamespace() - var secretName string = o.GetName() + var namespace = o.GetNamespace() + var secretName = o.GetName() result := []reconcile.Request{} // get all Central CRs @@ -251,7 +251,7 @@ func (r *DesignateCentralReconciler) SetupWithManager(ctx context.Context, mgr c listOpts := []client.ListOption{ client.InNamespace(namespace), } - if err := r.Client.List(context.Background(), apis, listOpts...); err != nil { + if err := r.List(context.Background(), apis, listOpts...); err != nil { Log.Error(err, "Unable to retrieve Central CRs %v") return nil } @@ -359,7 +359,7 @@ func (r *DesignateCentralReconciler) findObjectsForSrc(ctx context.Context, src FieldSelector: fields.OneTermEqualSelector(field, src.GetName()), Namespace: src.GetNamespace(), } - err := r.Client.List(context.TODO(), crList, listOps) + err := r.List(context.TODO(), crList, listOps) if err != nil { Log.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace())) return requests @@ -490,7 +490,7 @@ func (r *DesignateCentralReconciler) reconcileNormal(ctx context.Context, instan 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( @@ -514,7 +514,7 @@ func (r *DesignateCentralReconciler) reconcileNormal(ctx context.Context, instan // serviceLabels := map[string]string{ - common.AppSelector: instance.ObjectMeta.Name, + common.AppSelector: instance.Name, common.ComponentSelector: designatecentral.Component, } @@ -647,7 +647,7 @@ func (r *DesignateCentralReconciler) generateServiceConfigMaps( // - %-config-data configmap holding custom config for the service's designate.conf // - cmLabels := labels.GetLabels(instance, labels.GetGroupLabel(instance.ObjectMeta.Name), map[string]string{}) + cmLabels := labels.GetLabels(instance, labels.GetGroupLabel(instance.Name), map[string]string{}) db, err := mariadbv1.GetDatabaseByNameAndAccount(ctx, h, designate.DatabaseName, instance.Spec.DatabaseAccount, instance.Namespace) if err != nil { diff --git a/controllers/designatemdns_controller.go b/controllers/designatemdns_controller.go index 4d45a849..1af8a26f 100644 --- a/controllers/designatemdns_controller.go +++ b/controllers/designatemdns_controller.go @@ -107,7 +107,7 @@ func (r *DesignateMdnsReconciler) Reconcile(ctx context.Context, req ctrl.Reques Log := r.GetLogger(ctx) // Fetch the DesignateMdns instance instance := &designatev1beta1.DesignateMdns{} - 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. @@ -246,8 +246,8 @@ func (r *DesignateMdnsReconciler) SetupWithManager(ctx context.Context, mgr ctrl } svcSecretFn := func(_ context.Context, o client.Object) []reconcile.Request { - var namespace string = o.GetNamespace() - var secretName string = o.GetName() + var namespace = o.GetNamespace() + var secretName = o.GetName() result := []reconcile.Request{} // get all Mdns CRs @@ -255,7 +255,7 @@ func (r *DesignateMdnsReconciler) SetupWithManager(ctx context.Context, mgr ctrl listOpts := []client.ListOption{ client.InNamespace(namespace), } - if err := r.Client.List(context.Background(), apis, listOpts...); err != nil { + if err := r.List(context.Background(), apis, listOpts...); err != nil { Log.Error(err, "Unable to retrieve Mdns CRs %v") return nil } @@ -300,7 +300,7 @@ func (r *DesignateMdnsReconciler) SetupWithManager(ctx context.Context, mgr ctrl listOpts := []client.ListOption{ client.InNamespace(o.GetNamespace()), } - if err := r.Client.List(context.Background(), apis, listOpts...); err != nil { + if err := r.List(context.Background(), apis, listOpts...); err != nil { Log.Error(err, "Unable to retrieve Mdns CRs %v") return nil } @@ -366,7 +366,7 @@ func (r *DesignateMdnsReconciler) findObjectsForSrc(ctx context.Context, src cli FieldSelector: fields.OneTermEqualSelector(field, src.GetName()), Namespace: src.GetNamespace(), } - err := r.Client.List(context.TODO(), crList, listOps) + err := r.List(context.TODO(), crList, listOps) if err != nil { Log.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace())) return requests @@ -507,7 +507,7 @@ func (r *DesignateMdnsReconciler) reconcileNormal(ctx context.Context, instance 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( @@ -527,7 +527,7 @@ func (r *DesignateMdnsReconciler) reconcileNormal(ctx context.Context, instance instance.Status.Conditions.MarkTrue(condition.TLSInputReadyCondition, condition.InputReadyMessage) serviceLabels := map[string]string{ - common.AppSelector: instance.ObjectMeta.Name, + common.AppSelector: instance.Name, common.ComponentSelector: designatemdns.Component, } @@ -735,7 +735,7 @@ func (r *DesignateMdnsReconciler) reconcileNormal(ctx context.Context, instance if networkReady { instance.Status.Conditions.MarkTrue(condition.NetworkAttachmentsReadyCondition, condition.NetworkAttachmentsReadyMessage) } else { - err := fmt.Errorf("not all pods have interfaces with ips as configured in NetworkAttachments: %s", instance.Spec.NetworkAttachments) + err := fmt.Errorf("%w: %s", designate.ErrNetworkAttachmentConfig, instance.Spec.NetworkAttachments) instance.Status.Conditions.Set(condition.FalseCondition( condition.NetworkAttachmentsReadyCondition, condition.ErrorReason, @@ -810,7 +810,7 @@ func (r *DesignateMdnsReconciler) generateServiceConfigMaps( // - %-config-data configmap holding custom config for the service's designate.conf // - cmLabels := labels.GetLabels(instance, labels.GetGroupLabel(instance.ObjectMeta.Name), map[string]string{}) + cmLabels := labels.GetLabels(instance, labels.GetGroupLabel(instance.Name), map[string]string{}) db, err := mariadbv1.GetDatabaseByNameAndAccount(ctx, h, designate.DatabaseName, instance.Spec.DatabaseAccount, instance.Namespace) if err != nil { diff --git a/controllers/designateproducer_controller.go b/controllers/designateproducer_controller.go index 9f56da36..d2ab4319 100644 --- a/controllers/designateproducer_controller.go +++ b/controllers/designateproducer_controller.go @@ -107,7 +107,7 @@ func (r *DesignateProducerReconciler) Reconcile(ctx context.Context, req ctrl.Re // Fetch the DesignateProducer instance instance := &designatev1beta1.DesignateProducer{} - 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. @@ -247,8 +247,8 @@ func (r *DesignateProducerReconciler) SetupWithManager(ctx context.Context, mgr } svcSecretFn := func(_ context.Context, o client.Object) []reconcile.Request { - var namespace string = o.GetNamespace() - var secretName string = o.GetName() + var namespace = o.GetNamespace() + var secretName = o.GetName() result := []reconcile.Request{} // get all Producer CRs @@ -256,7 +256,7 @@ func (r *DesignateProducerReconciler) SetupWithManager(ctx context.Context, mgr listOpts := []client.ListOption{ client.InNamespace(namespace), } - if err := r.Client.List(context.Background(), apis, listOpts...); err != nil { + if err := r.List(context.Background(), apis, listOpts...); err != nil { Log.Error(err, "Unable to retrieve Producer CRs %v") return nil } @@ -301,7 +301,7 @@ func (r *DesignateProducerReconciler) SetupWithManager(ctx context.Context, mgr listOpts := []client.ListOption{ client.InNamespace(o.GetNamespace()), } - if err := r.Client.List(context.Background(), apis, listOpts...); err != nil { + if err := r.List(context.Background(), apis, listOpts...); err != nil { Log.Error(err, "Unable to retrieve Producer CRs %v") return nil } @@ -366,7 +366,7 @@ func (r *DesignateProducerReconciler) findObjectsForSrc(ctx context.Context, src FieldSelector: fields.OneTermEqualSelector(field, src.GetName()), Namespace: src.GetNamespace(), } - err := r.Client.List(context.TODO(), crList, listOps) + err := r.List(context.TODO(), crList, listOps) if err != nil { Log.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace())) return requests @@ -509,7 +509,7 @@ func (r *DesignateProducerReconciler) reconcileNormal(ctx context.Context, insta 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( @@ -570,7 +570,7 @@ func (r *DesignateProducerReconciler) reconcileNormal(ctx context.Context, insta // serviceLabels := map[string]string{ - common.AppSelector: instance.ObjectMeta.Name, + common.AppSelector: instance.Name, common.ComponentSelector: designateproducer.Component, } @@ -715,7 +715,7 @@ func (r *DesignateProducerReconciler) reconcileNormal(ctx context.Context, insta if networkReady { instance.Status.Conditions.MarkTrue(condition.NetworkAttachmentsReadyCondition, condition.NetworkAttachmentsReadyMessage) } else { - err := fmt.Errorf("not all pods have interfaces with ips as configured in NetworkAttachments: %s", instance.Spec.NetworkAttachments) + err := fmt.Errorf("%w: %s", designate.ErrNetworkAttachmentConfig, instance.Spec.NetworkAttachments) instance.Status.Conditions.Set(condition.FalseCondition( condition.NetworkAttachmentsReadyCondition, condition.ErrorReason, @@ -785,7 +785,7 @@ func (r *DesignateProducerReconciler) generateServiceConfigMaps( // - %-config-data configmap holding custom config for the service's designate.conf // - cmLabels := labels.GetLabels(instance, labels.GetGroupLabel(instance.ObjectMeta.Name), map[string]string{}) + cmLabels := labels.GetLabels(instance, labels.GetGroupLabel(instance.Name), map[string]string{}) db, err := mariadbv1.GetDatabaseByNameAndAccount(ctx, h, designate.DatabaseName, instance.Spec.DatabaseAccount, instance.Namespace) if err != nil { diff --git a/controllers/designateunbound_controller.go b/controllers/designateunbound_controller.go index 81085459..cee5c092 100644 --- a/controllers/designateunbound_controller.go +++ b/controllers/designateunbound_controller.go @@ -66,19 +66,13 @@ func (r *UnboundReconciler) GetLogger(ctx context.Context) logr.Logger { return log.FromContext(ctx).WithName("Controllers").WithName("DesignateUnbound") } +// StubZoneTmplRec represents a stub zone template record configuration type StubZoneTmplRec struct { Name string Options map[string]string Servers []string } -func min(i int, j int) int { - if i < j { - return i - } - return j -} - //+kubebuilder:rbac:groups=designate.openstack.org,resources=designateunbounds,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=designate.openstack.org,resources=designateunbounds/status,verbs=get;update;patch //+kubebuilder:rbac:groups=designate.openstack.org,resources=designateunbounds/finalizers,verbs=update;patch @@ -90,7 +84,7 @@ func (r *UnboundReconciler) Reconcile(ctx context.Context, req ctrl.Request) (re Log := r.GetLogger(ctx) instance := &designatev1.DesignateUnbound{} - 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. @@ -226,7 +220,7 @@ func (r *UnboundReconciler) findObjectsForSrc(ctx context.Context, src client.Ob FieldSelector: fields.OneTermEqualSelector(field, src.GetName()), Namespace: src.GetNamespace(), } - err := r.Client.List(context.TODO(), crList, listOps) + err := r.List(context.TODO(), crList, listOps) if err != nil { Log.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace())) return requests @@ -283,7 +277,7 @@ func (r *UnboundReconciler) reconcileNormal(ctx context.Context, instance *desig util.LogForObject(helper, "Reconciling Service", instance) serviceLabels := map[string]string{ - common.AppSelector: instance.ObjectMeta.Name, + common.AppSelector: instance.Name, common.ComponentSelector: designateunbound.Component, } @@ -472,7 +466,7 @@ func (r *UnboundReconciler) reconcileNormal(ctx context.Context, instance *desig if networkReady { instance.Status.Conditions.MarkTrue(condition.NetworkAttachmentsReadyCondition, condition.NetworkAttachmentsReadyMessage) } else { - err := fmt.Errorf("not all pods have interfaces with ips as configured in NetworkAttachments: %s", instance.Spec.NetworkAttachments) + err := fmt.Errorf("%w: %s", designate.ErrNetworkAttachmentConfig, instance.Spec.NetworkAttachments) instance.Status.Conditions.Set(condition.FalseCondition( condition.NetworkAttachmentsReadyCondition, condition.ErrorReason, diff --git a/controllers/designateworker_controller.go b/controllers/designateworker_controller.go index f723a982..63950952 100644 --- a/controllers/designateworker_controller.go +++ b/controllers/designateworker_controller.go @@ -108,7 +108,7 @@ func (r *DesignateWorkerReconciler) Reconcile(ctx context.Context, req ctrl.Requ // Fetch the DesignateWorker instance instance := &designatev1beta1.DesignateWorker{} - 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. @@ -248,8 +248,8 @@ func (r *DesignateWorkerReconciler) SetupWithManager(ctx context.Context, mgr ct } svcSecretFn := func(_ context.Context, o client.Object) []reconcile.Request { - var namespace string = o.GetNamespace() - var secretName string = o.GetName() + var namespace = o.GetNamespace() + var secretName = o.GetName() result := []reconcile.Request{} // get all Worker CRs @@ -257,7 +257,7 @@ func (r *DesignateWorkerReconciler) SetupWithManager(ctx context.Context, mgr ct listOpts := []client.ListOption{ client.InNamespace(namespace), } - if err := r.Client.List(context.Background(), apis, listOpts...); err != nil { + if err := r.List(context.Background(), apis, listOpts...); err != nil { Log.Error(err, "Unable to retrieve Worker CRs %v") return nil } @@ -301,7 +301,7 @@ func (r *DesignateWorkerReconciler) SetupWithManager(ctx context.Context, mgr ct listOpts := []client.ListOption{ client.InNamespace(o.GetNamespace()), } - if err := r.Client.List(context.Background(), apis, listOpts...); err != nil { + if err := r.List(context.Background(), apis, listOpts...); err != nil { Log.Error(err, "Unable to retrieve Worker CRs %v") return nil } @@ -367,7 +367,7 @@ func (r *DesignateWorkerReconciler) findObjectsForSrc(ctx context.Context, src c FieldSelector: fields.OneTermEqualSelector(field, src.GetName()), Namespace: src.GetNamespace(), } - err := r.Client.List(context.TODO(), crList, listOps) + err := r.List(context.TODO(), crList, listOps) if err != nil { Log.Error(err, fmt.Sprintf("listing %s for field: %s - %s", crList.GroupVersionKind().Kind, field, src.GetNamespace())) return requests @@ -509,7 +509,7 @@ func (r *DesignateWorkerReconciler) reconcileNormal(ctx context.Context, instanc 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( @@ -533,7 +533,7 @@ func (r *DesignateWorkerReconciler) reconcileNormal(ctx context.Context, instanc // serviceLabels := map[string]string{ - common.AppSelector: instance.ObjectMeta.Name, + common.AppSelector: instance.Name, common.ComponentSelector: designateworker.Component, } @@ -714,7 +714,7 @@ func (r *DesignateWorkerReconciler) reconcileNormal(ctx context.Context, instanc if networkReady { instance.Status.Conditions.MarkTrue(condition.NetworkAttachmentsReadyCondition, condition.NetworkAttachmentsReadyMessage) } else { - err := fmt.Errorf("not all pods have interfaces with ips as configured in NetworkAttachments: %s", instance.Spec.NetworkAttachments) + err := fmt.Errorf("%w: %s", designate.ErrNetworkAttachmentConfig, instance.Spec.NetworkAttachments) instance.Status.Conditions.Set(condition.FalseCondition( condition.NetworkAttachmentsReadyCondition, condition.ErrorReason, @@ -788,7 +788,7 @@ func (r *DesignateWorkerReconciler) generateServiceConfigMaps( // - %-config-data configmap holding custom config for the service's designate.conf // - cmLabels := labels.GetLabels(instance, labels.GetGroupLabel(instance.ObjectMeta.Name), map[string]string{}) + cmLabels := labels.GetLabels(instance, labels.GetGroupLabel(instance.Name), map[string]string{}) db, err := mariadbv1.GetDatabaseByNameAndAccount(ctx, h, designate.DatabaseName, instance.Spec.DatabaseAccount, instance.Namespace) if err != nil { diff --git a/go.mod b/go.mod index 3ba103ef..5bb71900 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/openstack-k8s-operators/designate-operator -go 1.21 +go 1.24 require ( github.com/go-logr/logr v1.4.3 @@ -11,26 +11,27 @@ require ( github.com/onsi/ginkgo/v2 v2.20.1 github.com/onsi/gomega v1.34.1 github.com/openstack-k8s-operators/designate-operator/api v0.1.1-0.20240807132522-6c2eca7c6bbb - github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250909143828-e33d35ffd64f - github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20250823150446-aa5dac847cf1 - github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20250823121217-7e1cd2e3dd03 - github.com/openstack-k8s-operators/lib-common/modules/test v0.6.1-0.20250823121217-7e1cd2e3dd03 - github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20250823120533-e98cf8957b16 + 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/common v0.6.1-0.20250922082314-c83d83092a04 + github.com/openstack-k8s-operators/lib-common/modules/test v0.6.1-0.20250922082314-c83d83092a04 + github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20250922154138-e032ee393bab gopkg.in/yaml.v2 v2.4.0 - 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/gabriel-vasile/mimetype v1.4.8 // indirect github.com/go-logr/zapr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect @@ -55,35 +56,34 @@ 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.20250823121217-7e1cd2e3dd03 // 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.51.1 // 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/crypto v0.33.0 // indirect golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect golang.org/x/mod v0.20.0 // indirect golang.org/x/net v0.34.0 // indirect - golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sys v0.30.0 // indirect golang.org/x/term v0.29.0 // indirect golang.org/x/text v0.22.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.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 @@ -92,9 +92,9 @@ require ( replace github.com/openstack-k8s-operators/designate-operator/api => ./api -// 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 cfb73901..bfb7f096 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/gabriel-vasile/mimetype v1.4.8 h1:FfZ3gj38NjllZIeJAmMhr+qKL8Wu+nOoI3GqacKw1NM= github.com/gabriel-vasile/mimetype v1.4.8/go.mod h1:ByKUIKGjh1ODkGM1asKUbQZOLGrPjydw3hYPU2YU9t8= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= @@ -40,13 +42,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.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= -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= @@ -88,47 +87,49 @@ 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/infra-operator/apis v0.6.1-0.20250909143828-e33d35ffd64f h1:chuu4iBT5sXHYw8aPeP/pWC+S3yGo6hdy39foP7c5vs= -github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20250909143828-e33d35ffd64f/go.mod h1:Dv8qpmBIQy3Jv/EyQnOyc0w61X8vyfxpjcIQONP5CwY= -github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20250823150446-aa5dac847cf1 h1:LM953646RkmGf3mLAyNk+zmcFNnFpMLDCkjSdvossSE= -github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20250823150446-aa5dac847cf1/go.mod h1:G6BkoPfgALryMlOZwIH036iSWUMiDJQAYL1lXuLyPZ0= -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.20250823121217-7e1cd2e3dd03 h1:DrKbzsweRx8VBNb5ur+/XcHSi+MR3VdzCsIEXYGc5SM= -github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20250823121217-7e1cd2e3dd03/go.mod h1:U3LQ4Nz2+syTPfW66bSLv6OzefLpsqxWLdX9AFotRPA= -github.com/openstack-k8s-operators/lib-common/modules/test v0.6.1-0.20250823121217-7e1cd2e3dd03 h1:PEDnEmWK80W8PdsQUX+z42ScN0i/EA5gDE44ya6VUGw= -github.com/openstack-k8s-operators/lib-common/modules/test v0.6.1-0.20250823121217-7e1cd2e3dd03/go.mod h1:L3t8ty8BYur+yQC4EbxolVOU85A62oxODM5rMApOwfc= -github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20250823120533-e98cf8957b16 h1:h/jpz9nslS/9glSbCDBxWObSuhnd3lW6No8wA0Z3MHE= -github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20250823120533-e98cf8957b16/go.mod h1:2I8YZyKvq2ACOnIBFpdUd9TdIaI2yeDu/9VC0HRDfPo= +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/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/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/lib-common/modules/test v0.6.1-0.20250922082314-c83d83092a04 h1:kz0qnjGhe72z0nzqD+WEm0TBOUdoKFaJmXJNZ5zxRRk= +github.com/openstack-k8s-operators/lib-common/modules/test v0.6.1-0.20250922082314-c83d83092a04/go.mod h1:rYrAP48GcxkxIN0lZ3AuocBFTE8TRmh6bqvg7B9pGRU= +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/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= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/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.51.1 h1:eIjN50Bwglz6a/c3hAgSMcofL3nD+nFQkV6Dd4DsQCw= -github.com/prometheus/common v0.51.1/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= -github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= -github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +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.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/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 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= @@ -138,7 +139,6 @@ 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/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus= golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= @@ -146,43 +146,34 @@ golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0 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/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= -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.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= golang.org/x/sys v0.30.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.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= 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.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= @@ -191,7 +182,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= @@ -200,15 +190,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= @@ -216,24 +204,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 dafb16ea..25fe84b7 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 implements the designate-operator controller manager. package main import ( diff --git a/pkg/designate/bind_ctrl_network.go b/pkg/designate/bind_ctrl_network.go index bb6f5e9a..b8bb6b13 100644 --- a/pkg/designate/bind_ctrl_network.go +++ b/pkg/designate/bind_ctrl_network.go @@ -12,6 +12,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package designate contains designate service functionality and configuration. package designate import ( @@ -28,7 +29,7 @@ func GetPredictableIPAM(networkParameters *NetworkParameters) (*NADIpam, error) endRange := predParams.RangeStart for i := 0; i < BindProvPredictablePoolSize; i++ { if !predParams.CIDR.Contains(endRange) { - return nil, fmt.Errorf("predictable IPs: cannot allocate %d IP addresses in %s", BindProvPredictablePoolSize, predParams.CIDR) + return nil, fmt.Errorf("%w: %d IP addresses in %s", ErrPredictableIPAllocation, BindProvPredictablePoolSize, predParams.CIDR) } endRange = endRange.Next() } @@ -36,6 +37,7 @@ func GetPredictableIPAM(networkParameters *NetworkParameters) (*NADIpam, error) return predParams, nil } +// GetNextIP returns the next available IP from the given IPAM parameters func GetNextIP(predParams *NADIpam, allocatedIPs map[string]bool) (string, error) { for candidateAddress := predParams.RangeStart; candidateAddress != predParams.RangeEnd; candidateAddress = candidateAddress.Next() { if !allocatedIPs[candidateAddress.String()] { @@ -43,5 +45,5 @@ func GetNextIP(predParams *NADIpam, allocatedIPs map[string]bool) (string, error return candidateAddress.String(), nil } } - return "", fmt.Errorf("predictable IPs: out of available addresses") + return "", ErrPredictableIPOutOfAddresses } diff --git a/pkg/designate/common.go b/pkg/designate/common.go index 52a03edf..0ba8e62f 100644 --- a/pkg/designate/common.go +++ b/pkg/designate/common.go @@ -17,11 +17,25 @@ limitations under the License. package designate import ( + "errors" "fmt" mariadbv1 "github.com/openstack-k8s-operators/mariadb-operator/api/v1beta1" ) +// Common static errors for all designate functionality +var ( + // Controller errors + ErrRedisRequired = errors.New("unable to configure designate deployment without Redis") + ErrNetworkAttachmentConfig = errors.New("not all pods have interfaces with ips as configured in NetworkAttachments") + ErrNetworkAttachmentNotFound = errors.New("unable to locate network attachment") + ErrControlNetworkNotConfigured = errors.New("designate control network attachment not configured, check NetworkAttachments and ControlNetworkName") + // Package errors + ErrPredictableIPAllocation = errors.New("predictable IPs: cannot allocate IP addresses") + ErrPredictableIPOutOfAddresses = errors.New("predictable IPs: out of available addresses") + ErrCannotAllocateIPAddresses = errors.New("cannot allocate IP addresses") +) + const ( // KollaServiceCommand - the command to start the service binary in the kolla container KollaServiceCommand = "/usr/local/bin/kolla_set_configs && /usr/local/bin/kolla_start" diff --git a/pkg/designate/const.go b/pkg/designate/const.go index e6635dcf..7cd65475 100644 --- a/pkg/designate/const.go +++ b/pkg/designate/const.go @@ -36,26 +36,37 @@ const ( // DesignateInternalPort - DesignateInternalPort int32 = 9001 + // DesignateBindKeySecret is the name of the secret containing bind keys DesignateBindKeySecret = "designate-bind-secret" + // DesignateRndcKey is the key name for RNDC configuration DesignateRndcKey = "rndc-key" + // MdnsPredIPConfigMap is the name of the ConfigMap containing MDNS predictable IP mappings MdnsPredIPConfigMap = "designate-mdns-ip-map" + // NsRecordsConfigMap is the name of the ConfigMap containing name server record parameters NsRecordsConfigMap = "designate-ns-records-params" + // NsRecordsCRContent is the content key for name server records custom resource NsRecordsCRContent = "designate-ns-records" + // BindPredIPConfigMap is the name of the ConfigMap containing bind predictable IP mappings BindPredIPConfigMap = "designate-bind-ip-map" + // RndcConfDir is the directory path for RNDC configuration files RndcConfDir = "/etc/designate/rndc-keys" + // PoolsYamlConfigMap is the name of the ConfigMap containing pools YAML configuration PoolsYamlConfigMap = "designate-pools-yaml-config-map" + // PoolsYamlPath is the template path for pools YAML configuration PoolsYamlPath = "designatepoolmanager/config/pools.yaml.tmpl" + // PoolsYamlHash is the hash key for pools YAML configuration PoolsYamlHash = "pools-yaml-hash" + // PoolsYamlContent is the content key for pools YAML configuration PoolsYamlContent = "pools-yaml-content" // BindPredictableIPHash key for status hash @@ -67,7 +78,7 @@ const ( // PredictableIPCommand - PredictableIPCommand = "/usr/local/bin/container-scripts/setipalias.sh" - // ScriptsTemplate sprintf template for common scripts secret + // ScriptsF is the sprintf template for common scripts secret ScriptsF = "%s-scripts" // ConfigDataTemplate sprintf template for common config data secret diff --git a/pkg/designate/func.go b/pkg/designate/func.go index bde4db83..dc85dbd7 100644 --- a/pkg/designate/func.go +++ b/pkg/designate/func.go @@ -1,7 +1,10 @@ package designate -import "fmt" -import "sigs.k8s.io/controller-runtime/pkg/client" +import ( + "fmt" + + "sigs.k8s.io/controller-runtime/pkg/client" +) // GetOwningDesignateName - Given a Designate-->API,Central,Worker,Mdns,Producer // object, returning the parent Designate object that created it (if any) @@ -15,22 +18,27 @@ func GetOwningDesignateName(instance client.Object) string { return "" } +// ScriptsVolumeName returns the scripts volume name for the given service func ScriptsVolumeName(s string) string { return fmt.Sprintf(ScriptsF, s) } +// ConfigVolumeName returns the config volume name for the given service func ConfigVolumeName(s string) string { return fmt.Sprintf(ConfigDataTemplate, s) } +// DefaultsVolumeName returns the defaults volume name for the given service func DefaultsVolumeName(s string) string { return fmt.Sprintf(DefaultOverwriteTemplate, s) } +// MergedVolumeName returns the merged volume name for the given service func MergedVolumeName(s string) string { return fmt.Sprintf("%s-merged", s) } +// MergedDefaultsVolumeName returns the merged defaults volume name for the given service func MergedDefaultsVolumeName(s string) string { return fmt.Sprintf("%s-merged-defaults", s) } diff --git a/pkg/designate/generate_bind9_pools_yaml.go b/pkg/designate/generate_bind9_pools_yaml.go index 7052305c..7f37b1b3 100644 --- a/pkg/designate/generate_bind9_pools_yaml.go +++ b/pkg/designate/generate_bind9_pools_yaml.go @@ -11,6 +11,7 @@ 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 designate import ( @@ -29,6 +30,7 @@ import ( "github.com/openstack-k8s-operators/lib-common/modules/common/util" ) +// Pool represents a designate pool configuration type Pool struct { Name string `yaml:"name"` Description string `yaml:"description"` @@ -45,11 +47,13 @@ type Pool struct { // Priority int `yaml:"priority"` // } +// Nameserver represents a nameserver configuration type Nameserver struct { Host string `yaml:"host"` Port int `yaml:"port"` } +// Target represents a designate target configuration type Target struct { Type string `yaml:"type"` Description string `yaml:"description"` @@ -57,11 +61,13 @@ type Target struct { Options Options `yaml:"options"` } +// Master represents a designate master configuration type Master struct { Host string `yaml:"host"` Port int `yaml:"port"` } +// Options represents designate target options type Options struct { Host string `yaml:"host"` Port int `yaml:"port"` @@ -70,12 +76,13 @@ type Options struct { RNDCKeyFile string `yaml:"rndc_key_file"` } +// CatalogZone represents a designate catalog zone configuration type CatalogZone struct { FQDN string `yaml:"fqdn"` Refresh int `yaml:"refresh"` } -// We sort all pool resources to get the correct hash every time +// GeneratePoolsYamlDataAndHash sorts all pool resources to get the correct hash every time func GeneratePoolsYamlDataAndHash(BindMap, MdnsMap map[string]string, nsRecords []designatev1.DesignateNSRecord) (string, string, error) { sort.Slice(nsRecords, func(i, j int) bool { if nsRecords[i].Hostname != nsRecords[j].Hostname { @@ -156,7 +163,7 @@ func GeneratePoolsYamlDataAndHash(BindMap, MdnsMap map[string]string, nsRecords return "", "", err } poolsYamlPath := path.Join(opTemplates, PoolsYamlPath) - poolsYaml, err := os.ReadFile(poolsYamlPath) + poolsYaml, err := os.ReadFile(poolsYamlPath) // #nosec G304 if err != nil { return "", "", err } diff --git a/pkg/designate/initcontainer.go b/pkg/designate/initcontainer.go index de2b7402..0a5bbf38 100644 --- a/pkg/designate/initcontainer.go +++ b/pkg/designate/initcontainer.go @@ -31,6 +31,7 @@ type APIDetails struct { Privileged bool } +// InitContainerDetails contains configuration for init containers type InitContainerDetails struct { ContainerImage string VolumeMounts []corev1.VolumeMount @@ -42,6 +43,7 @@ const ( InitContainerCommand = "/usr/local/bin/container-scripts/init.sh" ) +// SimpleInitContainer creates a simple init container with the provided details func SimpleInitContainer(init InitContainerDetails) corev1.Container { runAsUser := int64(0) diff --git a/pkg/designate/network_parameters.go b/pkg/designate/network_parameters.go index 5af5da0e..16a9ff8c 100644 --- a/pkg/designate/network_parameters.go +++ b/pkg/designate/network_parameters.go @@ -34,12 +34,14 @@ type NADConfig struct { IPAM NADIpam `json:"ipam"` } +// NADIpam represents network attachment definition IPAM configuration type NADIpam struct { CIDR netip.Prefix `json:"range"` RangeStart netip.Addr `json:"range_start"` RangeEnd netip.Addr `json:"range_end"` } +// GetNADConfig parses and returns the NAD configuration from a NetworkAttachmentDefinition func GetNADConfig( nad *networkv1.NetworkAttachmentDefinition, ) (*NADConfig, error) { @@ -76,7 +78,7 @@ func GetNetworkParametersFromNAD( end := networkParameters.ProviderAllocationStart for i := 0; i < BindProvPredictablePoolSize; i++ { if !networkParameters.CIDR.Contains(end) { - return nil, fmt.Errorf("cannot allocate %d IP addresses in %s", BindProvPredictablePoolSize, networkParameters.CIDR) + return nil, fmt.Errorf("%w: %d IP addresses in %s", ErrCannotAllocateIPAddresses, BindProvPredictablePoolSize, networkParameters.CIDR) } end = end.Next() } diff --git a/pkg/designate/pool_update.go b/pkg/designate/pool_update.go index 7385587e..cd4dbe1c 100644 --- a/pkg/designate/pool_update.go +++ b/pkg/designate/pool_update.go @@ -12,12 +12,17 @@ import ( ) const ( - DesignateConfigVolume = "designate-config" - DesignateConfigMount = "/etc/designate" + // DesignateConfigVolume is the volume name for designate configuration + DesignateConfigVolume = "designate-config" + // DesignateConfigMount is the mount path for designate configuration + DesignateConfigMount = "/etc/designate" + // DesignateConfigKeyPath is the path to the designate configuration file DesignateConfigKeyPath = "designate.conf" + // DesignatePoolsYamlPath is the path to the designate pools YAML file DesignatePoolsYamlPath = "pools.yaml" ) +// PoolUpdateJob creates a job for updating designate pools func PoolUpdateJob( instance *designatev1beta1.Designate, labels map[string]string, diff --git a/pkg/designate/predipcontainer.go b/pkg/designate/predipcontainer.go index 38f5f851..65bec352 100644 --- a/pkg/designate/predipcontainer.go +++ b/pkg/designate/predipcontainer.go @@ -20,6 +20,7 @@ import ( "k8s.io/utils/ptr" ) +// PredIPContainerDetails contains configuration for predictable IP containers type PredIPContainerDetails struct { ContainerImage string VolumeMounts []corev1.VolumeMount @@ -27,6 +28,7 @@ type PredIPContainerDetails struct { EnvVars []corev1.EnvVar } +// PredictableIPContainer creates a container with predictable IP configuration func PredictableIPContainer(init PredIPContainerDetails) corev1.Container { args := []string{ diff --git a/pkg/designate/rndckeygenerator.go b/pkg/designate/rndckeygenerator.go index d97f6a4d..cc295f09 100644 --- a/pkg/designate/rndckeygenerator.go +++ b/pkg/designate/rndckeygenerator.go @@ -26,6 +26,7 @@ import ( ) const ( + // MinPasswordSize is the minimum size for generated passwords MinPasswordSize = 25 ) @@ -44,7 +45,7 @@ func genword(length int) (string, error) { return string(password), nil } -// Create the rndc key secret +// CreateRndcKeySecret creates the rndc key secret func CreateRndcKeySecret() (string, error) { // Generate random strings key, err := genword(MinPasswordSize) diff --git a/pkg/designate/volumes.go b/pkg/designate/volumes.go index 5fdeb993..f8d7b79f 100644 --- a/pkg/designate/volumes.go +++ b/pkg/designate/volumes.go @@ -20,6 +20,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" ) +// VolumeMapping represents a volume mapping configuration for containers type VolumeMapping struct { Name string Type string @@ -28,12 +29,17 @@ type VolumeMapping struct { } const ( + // ScriptMount represents the script mount type ScriptMount = "script-mount" + // SecretMount represents the secret mount type SecretMount = "secret-mount" + // ConfigMount represents the config mount type ConfigMount = "config-mount" - MergeMount = "merge-mount" + // MergeMount represents the merge mount type + MergeMount = "merge-mount" ) +// GetStandardVolumeMapping returns the standard volume mappings for a designate instance func GetStandardVolumeMapping(instance client.Object) []VolumeMapping { return []VolumeMapping{ {Name: ScriptsVolumeName(GetOwningDesignateName(instance)), Type: ScriptMount, MountPath: "/usr/local/bin/container-scripts"}, @@ -62,7 +68,8 @@ func ProcessVolumes(volumeDefs []VolumeMapping) ([]corev1.Volume, []corev1.Volum accessMode := modeMap[v.Type] var newVolume corev1.Volume var newMount corev1.VolumeMount - if v.Type == SecretMount || v.Type == ScriptMount { + switch v.Type { + case SecretMount, ScriptMount: source := v.Name if len(v.Source) > 0 { source = v.Source @@ -81,7 +88,7 @@ func ProcessVolumes(volumeDefs []VolumeMapping) ([]corev1.Volume, []corev1.Volum MountPath: v.MountPath, ReadOnly: true, } - } else if v.Type == ConfigMount { + case ConfigMount: source := v.Name if len(v.Source) > 0 { source = v.Source @@ -102,7 +109,7 @@ func ProcessVolumes(volumeDefs []VolumeMapping) ([]corev1.Volume, []corev1.Volum MountPath: v.MountPath, ReadOnly: true, } - } else { + default: newVolume = corev1.Volume{ Name: v.Name, VolumeSource: corev1.VolumeSource{ diff --git a/pkg/designateapi/const.go b/pkg/designateapi/const.go index c483180b..e91c257b 100644 --- a/pkg/designateapi/const.go +++ b/pkg/designateapi/const.go @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package designateapi contains designate API constants and configuration. package designateapi const ( diff --git a/pkg/designatebackendbind9/const.go b/pkg/designatebackendbind9/const.go index 172d3f7f..a08e0054 100644 --- a/pkg/designatebackendbind9/const.go +++ b/pkg/designatebackendbind9/const.go @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package designatebackendbind9 contains designate backend bind9 constants and configuration. package designatebackendbind9 const ( diff --git a/pkg/designatebackendbind9/deployment.go b/pkg/designatebackendbind9/deployment.go index d050c565..8079859b 100644 --- a/pkg/designatebackendbind9/deployment.go +++ b/pkg/designatebackendbind9/deployment.go @@ -37,11 +37,11 @@ import ( // certs etc here. const ( - // PVCSuffix + // PVCSuffix is the suffix used for PVC names PVCSuffix = "-designate-bind" ) -// Deployment func +// StatefulSet creates a StatefulSet for the designate backend bind9 service func StatefulSet( instance *designatev1beta1.DesignateBackendbind9, configHash string, diff --git a/pkg/designatecentral/const.go b/pkg/designatecentral/const.go index 796e9e12..2141eca6 100644 --- a/pkg/designatecentral/const.go +++ b/pkg/designatecentral/const.go @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package designatecentral contains designate central constants and configuration. package designatecentral const ( diff --git a/pkg/designatemdns/const.go b/pkg/designatemdns/const.go index 0c4aaadc..4a846178 100644 --- a/pkg/designatemdns/const.go +++ b/pkg/designatemdns/const.go @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package designatemdns contains designate MDNS constants and configuration. package designatemdns const ( diff --git a/pkg/designateproducer/const.go b/pkg/designateproducer/const.go index fdec9c6a..0fc24bb5 100644 --- a/pkg/designateproducer/const.go +++ b/pkg/designateproducer/const.go @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package designateproducer contains designate producer constants and configuration. package designateproducer const ( diff --git a/pkg/designateunbound/const.go b/pkg/designateunbound/const.go index 02e2d4b0..af9011c1 100644 --- a/pkg/designateunbound/const.go +++ b/pkg/designateunbound/const.go @@ -14,9 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package designateunbound contains designate unbound constants and configuration. package designateunbound const ( - Component = "designate-unbound" + // Component represents the designate unbound component name + Component = "designate-unbound" + // ServiceName is the name of the designate unbound service ServiceName = "designateunbound" ) diff --git a/pkg/designateworker/const.go b/pkg/designateworker/const.go index a06da234..6bec09ee 100644 --- a/pkg/designateworker/const.go +++ b/pkg/designateworker/const.go @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package designateworker contains designate worker constants and configuration. package designateworker const ( diff --git a/tests/functional/api_fixture.go b/tests/functional/api_fixture.go index 632e1d7a..0ca357d8 100644 --- a/tests/functional/api_fixture.go +++ b/tests/functional/api_fixture.go @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// Package functional_test contains functional tests for the designate operator. package functional_test import ( @@ -24,7 +25,7 @@ import ( "github.com/go-logr/logr" "github.com/google/uuid" - . "github.com/onsi/ginkgo/v2" //revive:disable:dot-imports + . "github.com/onsi/ginkgo/v2" //nolint:staticcheck,revive // ST1001,dot-imports: dot imports are standard practice for Ginkgo tests "github.com/gophercloud/gophercloud/openstack/identity/v3/projects" "github.com/gophercloud/gophercloud/openstack/identity/v3/users" @@ -61,6 +62,7 @@ func keystoneHandleProjects( } } +// GetProject returns a project by name from the keystone projects list func GetProject(name string) *projects.Project { for _, p := range keystoneProjects { if p.Name == name { @@ -89,14 +91,16 @@ func keystoneGetProject( } w.Header().Add("Content-Type", "application/json") w.WriteHeader(200) - fmt.Fprint(w, string(bytes)) - f.APIFixture.Log.Info(fmt.Sprintf("GetProject returns %s", string(bytes))) + _, _ = fmt.Fprint(w, string(bytes)) + f.Log.Info(fmt.Sprintf("GetProject returns %s", string(bytes))) } +// APIFixtures contains test fixtures for API testing type APIFixtures struct { Keystone *keystone_helpers.KeystoneAPIFixture } +// SetupAPIFixtures sets up and returns API fixtures for testing func SetupAPIFixtures(logger logr.Logger) APIFixtures { keystone := keystone_helpers.NewKeystoneAPIFixtureWithServer(logger) keystone.Users = map[string]users.User{ diff --git a/tests/functional/base_test.go b/tests/functional/base_test.go index bed42809..0e9850d8 100644 --- a/tests/functional/base_test.go +++ b/tests/functional/base_test.go @@ -42,12 +42,12 @@ import ( const ( SecretName = "test-secret" - KeystoneSecretName = "%s-keystone-secret" + KeystoneSecretName = "%s-keystone-secret" // #nosec G101 RabbitmqSecretName = "rabbitmq-secret" - PublicCertSecretName = "public-tls-certs" - InternalCertSecretName = "internal-tls-certs" - CABundleSecretName = "combined-ca-bundle" + PublicCertSecretName = "public-tls-certs" // #nosec G101 + InternalCertSecretName = "internal-tls-certs" // #nosec G101 + CABundleSecretName = "combined-ca-bundle" // #nosec G101 timeout = time.Second * 5 interval = timeout / 100 @@ -179,17 +179,17 @@ func GetDefaultDesignateSpec(bind9ReplicaCount, mdnsReplicaCount int, unboundRep } spec["designateBackendbind9"] = designatev1.DesignateBackendbind9Spec{ DesignateBackendbind9SpecBase: designatev1.DesignateBackendbind9SpecBase{ - Replicas: ptr.To(int32(bind9ReplicaCount)), + Replicas: ptr.To(int32(bind9ReplicaCount)), // #nosec G115 }, } spec["designateMdns"] = designatev1.DesignateMdnsSpec{ DesignateMdnsSpecBase: designatev1.DesignateMdnsSpecBase{ - Replicas: ptr.To(int32(mdnsReplicaCount)), + Replicas: ptr.To(int32(mdnsReplicaCount)), // #nosec G115 }, } spec["designateUnbound"] = designatev1.DesignateUnboundSpec{ DesignateUnboundSpecBase: designatev1.DesignateUnboundSpecBase{ - Replicas: ptr.To(int32(unboundReplicaCount)), + Replicas: ptr.To(int32(unboundReplicaCount)), // #nosec G115 }, } return spec diff --git a/tests/functional/designate_controller_test.go b/tests/functional/designate_controller_test.go index 3b2d67ca..f5cc0ef2 100644 --- a/tests/functional/designate_controller_test.go +++ b/tests/functional/designate_controller_test.go @@ -143,9 +143,9 @@ var _ = Describe("Designate controller", func() { BeforeEach(func() { name = fmt.Sprintf("designate-%s", uuid.New().String()) - bind9ReplicaCount = rand.Intn(5) + 1 - mdnsReplicaCount = rand.Intn(5) + 1 - unboundReplicaCount = rand.Intn(5) + 1 + bind9ReplicaCount = rand.Intn(5) + 1 // #nosec G404 + mdnsReplicaCount = rand.Intn(5) + 1 // #nosec G404 + unboundReplicaCount = rand.Intn(5) + 1 // #nosec G404 spec = GetDefaultDesignateSpec(bind9ReplicaCount, mdnsReplicaCount, unboundReplicaCount) designateName = types.NamespacedName{ @@ -598,7 +598,7 @@ var _ = Describe("Designate controller", func() { bindConfigMap := th.GetConfigMap(types.NamespacedName{ Name: designate.BindPredIPConfigMap, Namespace: namespace}) - Expect(len(bindConfigMap.Data)).To(Equal(bind9ReplicaCount)) + Expect(bindConfigMap.Data).To(HaveLen(bind9ReplicaCount)) usedIPs := make(map[string]bool) for key, ipAddress := range bindConfigMap.Data { @@ -617,7 +617,7 @@ var _ = Describe("Designate controller", func() { mdnsConfigMap := th.GetConfigMap(types.NamespacedName{ Name: designate.MdnsPredIPConfigMap, Namespace: namespace}) - Expect(len(mdnsConfigMap.Data)).To(Equal(mdnsReplicaCount)) + Expect(mdnsConfigMap.Data).To(HaveLen(mdnsReplicaCount)) for key, ipAddress := range mdnsConfigMap.Data { // verify key with mdns_address_N format Expect(key).To(MatchRegexp(`^mdns_address_\d+$`)) diff --git a/tests/functional/suite_test.go b/tests/functional/suite_test.go index f400c14f..7138ec07 100644 --- a/tests/functional/suite_test.go +++ b/tests/functional/suite_test.go @@ -243,11 +243,11 @@ var _ = BeforeSuite(func() { dialer := &net.Dialer{Timeout: time.Second} addrPort := fmt.Sprintf("%s:%d", webhookInstallOptions.LocalServingHost, webhookInstallOptions.LocalServingPort) Eventually(func() error { - conn, err := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) + conn, err := tls.DialWithDialer(dialer, "tcp", addrPort, &tls.Config{InsecureSkipVerify: true}) // #nosec G402 if err != nil { return err } - conn.Close() + _ = conn.Close() return nil }).Should(Succeed()) })