Skip to content

Commit

Permalink
Fix timeout annotation typo and add webhook timeout default (openstac…
Browse files Browse the repository at this point in the history
…k-k8s-operators#200)

Signed-off-by: Veronika Fisarova <[email protected]>
  • Loading branch information
Deydra71 authored Jan 15, 2025
1 parent ffbe4b4 commit a09e481
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/v1beta1/barbican_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ func (spec *BarbicanSpecBase) Default() {

// Default - set defaults for this BarbicanSpecBase. NOTE: this version is used by the OpenStackControlplane webhook
func (spec *BarbicanSpecCore) Default() {
// no validations
if spec.APITimeout == 0 {
spec.APITimeout = barbicanDefaults.BarbicanAPITimeout
}
spec.BarbicanSpecBase.Default()
}

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

Expand Down

0 comments on commit a09e481

Please sign in to comment.