From 5efb5303bb2322e762947d3326fa927fe1ae3cd3 Mon Sep 17 00:00:00 2001 From: Kamil Sambor Date: Tue, 3 Dec 2024 15:25:02 +0100 Subject: [PATCH] Set Nova and Placement timeout Depends-On: https://github.com/openstack-k8s-operators/placement-operator/pull/270 Depends-On: https://github.com/openstack-k8s-operators/nova-operator/pull/891 ref OSPRH-10962 ref OSPRH-10955 --- apis/core/v1beta1/openstackcontrolplane_webhook.go | 4 ++++ .../ctlplane/openstackoperator_controller_test.go | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/apis/core/v1beta1/openstackcontrolplane_webhook.go b/apis/core/v1beta1/openstackcontrolplane_webhook.go index 39c1cc637..657878394 100644 --- a/apis/core/v1beta1/openstackcontrolplane_webhook.go +++ b/apis/core/v1beta1/openstackcontrolplane_webhook.go @@ -812,6 +812,8 @@ func (r *OpenStackControlPlane) DefaultServices() { r.Spec.Nova.Template = &novav1.NovaSpec{} } r.Spec.Nova.Template.Default() + initializeOverrideSpec(&r.Spec.Nova.APIOverride.Route, true) + r.Spec.Nova.Template.SetDefaultRouteAnnotations(r.Spec.Nova.APIOverride.Route.Annotations) } // OVN @@ -836,6 +838,8 @@ func (r *OpenStackControlPlane) DefaultServices() { r.Spec.Placement.Template = &placementv1.PlacementAPISpecCore{} } r.Spec.Placement.Template.Default() + initializeOverrideSpec(&r.Spec.Placement.APIOverride.Route, true) + r.Spec.Placement.Template.SetDefaultRouteAnnotations(r.Spec.Placement.APIOverride.Route.Annotations) } // DNS diff --git a/tests/functional/ctlplane/openstackoperator_controller_test.go b/tests/functional/ctlplane/openstackoperator_controller_test.go index 03e46dba3..b1fa43e8f 100644 --- a/tests/functional/ctlplane/openstackoperator_controller_test.go +++ b/tests/functional/ctlplane/openstackoperator_controller_test.go @@ -590,6 +590,10 @@ var _ = Describe("OpenStackOperator controller", func() { Expect(OSCtlplane.Spec.Telemetry.AodhAPIOverride.Route).Should(Not(BeNil())) Expect(OSCtlplane.Spec.Telemetry.AodhAPIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "60s")) Expect(OSCtlplane.Spec.Telemetry.AodhAPIOverride.Route.Annotations).Should(HaveKeyWithValue("api.aodh.openstack.org/timeout", "60s")) + Expect(OSCtlplane.Spec.Nova.APIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "60s")) + Expect(OSCtlplane.Spec.Nova.APIOverride.Route.Annotations).Should(HaveKeyWithValue("api.nova.openstack.org/timeout", "60s")) + Expect(OSCtlplane.Spec.Placement.APIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "60s")) + Expect(OSCtlplane.Spec.Placement.APIOverride.Route.Annotations).Should(HaveKeyWithValue("api.placement.openstack.org/timeout", "60s")) }) It("should create selfsigned issuer and public+internal CA and issuer", func() { @@ -867,6 +871,12 @@ var _ = Describe("OpenStackOperator controller", func() { Expect(OSCtlplane.Spec.Telemetry.AodhAPIOverride.Route).Should(Not(BeNil())) Expect(OSCtlplane.Spec.Telemetry.AodhAPIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "60s")) Expect(OSCtlplane.Spec.Telemetry.AodhAPIOverride.Route.Annotations).Should(HaveKeyWithValue("api.aodh.openstack.org/timeout", "60s")) + Expect(OSCtlplane.Spec.Nova.APIOverride.Route).Should(Not(BeNil())) + Expect(OSCtlplane.Spec.Nova.APIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "60s")) + Expect(OSCtlplane.Spec.Nova.APIOverride.Route.Annotations).Should(HaveKeyWithValue("api.nova.openstack.org/timeout", "60s")) + Expect(OSCtlplane.Spec.Placement.APIOverride.Route).Should(Not(BeNil())) + Expect(OSCtlplane.Spec.Placement.APIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "60s")) + Expect(OSCtlplane.Spec.Placement.APIOverride.Route.Annotations).Should(HaveKeyWithValue("api.placement.openstack.org/timeout", "60s")) }) It("should create selfsigned issuer and public, internal, libvirt and ovn CA and issuer", func() {