diff --git a/apis/core/v1beta1/openstackcontrolplane_webhook.go b/apis/core/v1beta1/openstackcontrolplane_webhook.go index 1fa278f637..006425495f 100644 --- a/apis/core/v1beta1/openstackcontrolplane_webhook.go +++ b/apis/core/v1beta1/openstackcontrolplane_webhook.go @@ -901,6 +901,8 @@ func (r *OpenStackControlPlane) DefaultServices() { r.Spec.Nova.Template = &novav1.NovaSpecCore{} } r.Spec.Nova.Template.Default() + initializeOverrideSpec(&r.Spec.Nova.APIOverride.Route, true) + r.Spec.Nova.Template.SetDefaultRouteAnnotations(r.Spec.Nova.APIOverride.Route.Annotations) } // OVN @@ -925,6 +927,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 c81106611a..3f67d0179e 100644 --- a/tests/functional/ctlplane/openstackoperator_controller_test.go +++ b/tests/functional/ctlplane/openstackoperator_controller_test.go @@ -675,6 +675,11 @@ var _ = Describe("OpenStackOperator controller", func() { Expect(OSCtlplane.Spec.Ironic.APIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "60s")) Expect(OSCtlplane.Spec.Ironic.APIOverride.Route.Annotations).Should(HaveKeyWithValue("api.ironic.openstack.org/timeout", "60s")) Expect(OSCtlplane.Spec.Ironic.InspectorOverride.Route.Annotations).Should(HaveKeyWithValue("inspector.ironic.openstack.org/timeout", "60s")) + //TODO: Enable these tests when Nova and Placement would be enabled on FTs + //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() { @@ -905,6 +910,13 @@ var _ = Describe("OpenStackOperator controller", func() { Expect(OSCtlplane.Spec.Keystone.APIOverride.Route).Should(Not(BeNil())) Expect(OSCtlplane.Spec.Keystone.APIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "60s")) Expect(OSCtlplane.Spec.Keystone.APIOverride.Route.Annotations).Should(HaveKeyWithValue("api.keystone.openstack.org/timeout", "60s")) + //TODO: Enable these tests when Nova and Placement would be enabled on FTs + //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() {