diff --git a/apis/core/v1beta1/openstackcontrolplane_webhook.go b/apis/core/v1beta1/openstackcontrolplane_webhook.go index b76b615de..39c1cc637 100644 --- a/apis/core/v1beta1/openstackcontrolplane_webhook.go +++ b/apis/core/v1beta1/openstackcontrolplane_webhook.go @@ -853,6 +853,8 @@ func (r *OpenStackControlPlane) DefaultServices() { r.Spec.Telemetry.Template = &telemetryv1.TelemetrySpecCore{} } r.Spec.Telemetry.Template.Default() + initializeOverrideSpec(&r.Spec.Telemetry.AodhAPIOverride.Route, true) + r.Spec.Telemetry.Template.Autoscaling.SetDefaultRouteAnnotations(r.Spec.Telemetry.AodhAPIOverride.Route.Annotations) } // Heat diff --git a/tests/functional/ctlplane/base_test.go b/tests/functional/ctlplane/base_test.go index e114bdb2e..15f2f0602 100644 --- a/tests/functional/ctlplane/base_test.go +++ b/tests/functional/ctlplane/base_test.go @@ -416,6 +416,20 @@ func GetDefaultOpenStackControlPlaneSpec() map[string]interface{} { "AuthEncryptionKey": "HeatAuthEncryptionKey", }, } + telemetryTemplate := map[string]interface{}{ + "ceilometer": map[string]interface{}{ + "enabled": false, + }, + "metricStorage": map[string]interface{}{ + "enabled": false, + }, + "logging": map[string]interface{}{ + "enabled": false, + }, + "autoscaling": map[string]interface{}{ + "enabled": false, + }, + } return map[string]interface{}{ "secret": "osp-secret", @@ -483,6 +497,10 @@ func GetDefaultOpenStackControlPlaneSpec() map[string]interface{} { "enabled": true, "template": heatTemplate, }, + "telemetry": map[string]interface{}{ + "enabled": true, + "template": telemetryTemplate, + }, } } diff --git a/tests/functional/ctlplane/openstackoperator_controller_test.go b/tests/functional/ctlplane/openstackoperator_controller_test.go index d718b845b..d901b5e35 100644 --- a/tests/functional/ctlplane/openstackoperator_controller_test.go +++ b/tests/functional/ctlplane/openstackoperator_controller_test.go @@ -587,6 +587,9 @@ var _ = Describe("OpenStackOperator controller", func() { //Expect(OSCtlplane.Spec.Octavia.APIOverride.Route).Should(Not(BeNil())) //Expect(OSCtlplane.Spec.Octavia.APIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "120s")) //Expect(OSCtlplane.Spec.Octavia.APIOverride.Route.Annotations).Should(HaveKeyWithValue("api.octavia.openstack.org/timeout", "120s")) + 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")) }) It("should create selfsigned issuer and public+internal CA and issuer", func() { @@ -861,6 +864,9 @@ var _ = Describe("OpenStackOperator controller", func() { Expect(OSCtlplane.Spec.Heat.CnfAPIOverride.Route).Should(Not(BeNil())) Expect(OSCtlplane.Spec.Heat.CnfAPIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "600s")) Expect(OSCtlplane.Spec.Heat.CnfAPIOverride.Route.Annotations).Should(HaveKeyWithValue("api.heat.openstack.org/timeout", "600s")) + 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")) }) It("should create selfsigned issuer and public, internal, libvirt and ovn CA and issuer", func() { diff --git a/tests/functional/ctlplane/openstackversion_controller_test.go b/tests/functional/ctlplane/openstackversion_controller_test.go index abaae1ca1..8e65e929b 100644 --- a/tests/functional/ctlplane/openstackversion_controller_test.go +++ b/tests/functional/ctlplane/openstackversion_controller_test.go @@ -230,6 +230,9 @@ var _ = Describe("OpenStackOperator controller", func() { spec["heat"] = map[string]interface{}{ "enabled": false, } + spec["telemetry"] = map[string]interface{}{ + "enabled": false, + } spec["tls"] = GetTLSPublicSpec() spec["ovn"] = map[string]interface{}{ "enabled": true,