diff --git a/api/core/v1beta1/openstackcontrolplane_types.go b/api/core/v1beta1/openstackcontrolplane_types.go index 78862caf8b..ca3ffade3d 100644 --- a/api/core/v1beta1/openstackcontrolplane_types.go +++ b/api/core/v1beta1/openstackcontrolplane_types.go @@ -71,11 +71,6 @@ const ( DeploymentStageAnnotation = "core.openstack.org/deployment-stage" // DeploymentStageInfrastructureOnly - Annotation value to pause after infrastructure deployment DeploymentStageInfrastructureOnly = "infrastructure-only" - - // ReconcileTriggerAnnotation - Generic annotation to trigger reconciliation and webhook - // Value is typically a timestamp to ensure annotation changes trigger updates - // Used by controller to trigger UPDATE webhook when needed (e.g., for service name caching) - ReconcileTriggerAnnotation = "openstack.org/reconcile-trigger" ) // OpenStackControlPlaneSpec defines the desired state of OpenStackControlPlane diff --git a/api/core/v1beta1/openstackcontrolplane_webhook.go b/api/core/v1beta1/openstackcontrolplane_webhook.go index bd46c8f7e9..8226a2aa31 100644 --- a/api/core/v1beta1/openstackcontrolplane_webhook.go +++ b/api/core/v1beta1/openstackcontrolplane_webhook.go @@ -25,6 +25,7 @@ import ( "strings" keystonev1 "github.com/openstack-k8s-operators/keystone-operator/api/v1beta1" + common_annotations "github.com/openstack-k8s-operators/lib-common/modules/common/annotations" "github.com/openstack-k8s-operators/lib-common/modules/common/object" "github.com/openstack-k8s-operators/lib-common/modules/common/route" common_webhook "github.com/openstack-k8s-operators/lib-common/modules/common/webhook" @@ -235,13 +236,12 @@ func (r *OpenStackControlPlane) ValidateUpdate(ctx context.Context, old runtime. } // Handle annotation-triggered migration from controller - const reconcileTriggerAnnotation = "openstack.org/reconcile-trigger" if annotations := r.GetAnnotations(); annotations != nil { - if _, exists := annotations[reconcileTriggerAnnotation]; exists { + if _, exists := annotations[common_annotations.ReconcileTriggerAnnotation]; exists { openstackcontrolplanelog.Info("Reconcile trigger annotation detected, performing migration", "instance", r.Name) r.migrateDeprecatedFields() - delete(annotations, reconcileTriggerAnnotation) + delete(annotations, common_annotations.ReconcileTriggerAnnotation) r.SetAnnotations(annotations) } } @@ -1141,7 +1141,7 @@ func (r *OpenStackControlPlane) DefaultServices() { r.Spec.DNS.Template = &networkv1.DNSMasqSpecCore{} } - r.Spec.DNS.Template.Default() + r.Spec.DNS.Template.Default(r.Namespace) } // Telemetry diff --git a/api/go.mod b/api/go.mod index 85b76ae2e7..9bfd188faf 100644 --- a/api/go.mod +++ b/api/go.mod @@ -6,17 +6,17 @@ require ( github.com/cert-manager/cert-manager v1.16.5 github.com/go-playground/validator/v10 v10.30.1 github.com/onsi/ginkgo/v2 v2.28.2 - github.com/onsi/gomega v1.39.1 + github.com/onsi/gomega v1.40.0 github.com/openstack-k8s-operators/barbican-operator/api v0.6.1-0.20260420052305-96c3a8196933 github.com/openstack-k8s-operators/cinder-operator/api v0.6.1-0.20260418071314-55ff2fc10b0c github.com/openstack-k8s-operators/designate-operator/api v0.6.1-0.20260418051458-40035e96e631 github.com/openstack-k8s-operators/glance-operator/api v0.6.1-0.20260418071313-4af756ba3dac github.com/openstack-k8s-operators/heat-operator/api v0.6.1-0.20260420052550-a562e0ee16fd github.com/openstack-k8s-operators/horizon-operator/api v0.6.1-0.20260418053129-fb096ad89dce - github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20260416122644-5476763a36b6 + github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20260507103247-9c1255698eac github.com/openstack-k8s-operators/ironic-operator/api v0.6.1-0.20260420052552-1ba026c533d6 github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20260420052838-77f94aef5af2 - github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20260417092244-81c71b39e981 + github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20260506154724-30a976ba8ef0 github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20260417092244-81c71b39e981 github.com/openstack-k8s-operators/manila-operator/api v0.6.1-0.20260420052836-ac1a4d8a769e github.com/openstack-k8s-operators/mariadb-operator/api v0.6.1-0.20260413152655-564a51226a2a @@ -32,7 +32,7 @@ require ( github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring v0.77.1-rhobs1 // indirect github.com/rhobs/observability-operator v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.27.1 // indirect + go.uber.org/zap v1.28.0 // indirect golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 golang.org/x/tools v0.41.0 // indirect k8s.io/api v0.31.14 diff --git a/api/go.sum b/api/go.sum index 47e9a6861b..6372ef1442 100644 --- a/api/go.sum +++ b/api/go.sum @@ -110,8 +110,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/onsi/ginkgo/v2 v2.28.2 h1:DTrMfpqxiNUyQ3Y0zhn1n3cOO2euFgQPYIpkWwxVFps= github.com/onsi/ginkgo/v2 v2.28.2/go.mod h1:CLtbVInNckU3/+gC8LzkGUb9oF+e8W8TdUsxPwvdOgE= -github.com/onsi/gomega v1.39.1 h1:1IJLAad4zjPn2PsnhH70V4DKRFlrCzGBNrNaru+Vf28= -github.com/onsi/gomega v1.39.1/go.mod h1:hL6yVALoTOxeWudERyfppUcZXjMwIMLnuSfruD2lcfg= +github.com/onsi/gomega v1.40.0 h1:Vtol0e1MghCD2ZVIilPDIg44XSL9l2QAn8ZNaljWcJc= +github.com/onsi/gomega v1.40.0/go.mod h1:M/Uqpu/8qTjtzCLUA2zJHX9Iilrau25x1PdoSRbWh5A= 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/barbican-operator/api v0.6.1-0.20260420052305-96c3a8196933 h1:Ks/OYlX2ipYy1XjAezm1955VkmwXoi+fAZlL0X0NDwM= @@ -126,14 +126,14 @@ github.com/openstack-k8s-operators/heat-operator/api v0.6.1-0.20260420052550-a56 github.com/openstack-k8s-operators/heat-operator/api v0.6.1-0.20260420052550-a562e0ee16fd/go.mod h1:aA+YEZ3UJCQvJB2X3qOliGVB7EXdImfJ0qV2jUG/L0E= github.com/openstack-k8s-operators/horizon-operator/api v0.6.1-0.20260418053129-fb096ad89dce h1:4nqAqtmfoN3VoWtFhHj65iZhi40KNp254/trUuoTD0M= github.com/openstack-k8s-operators/horizon-operator/api v0.6.1-0.20260418053129-fb096ad89dce/go.mod h1:ZMH+2206hZgGFjEhC+hhPvU+v6haNaeh5FR1mHylfqw= -github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20260416122644-5476763a36b6 h1:117Gu9HCSu2tAp579WnCJ9QtnslH2qnPB8UFvn8ZpqE= -github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20260416122644-5476763a36b6/go.mod h1:i7l8cihvFktd/LSuyvL2z6OcwauarQGoVhDMePL4VyI= +github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20260507103247-9c1255698eac h1:iALKqINqZR916pWQdjBzi4RtydKcAFAFAMCBXGhnsL0= +github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20260507103247-9c1255698eac/go.mod h1:/S2AN21zV70V1XuL0Of2dCjYWNkKwQSyNI8l/iQVrMs= github.com/openstack-k8s-operators/ironic-operator/api v0.6.1-0.20260420052552-1ba026c533d6 h1:thGt9sbYC1L9/UvkeYQQbWGxeiNeaXVckB/0QuBkN78= github.com/openstack-k8s-operators/ironic-operator/api v0.6.1-0.20260420052552-1ba026c533d6/go.mod h1:pnFZOetSrSoCdyMyTOUTfsFTdwtGwNFKtaPNNZtyHuw= github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20260420052838-77f94aef5af2 h1:h7pTz90cHqX6nTYjYDphuitIfD4UpM9yGnI3AbLdHrY= github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20260420052838-77f94aef5af2/go.mod h1:SpO4CL7c5/1HG+61fP6kWhL2+3aqR+5SNatdZueKrz8= -github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20260417092244-81c71b39e981 h1:v1viH0gmNb+AXMg/0GxDcj8VUTdjVLotfOIGrNyMxHk= -github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20260417092244-81c71b39e981/go.mod h1:I/VBXZLdjk8DUGsEbB+Ha72JBFYYntP7Pm2FpEto9K8= +github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20260506154724-30a976ba8ef0 h1:vkFvn06Ns9qW4AbzFjFDu8ioosRmhkEZiDrO3DOQhLg= +github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20260506154724-30a976ba8ef0/go.mod h1:aIuG6lx3aS0vnXweRNdR/Q0SlfOsLIo0OzrqKK7C6xs= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20260417092244-81c71b39e981 h1:jN3Kvt+RYUTaL9EXeeeIqRXVjqeNF74SuLTDXmi4X2Y= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20260417092244-81c71b39e981/go.mod h1:7yqbVpg0k0vW+kZks+TMU/cd1ovoejyHfVPWcyGYLHI= github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20260417092244-81c71b39e981 h1:X3/Gc+i0ZxaROExrpLXonz9EPhftlubFnOK4aSkRLvo= @@ -203,8 +203,8 @@ 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= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc= -go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.uber.org/zap v1.28.0 h1:IZzaP1Fv73/T/pBMLk4VutPl36uNC+OSUh3JLG3FIjo= +go.uber.org/zap v1.28.0/go.mod h1:rDLpOi171uODNm/mxFcuYWxDsqWSAVkFdX4XojSKg/Q= go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= diff --git a/bindata/crds/rabbitmq.openstack.org_rabbitmqvhosts.yaml b/bindata/crds/rabbitmq.openstack.org_rabbitmqvhosts.yaml index 55a11cbbba..3e76c1cac2 100644 --- a/bindata/crds/rabbitmq.openstack.org_rabbitmqvhosts.yaml +++ b/bindata/crds/rabbitmq.openstack.org_rabbitmqvhosts.yaml @@ -7,7 +7,7 @@ metadata: labels: backup.openstack.org/category: controlplane backup.openstack.org/restore: "true" - backup.openstack.org/restore-order: "40" + backup.openstack.org/restore-order: "30" name: rabbitmqvhosts.rabbitmq.openstack.org spec: group: rabbitmq.openstack.org diff --git a/config/operator/manager_operator_images.yaml b/config/operator/manager_operator_images.yaml index d98666ab03..75d362d7a6 100644 --- a/config/operator/manager_operator_images.yaml +++ b/config/operator/manager_operator_images.yaml @@ -26,7 +26,7 @@ spec: - name: RELATED_IMAGE_HORIZON_OPERATOR_MANAGER_IMAGE_URL value: quay.io/openstack-k8s-operators/horizon-operator@sha256:705211b1980c1d4c84b284a20b7a6e1662da9912027377e611b682da88dca8ec - name: RELATED_IMAGE_INFRA_OPERATOR_MANAGER_IMAGE_URL - value: quay.io/openstack-k8s-operators/infra-operator@sha256:508d7cc33da4e4d1bc03e0b0f03dfb8f5875639e9b18354f8aea1c2110224d08 + value: quay.io/openstack-k8s-operators/infra-operator@sha256:d8e7e53913119e62b8710c6d7d15cc0d0890ba96a0058ba61b994128cfe6502f - name: RELATED_IMAGE_IRONIC_OPERATOR_MANAGER_IMAGE_URL value: quay.io/openstack-k8s-operators/ironic-operator@sha256:d32d5dc44157ad38f7df15630a03a6d0429f98360fc7f798a392d33f8fbf1869 - name: RELATED_IMAGE_KEYSTONE_OPERATOR_MANAGER_IMAGE_URL diff --git a/go.mod b/go.mod index 1a8eea409c..33801f8a32 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/iancoleman/strcase v0.3.0 github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.7.7 github.com/onsi/ginkgo/v2 v2.28.2 - github.com/onsi/gomega v1.39.1 + github.com/onsi/gomega v1.40.0 github.com/openshift/api v3.9.0+incompatible github.com/openstack-k8s-operators/barbican-operator/api v0.6.1-0.20260420052305-96c3a8196933 github.com/openstack-k8s-operators/cinder-operator/api v0.6.1-0.20260418071314-55ff2fc10b0c @@ -18,12 +18,12 @@ require ( github.com/openstack-k8s-operators/glance-operator/api v0.6.1-0.20260418071313-4af756ba3dac github.com/openstack-k8s-operators/heat-operator/api v0.6.1-0.20260420052550-a562e0ee16fd github.com/openstack-k8s-operators/horizon-operator/api v0.6.1-0.20260418053129-fb096ad89dce - github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20260416122644-5476763a36b6 + github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20260507103247-9c1255698eac github.com/openstack-k8s-operators/ironic-operator/api v0.6.1-0.20260420052552-1ba026c533d6 github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20260420052838-77f94aef5af2 github.com/openstack-k8s-operators/lib-common/modules/ansible v0.6.1-0.20260417092244-81c71b39e981 github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.6.1-0.20260417092244-81c71b39e981 - github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20260417092244-81c71b39e981 + github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20260506154724-30a976ba8ef0 github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20260417092244-81c71b39e981 github.com/openstack-k8s-operators/lib-common/modules/test v0.6.1-0.20260417092244-81c71b39e981 github.com/openstack-k8s-operators/manila-operator/api v0.6.1-0.20260420052836-ac1a4d8a769e @@ -41,7 +41,7 @@ require ( github.com/openstack-k8s-operators/watcher-operator/api v0.6.1-0.20260414124111-458e17672b3c github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.11.1 - go.uber.org/zap v1.27.1 + go.uber.org/zap v1.28.0 gopkg.in/yaml.v3 v3.0.1 k8s.io/api v0.31.14 k8s.io/apiextensions-apiserver v0.33.2 diff --git a/go.sum b/go.sum index 1447b6c45e..1c039e6985 100644 --- a/go.sum +++ b/go.sum @@ -134,8 +134,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/onsi/ginkgo/v2 v2.28.2 h1:DTrMfpqxiNUyQ3Y0zhn1n3cOO2euFgQPYIpkWwxVFps= github.com/onsi/ginkgo/v2 v2.28.2/go.mod h1:CLtbVInNckU3/+gC8LzkGUb9oF+e8W8TdUsxPwvdOgE= -github.com/onsi/gomega v1.39.1 h1:1IJLAad4zjPn2PsnhH70V4DKRFlrCzGBNrNaru+Vf28= -github.com/onsi/gomega v1.39.1/go.mod h1:hL6yVALoTOxeWudERyfppUcZXjMwIMLnuSfruD2lcfg= +github.com/onsi/gomega v1.40.0 h1:Vtol0e1MghCD2ZVIilPDIg44XSL9l2QAn8ZNaljWcJc= +github.com/onsi/gomega v1.40.0/go.mod h1:M/Uqpu/8qTjtzCLUA2zJHX9Iilrau25x1PdoSRbWh5A= 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/barbican-operator/api v0.6.1-0.20260420052305-96c3a8196933 h1:Ks/OYlX2ipYy1XjAezm1955VkmwXoi+fAZlL0X0NDwM= @@ -150,8 +150,8 @@ github.com/openstack-k8s-operators/heat-operator/api v0.6.1-0.20260420052550-a56 github.com/openstack-k8s-operators/heat-operator/api v0.6.1-0.20260420052550-a562e0ee16fd/go.mod h1:aA+YEZ3UJCQvJB2X3qOliGVB7EXdImfJ0qV2jUG/L0E= github.com/openstack-k8s-operators/horizon-operator/api v0.6.1-0.20260418053129-fb096ad89dce h1:4nqAqtmfoN3VoWtFhHj65iZhi40KNp254/trUuoTD0M= github.com/openstack-k8s-operators/horizon-operator/api v0.6.1-0.20260418053129-fb096ad89dce/go.mod h1:ZMH+2206hZgGFjEhC+hhPvU+v6haNaeh5FR1mHylfqw= -github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20260416122644-5476763a36b6 h1:117Gu9HCSu2tAp579WnCJ9QtnslH2qnPB8UFvn8ZpqE= -github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20260416122644-5476763a36b6/go.mod h1:i7l8cihvFktd/LSuyvL2z6OcwauarQGoVhDMePL4VyI= +github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20260507103247-9c1255698eac h1:iALKqINqZR916pWQdjBzi4RtydKcAFAFAMCBXGhnsL0= +github.com/openstack-k8s-operators/infra-operator/apis v0.6.1-0.20260507103247-9c1255698eac/go.mod h1:/S2AN21zV70V1XuL0Of2dCjYWNkKwQSyNI8l/iQVrMs= github.com/openstack-k8s-operators/ironic-operator/api v0.6.1-0.20260420052552-1ba026c533d6 h1:thGt9sbYC1L9/UvkeYQQbWGxeiNeaXVckB/0QuBkN78= github.com/openstack-k8s-operators/ironic-operator/api v0.6.1-0.20260420052552-1ba026c533d6/go.mod h1:pnFZOetSrSoCdyMyTOUTfsFTdwtGwNFKtaPNNZtyHuw= github.com/openstack-k8s-operators/keystone-operator/api v0.6.1-0.20260420052838-77f94aef5af2 h1:h7pTz90cHqX6nTYjYDphuitIfD4UpM9yGnI3AbLdHrY= @@ -160,8 +160,8 @@ github.com/openstack-k8s-operators/lib-common/modules/ansible v0.6.1-0.202604170 github.com/openstack-k8s-operators/lib-common/modules/ansible v0.6.1-0.20260417092244-81c71b39e981/go.mod h1:tXxVkkk8HlATwTmDA5RTP3b+c8apfuMM15mZ2wW5iNs= github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.6.1-0.20260417092244-81c71b39e981 h1:G0YU5B6AhXDy/46urlNjz6tMXmHGDdoslgucTIN3F30= github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.6.1-0.20260417092244-81c71b39e981/go.mod h1:GzD7Jc5o98ptJ97DSjhC0CQ6OiTP0PB/2qJqxYGcOH8= -github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20260417092244-81c71b39e981 h1:v1viH0gmNb+AXMg/0GxDcj8VUTdjVLotfOIGrNyMxHk= -github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20260417092244-81c71b39e981/go.mod h1:I/VBXZLdjk8DUGsEbB+Ha72JBFYYntP7Pm2FpEto9K8= +github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20260506154724-30a976ba8ef0 h1:vkFvn06Ns9qW4AbzFjFDu8ioosRmhkEZiDrO3DOQhLg= +github.com/openstack-k8s-operators/lib-common/modules/common v0.6.1-0.20260506154724-30a976ba8ef0/go.mod h1:aIuG6lx3aS0vnXweRNdR/Q0SlfOsLIo0OzrqKK7C6xs= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20260417092244-81c71b39e981 h1:jN3Kvt+RYUTaL9EXeeeIqRXVjqeNF74SuLTDXmi4X2Y= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.6.1-0.20260417092244-81c71b39e981/go.mod h1:7yqbVpg0k0vW+kZks+TMU/cd1ovoejyHfVPWcyGYLHI= github.com/openstack-k8s-operators/lib-common/modules/storage v0.6.1-0.20260417092244-81c71b39e981 h1:X3/Gc+i0ZxaROExrpLXonz9EPhftlubFnOK4aSkRLvo= @@ -266,8 +266,8 @@ 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= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc= -go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.uber.org/zap v1.28.0 h1:IZzaP1Fv73/T/pBMLk4VutPl36uNC+OSUh3JLG3FIjo= +go.uber.org/zap v1.28.0/go.mod h1:rDLpOi171uODNm/mxFcuYWxDsqWSAVkFdX4XojSKg/Q= go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= diff --git a/hack/export_operator_related_images.sh b/hack/export_operator_related_images.sh index 31280479e6..ca3d8e7348 100644 --- a/hack/export_operator_related_images.sh +++ b/hack/export_operator_related_images.sh @@ -6,7 +6,7 @@ export RELATED_IMAGE_DESIGNATE_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s- export RELATED_IMAGE_GLANCE_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/glance-operator@sha256:c6c51902eae4064427040a648a3172b2a2663ed75ba5fe65bf4f5ea20ff4b983 export RELATED_IMAGE_HEAT_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/heat-operator@sha256:051fb60096064551502a9e69bb1b54f4303e7941ceb91cebdb12f24aa12bc301 export RELATED_IMAGE_HORIZON_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/horizon-operator@sha256:705211b1980c1d4c84b284a20b7a6e1662da9912027377e611b682da88dca8ec -export RELATED_IMAGE_INFRA_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/infra-operator@sha256:508d7cc33da4e4d1bc03e0b0f03dfb8f5875639e9b18354f8aea1c2110224d08 +export RELATED_IMAGE_INFRA_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/infra-operator@sha256:d8e7e53913119e62b8710c6d7d15cc0d0890ba96a0058ba61b994128cfe6502f export RELATED_IMAGE_IRONIC_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/ironic-operator@sha256:d32d5dc44157ad38f7df15630a03a6d0429f98360fc7f798a392d33f8fbf1869 export RELATED_IMAGE_KEYSTONE_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/keystone-operator@sha256:dee0da68f43b117f55bcf0d5bf224deba7845cd3058eb7b6f49d757d96829f2b export RELATED_IMAGE_MANILA_OPERATOR_MANAGER_IMAGE_URL=quay.io/openstack-k8s-operators/manila-operator@sha256:4a1978fcd77a62c0ee127dfc3c75b5a5273b871aac52c60ad1a0cef46d004acf diff --git a/internal/controller/core/openstackcontrolplane_controller.go b/internal/controller/core/openstackcontrolplane_controller.go index f9a5a55f70..2ca53ca8f9 100644 --- a/internal/controller/core/openstackcontrolplane_controller.go +++ b/internal/controller/core/openstackcontrolplane_controller.go @@ -35,6 +35,7 @@ import ( redisv1 "github.com/openstack-k8s-operators/infra-operator/apis/redis/v1beta1" ironicv1 "github.com/openstack-k8s-operators/ironic-operator/api/v1beta1" keystonev1 "github.com/openstack-k8s-operators/keystone-operator/api/v1beta1" + "github.com/openstack-k8s-operators/lib-common/modules/common/annotations" "github.com/openstack-k8s-operators/lib-common/modules/common/backup" condition "github.com/openstack-k8s-operators/lib-common/modules/common/condition" common_helper "github.com/openstack-k8s-operators/lib-common/modules/common/helper" @@ -487,7 +488,7 @@ func (r *OpenStackControlPlaneReconciler) reconcileNormal(ctx context.Context, i ctrlResult, err := webhook.EnsureWebhookTrigger( ctx, instance, - openstack.ReconcileTriggerAnnotation, + annotations.ReconcileTriggerAnnotation, "messaging bus migration", helper.GetLogger(), 5*time.Minute, diff --git a/internal/openstack/cinder.go b/internal/openstack/cinder.go index 1d64d425a4..11c9efbb7d 100644 --- a/internal/openstack/cinder.go +++ b/internal/openstack/cinder.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" + "github.com/openstack-k8s-operators/lib-common/modules/common/annotations" "github.com/openstack-k8s-operators/lib-common/modules/common/condition" "github.com/openstack-k8s-operators/lib-common/modules/common/helper" "github.com/openstack-k8s-operators/lib-common/modules/common/service" @@ -27,7 +28,7 @@ func ReconcileCinder(ctx context.Context, instance *corev1beta1.OpenStackControl // Trigger webhook to cache service name if UniquePodNames is enabled and not yet cached // This handles operator upgrade scenario where existing CRs don't have ServiceName set if instance.Spec.Cinder.UniquePodNames && instance.Spec.Cinder.ServiceName == "" { - return webhook.EnsureWebhookTrigger(ctx, instance, corev1beta1.ReconcileTriggerAnnotation, "Cinder service name caching", Log, 0) + return webhook.EnsureWebhookTrigger(ctx, instance, annotations.ReconcileTriggerAnnotation, "Cinder service name caching", Log, 0) } cinderName, altCinderName := instance.GetServiceNameCached(corev1beta1.CinderName, instance.Spec.Cinder.UniquePodNames, instance.Spec.Cinder.ServiceName) diff --git a/internal/openstack/common.go b/internal/openstack/common.go index 3b9e914bee..8f5f53d64d 100644 --- a/internal/openstack/common.go +++ b/internal/openstack/common.go @@ -69,11 +69,6 @@ const ( // caCertSelector selector passed to cert-manager to set on the ca cert secret caCertSelector = "ca-cert" - - // ReconcileTriggerAnnotation - Generic annotation to trigger reconciliation and webhook. - // Value is typically a timestamp to ensure annotation changes trigger updates - // Used by controller to trigger UPDATE webhook when needed (e.g., for service name caching, field migrations) - ReconcileTriggerAnnotation = "openstack.org/reconcile-trigger" ) // GetLogger returns a logger object with a prefix of "controller.name" and additional controller context fields diff --git a/internal/openstack/glance.go b/internal/openstack/glance.go index f94a4e4222..82c908a6ec 100644 --- a/internal/openstack/glance.go +++ b/internal/openstack/glance.go @@ -6,6 +6,7 @@ import ( glancev1 "github.com/openstack-k8s-operators/glance-operator/api/v1beta1" rabbitmqv1 "github.com/openstack-k8s-operators/infra-operator/apis/rabbitmq/v1beta1" + "github.com/openstack-k8s-operators/lib-common/modules/common/annotations" "github.com/openstack-k8s-operators/lib-common/modules/common/condition" "github.com/openstack-k8s-operators/lib-common/modules/common/helper" "github.com/openstack-k8s-operators/lib-common/modules/common/service" @@ -35,7 +36,7 @@ func ReconcileGlance(ctx context.Context, instance *corev1beta1.OpenStackControl // Trigger webhook to cache service name if UniquePodNames is enabled and not yet cached // This handles operator upgrade scenario where existing CRs don't have ServiceName set if instance.Spec.Glance.UniquePodNames && instance.Spec.Glance.ServiceName == "" { - return webhook.EnsureWebhookTrigger(ctx, instance, corev1beta1.ReconcileTriggerAnnotation, "Glance service name caching", Log, 0) + return webhook.EnsureWebhookTrigger(ctx, instance, annotations.ReconcileTriggerAnnotation, "Glance service name caching", Log, 0) } glanceName, altGlanceName := instance.GetServiceNameCached(corev1beta1.GlanceName, instance.Spec.Glance.UniquePodNames, instance.Spec.Glance.ServiceName) diff --git a/internal/webhook/core/v1beta1/openstackcontrolplane_webhook.go b/internal/webhook/core/v1beta1/openstackcontrolplane_webhook.go index 1b47c03cc2..a3764d31a9 100644 --- a/internal/webhook/core/v1beta1/openstackcontrolplane_webhook.go +++ b/internal/webhook/core/v1beta1/openstackcontrolplane_webhook.go @@ -28,6 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/webhook" "sigs.k8s.io/controller-runtime/pkg/webhook/admission" + common_annotations "github.com/openstack-k8s-operators/lib-common/modules/common/annotations" corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/api/core/v1beta1" ) @@ -125,8 +126,8 @@ func (d *OpenStackControlPlaneCustomDefaulter) cacheServiceNames(ctx context.Con // Remove it regardless of whether we cached anything to avoid annotation pollution annotations := r.GetAnnotations() if annotations != nil { - if _, exists := annotations[corev1beta1.ReconcileTriggerAnnotation]; exists { - delete(annotations, corev1beta1.ReconcileTriggerAnnotation) + if _, exists := annotations[common_annotations.ReconcileTriggerAnnotation]; exists { + delete(annotations, common_annotations.ReconcileTriggerAnnotation) r.SetAnnotations(annotations) if serviceNameCached { openstackcontrolplanelog.Info("Removed reconcile-trigger annotation after caching service name") diff --git a/test/functional/ctlplane/openstackoperator_controller_test.go b/test/functional/ctlplane/openstackoperator_controller_test.go index d65e71ea14..eb328a8d6d 100644 --- a/test/functional/ctlplane/openstackoperator_controller_test.go +++ b/test/functional/ctlplane/openstackoperator_controller_test.go @@ -45,6 +45,7 @@ import ( topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1" "github.com/openstack-k8s-operators/lib-common/modules/certmanager" + common_annotations "github.com/openstack-k8s-operators/lib-common/modules/common/annotations" "github.com/openstack-k8s-operators/lib-common/modules/common/condition" "github.com/openstack-k8s-operators/lib-common/modules/common/service" "github.com/openstack-k8s-operators/lib-common/modules/common/tls" @@ -4884,7 +4885,7 @@ var _ = Describe("Application Credentials configuration in control plane", func( latest := GetOpenStackControlPlane(openstackcontrolplaneName) annotations := latest.GetAnnotations() if annotations != nil { - if val, exists := annotations[corev1.ReconcileTriggerAnnotation]; exists { + if val, exists := annotations[common_annotations.ReconcileTriggerAnnotation]; exists { sawAnnotation = true // Verify timestamp format is valid _, err := time.Parse(time.RFC3339, val) @@ -4913,7 +4914,7 @@ var _ = Describe("Application Credentials configuration in control plane", func( // Annotation should be removed annotations := latest.GetAnnotations() if annotations != nil { - _, exists := annotations[corev1.ReconcileTriggerAnnotation] + _, exists := annotations[common_annotations.ReconcileTriggerAnnotation] g.Expect(exists).To(BeFalse(), "Annotation should be removed in stable state") } @@ -4952,7 +4953,7 @@ var _ = Describe("Application Credentials configuration in control plane", func( if annotations == nil { annotations = make(map[string]string) } - annotations[corev1.ReconcileTriggerAnnotation] = time.Now().Format(time.RFC3339) + annotations[common_annotations.ReconcileTriggerAnnotation] = time.Now().Format(time.RFC3339) annotations["test-webhook-marker"] = "test-added" latest.SetAnnotations(annotations) g.Expect(k8sClient.Update(ctx, latest)).To(Succeed()) @@ -4969,7 +4970,7 @@ var _ = Describe("Application Credentials configuration in control plane", func( latest := GetOpenStackControlPlane(openstackcontrolplaneName) annotations := latest.GetAnnotations() if annotations != nil { - _, exists := annotations[corev1.ReconcileTriggerAnnotation] + _, exists := annotations[common_annotations.ReconcileTriggerAnnotation] if exists { annotationPersisted = true } @@ -5001,7 +5002,7 @@ var _ = Describe("Application Credentials configuration in control plane", func( annotations := latest.GetAnnotations() if annotations != nil { - _, exists := annotations[corev1.ReconcileTriggerAnnotation] + _, exists := annotations[common_annotations.ReconcileTriggerAnnotation] if exists { GinkgoWriter.Printf("ERROR: Annotation still exists - webhooks not functioning\n") GinkgoWriter.Printf("Current annotations: %v\n", annotations)