Skip to content

Commit 0fd5a42

Browse files
committed
Add barbican configurable API Timeout
Depends-On: openstack-k8s-operators/barbican-operator#197 Signed-off-by: Veronika Fisarova <[email protected]>
1 parent 39c4136 commit 0fd5a42

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

apis/core/v1beta1/openstackcontrolplane_webhook.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,8 @@ func (r *OpenStackControlPlane) DefaultServices() {
908908
r.Spec.Barbican.Template = &barbicanv1.BarbicanSpecCore{}
909909
}
910910
r.Spec.Barbican.Template.Default()
911+
initializeOverrideSpec(&r.Spec.Barbican.APIOverride.Route, true)
912+
r.Spec.Barbican.Template.SetDefaultRouteAnnotations(r.Spec.Barbican.APIOverride.Route.Annotations)
911913
}
912914

913915
// Designate

tests/functional/ctlplane/openstackoperator_controller_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,10 @@ var _ = Describe("OpenStackOperator controller", func() {
590590
Expect(OSCtlplane.Spec.Telemetry.AodhAPIOverride.Route).Should(Not(BeNil()))
591591
Expect(OSCtlplane.Spec.Telemetry.AodhAPIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "60s"))
592592
Expect(OSCtlplane.Spec.Telemetry.AodhAPIOverride.Route.Annotations).Should(HaveKeyWithValue("api.aodh.openstack.org/timeout", "60s"))
593+
//TODO: Enable these tests when Barbican would be enabled on FTs
594+
// Expect(OSCtlplane.Spec.Barbican.APIOverride.Route).Should(Not(BeNil()))
595+
// Expect(OSCtlplane.Spec.Barbican.APIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "90s"))
596+
// Expect(OSCtlplane.Spec.Barbican.APIOverride.Route.Annotations).Should(HaveKeyWithValue("api.barbican.openstack.org/timeout", "90s"))
593597
})
594598

595599
It("should create selfsigned issuer and public+internal CA and issuer", func() {
@@ -867,6 +871,10 @@ var _ = Describe("OpenStackOperator controller", func() {
867871
Expect(OSCtlplane.Spec.Telemetry.AodhAPIOverride.Route).Should(Not(BeNil()))
868872
Expect(OSCtlplane.Spec.Telemetry.AodhAPIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "60s"))
869873
Expect(OSCtlplane.Spec.Telemetry.AodhAPIOverride.Route.Annotations).Should(HaveKeyWithValue("api.aodh.openstack.org/timeout", "60s"))
874+
//TODO: Enable these tests when Barbican would be enabled on FTs
875+
// Expect(OSCtlplane.Spec.Barbican.APIOverride.Route).Should(Not(BeNil()))
876+
// Expect(OSCtlplane.Spec.Barbican.APIOverride.Route.Annotations).Should(HaveKeyWithValue("haproxy.router.openshift.io/timeout", "90s"))
877+
// Expect(OSCtlplane.Spec.Barbican.APIOverride.Route.Annotations).Should(HaveKeyWithValue("api.barbican.openstack.org/timeout", "90s"))
870878
})
871879

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

0 commit comments

Comments
 (0)