Skip to content

Commit a09e481

Browse files
authored
Fix timeout annotation typo and add webhook timeout default (#200)
Signed-off-by: Veronika Fisarova <[email protected]>
1 parent ffbe4b4 commit a09e481

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

api/v1beta1/barbican_webhook.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ func (spec *BarbicanSpecBase) Default() {
9797

9898
// Default - set defaults for this BarbicanSpecBase. NOTE: this version is used by the OpenStackControlplane webhook
9999
func (spec *BarbicanSpecCore) Default() {
100-
// no validations
100+
if spec.APITimeout == 0 {
101+
spec.APITimeout = barbicanDefaults.BarbicanAPITimeout
102+
}
101103
spec.BarbicanSpecBase.Default()
102104
}
103105

@@ -233,7 +235,7 @@ func (spec *BarbicanSpecCore) SetDefaultRouteAnnotations(annotations map[string]
233235
const haProxyAnno = "haproxy.router.openshift.io/timeout"
234236
// Use a custom annotation to flag when the operator has set the default HAProxy timeout
235237
// With the annotation func determines when to overwrite existing HAProxy timeout with the APITimeout
236-
const barbicanAnno = "api.Barbican.openstack.org/timeout"
238+
const barbicanAnno = "api.barbican.openstack.org/timeout"
237239
valBarbicanAPI, okBarbicanAPI := annotations[barbicanAnno]
238240
valHAProxy, okHAProxy := annotations[haProxyAnno]
239241

0 commit comments

Comments
 (0)