Skip to content

Commit bacaf8d

Browse files
Merge pull request #1196 from vyzigold/add_telemetry_api_timeouts
[OSPRH-10956] Add telemetry api timeouts
2 parents b2d562b + 22526cd commit bacaf8d

4 files changed

Lines changed: 29 additions & 0 deletions

File tree

apis/core/v1beta1/openstackcontrolplane_webhook.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,8 @@ func (r *OpenStackControlPlane) DefaultServices() {
853853
r.Spec.Telemetry.Template = &telemetryv1.TelemetrySpecCore{}
854854
}
855855
r.Spec.Telemetry.Template.Default()
856+
initializeOverrideSpec(&r.Spec.Telemetry.AodhAPIOverride.Route, true)
857+
r.Spec.Telemetry.Template.Autoscaling.SetDefaultRouteAnnotations(r.Spec.Telemetry.AodhAPIOverride.Route.Annotations)
856858
}
857859

858860
// Heat

tests/functional/ctlplane/base_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,20 @@ func GetDefaultOpenStackControlPlaneSpec() map[string]interface{} {
416416
"AuthEncryptionKey": "HeatAuthEncryptionKey",
417417
},
418418
}
419+
telemetryTemplate := map[string]interface{}{
420+
"ceilometer": map[string]interface{}{
421+
"enabled": false,
422+
},
423+
"metricStorage": map[string]interface{}{
424+
"enabled": false,
425+
},
426+
"logging": map[string]interface{}{
427+
"enabled": false,
428+
},
429+
"autoscaling": map[string]interface{}{
430+
"enabled": false,
431+
},
432+
}
419433

420434
return map[string]interface{}{
421435
"secret": "osp-secret",
@@ -483,6 +497,10 @@ func GetDefaultOpenStackControlPlaneSpec() map[string]interface{} {
483497
"enabled": true,
484498
"template": heatTemplate,
485499
},
500+
"telemetry": map[string]interface{}{
501+
"enabled": true,
502+
"template": telemetryTemplate,
503+
},
486504
}
487505
}
488506

tests/functional/ctlplane/openstackoperator_controller_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,9 @@ var _ = Describe("OpenStackOperator controller", func() {
587587
//Expect(OSCtlplane.Spec.Octavia.APIOverride.Route).Should(Not(BeNil()))
588588
//Expect(OSCtlplane.Spec.Octavia.APIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "120s"))
589589
//Expect(OSCtlplane.Spec.Octavia.APIOverride.Route.Annotations).Should(HaveKeyWithValue("api.octavia.openstack.org/timeout", "120s"))
590+
Expect(OSCtlplane.Spec.Telemetry.AodhAPIOverride.Route).Should(Not(BeNil()))
591+
Expect(OSCtlplane.Spec.Telemetry.AodhAPIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "60s"))
592+
Expect(OSCtlplane.Spec.Telemetry.AodhAPIOverride.Route.Annotations).Should(HaveKeyWithValue("api.aodh.openstack.org/timeout", "60s"))
590593
})
591594

592595
It("should create selfsigned issuer and public+internal CA and issuer", func() {
@@ -861,6 +864,9 @@ var _ = Describe("OpenStackOperator controller", func() {
861864
Expect(OSCtlplane.Spec.Heat.CnfAPIOverride.Route).Should(Not(BeNil()))
862865
Expect(OSCtlplane.Spec.Heat.CnfAPIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "600s"))
863866
Expect(OSCtlplane.Spec.Heat.CnfAPIOverride.Route.Annotations).Should(HaveKeyWithValue("api.heat.openstack.org/timeout", "600s"))
867+
Expect(OSCtlplane.Spec.Telemetry.AodhAPIOverride.Route).Should(Not(BeNil()))
868+
Expect(OSCtlplane.Spec.Telemetry.AodhAPIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "60s"))
869+
Expect(OSCtlplane.Spec.Telemetry.AodhAPIOverride.Route.Annotations).Should(HaveKeyWithValue("api.aodh.openstack.org/timeout", "60s"))
864870
})
865871

866872
It("should create selfsigned issuer and public, internal, libvirt and ovn CA and issuer", func() {

tests/functional/ctlplane/openstackversion_controller_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ var _ = Describe("OpenStackOperator controller", func() {
230230
spec["heat"] = map[string]interface{}{
231231
"enabled": false,
232232
}
233+
spec["telemetry"] = map[string]interface{}{
234+
"enabled": false,
235+
}
233236
spec["tls"] = GetTLSPublicSpec()
234237
spec["ovn"] = map[string]interface{}{
235238
"enabled": true,

0 commit comments

Comments
 (0)