Skip to content

Commit

Permalink
Merge pull request #1196 from vyzigold/add_telemetry_api_timeouts
Browse files Browse the repository at this point in the history
[OSPRH-10956] Add telemetry api timeouts
  • Loading branch information
openshift-merge-bot[bot] authored Nov 21, 2024
2 parents b2d562b + 22526cd commit bacaf8d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apis/core/v1beta1/openstackcontrolplane_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions tests/functional/ctlplane/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -483,6 +497,10 @@ func GetDefaultOpenStackControlPlaneSpec() map[string]interface{} {
"enabled": true,
"template": heatTemplate,
},
"telemetry": map[string]interface{}{
"enabled": true,
"template": telemetryTemplate,
},
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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() {
Expand Down
3 changes: 3 additions & 0 deletions tests/functional/ctlplane/openstackversion_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit bacaf8d

Please sign in to comment.