From bbb3c666a96fcdef3b41a458c9c5ac6a63481471 Mon Sep 17 00:00:00 2001 From: Gorka Eguileor Date: Wed, 5 Jun 2024 18:09:49 +0200 Subject: [PATCH] Support manila setting route annotations This patch allows Manila to set its route annotations. Depends-On: https://github.com/openstack-k8s-operators/manila-operator/pull/282 --- apis/core/v1beta1/openstackcontrolplane_webhook.go | 2 ++ tests/functional/openstackoperator_controller_test.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/apis/core/v1beta1/openstackcontrolplane_webhook.go b/apis/core/v1beta1/openstackcontrolplane_webhook.go index 046b2d0a0..8b4edaf23 100644 --- a/apis/core/v1beta1/openstackcontrolplane_webhook.go +++ b/apis/core/v1beta1/openstackcontrolplane_webhook.go @@ -479,6 +479,8 @@ func (r *OpenStackControlPlane) DefaultServices() { // Manila r.Spec.Manila.Template.Default() + initializeOverrideSpec(&r.Spec.Manila.APIOverride.Route, true) + r.Spec.Manila.Template.SetDefaultRouteAnnotations(r.Spec.Manila.APIOverride.Route.Annotations) // Memcached for key, template := range r.Spec.Memcached.Templates { diff --git a/tests/functional/openstackoperator_controller_test.go b/tests/functional/openstackoperator_controller_test.go index 56eef4d37..cc0c66535 100644 --- a/tests/functional/openstackoperator_controller_test.go +++ b/tests/functional/openstackoperator_controller_test.go @@ -564,6 +564,8 @@ var _ = Describe("OpenStackOperator controller", func() { Expect(OSCtlplane.Spec.Glance.APIOverride[name].Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "60s")) Expect(OSCtlplane.Spec.Glance.APIOverride[name].Route.Annotations).Should(HaveKeyWithValue("api.glance.openstack.org/timeout", "60s")) } + Expect(OSCtlplane.Spec.Manila.APIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "60s")) + Expect(OSCtlplane.Spec.Manila.APIOverride.Route.Annotations).Should(HaveKeyWithValue("api.manila.openstack.org/timeout", "60s")) }) It("should create selfsigned issuer and public+internal CA and issuer", func() {