Skip to content

Commit

Permalink
Set Nova and Placement timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkisaolamb committed Dec 11, 2024
1 parent c8ed999 commit 5efb530
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apis/core/v1beta1/openstackcontrolplane_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,8 @@ func (r *OpenStackControlPlane) DefaultServices() {
r.Spec.Nova.Template = &novav1.NovaSpec{}
}
r.Spec.Nova.Template.Default()
initializeOverrideSpec(&r.Spec.Nova.APIOverride.Route, true)
r.Spec.Nova.Template.SetDefaultRouteAnnotations(r.Spec.Nova.APIOverride.Route.Annotations)
}

// OVN
Expand All @@ -836,6 +838,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
Expand Down
10 changes: 10 additions & 0 deletions tests/functional/ctlplane/openstackoperator_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,10 @@ 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.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() {
Expand Down Expand Up @@ -867,6 +871,12 @@ 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.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() {
Expand Down

0 comments on commit 5efb530

Please sign in to comment.