From 1ca79131888b417ff56f2cc23d8c920908ce7a74 Mon Sep 17 00:00:00 2001 From: Veronika Fisarova Date: Fri, 6 Dec 2024 13:55:14 +0100 Subject: [PATCH] Add keystone configurable API Timeout Depends-On: https://github.com/openstack-k8s-operators/keystone-operator/pull/515 Signed-off-by: Veronika Fisarova --- apis/core/v1beta1/openstackcontrolplane_webhook.go | 2 ++ .../ctlplane/openstackoperator_controller_test.go | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/apis/core/v1beta1/openstackcontrolplane_webhook.go b/apis/core/v1beta1/openstackcontrolplane_webhook.go index 39c1cc637..7c981dc61 100644 --- a/apis/core/v1beta1/openstackcontrolplane_webhook.go +++ b/apis/core/v1beta1/openstackcontrolplane_webhook.go @@ -771,6 +771,8 @@ func (r *OpenStackControlPlane) DefaultServices() { r.Spec.Keystone.Template = &keystonev1.KeystoneAPISpecCore{} } r.Spec.Keystone.Template.Default() + initializeOverrideSpec(&r.Spec.Keystone.APIOverride.Route, true) + r.Spec.Keystone.Template.SetDefaultRouteAnnotations(r.Spec.Keystone.APIOverride.Route.Annotations) } // Manila diff --git a/tests/functional/ctlplane/openstackoperator_controller_test.go b/tests/functional/ctlplane/openstackoperator_controller_test.go index 03e46dba3..5602f754a 100644 --- a/tests/functional/ctlplane/openstackoperator_controller_test.go +++ b/tests/functional/ctlplane/openstackoperator_controller_test.go @@ -590,6 +590,9 @@ 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.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")) }) It("should create selfsigned issuer and public+internal CA and issuer", func() { @@ -867,6 +870,9 @@ 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.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")) }) It("should create selfsigned issuer and public, internal, libvirt and ovn CA and issuer", func() {