Skip to content

Commit

Permalink
feat: set reinvocationPolicy: IfNeeded for webhook (#794)
Browse files Browse the repository at this point in the history
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
  • Loading branch information
aramase committed Mar 15, 2023
1 parent 245f593 commit a2c807b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/webhook/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ webhooks:
failurePolicy: Fail
matchPolicy: Equivalent
name: mutation.azure-workload-identity.io
reinvocationPolicy: IfNeeded
rules:
- apiGroups:
- ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ webhooks:
objectSelector:
matchLabels:
azure.workload.identity/use: "true"
reinvocationPolicy: IfNeeded
rules:
- apiGroups:
- ""
Expand Down
1 change: 1 addition & 0 deletions manifest_staging/deploy/azure-wi-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ webhooks:
objectSelector:
matchLabels:
azure.workload.identity/use: "true"
reinvocationPolicy: IfNeeded
rules:
- apiGroups:
- ""
Expand Down
2 changes: 1 addition & 1 deletion pkg/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var (
ProxyImageVersion string
)

// +kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,failurePolicy=fail,groups="",resources=pods,verbs=create,versions=v1,name=mutation.azure-workload-identity.io,sideEffects=None,admissionReviewVersions=v1;v1beta1,matchPolicy=Equivalent
// +kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,failurePolicy=fail,groups="",resources=pods,verbs=create,versions=v1,name=mutation.azure-workload-identity.io,sideEffects=None,admissionReviewVersions=v1;v1beta1,matchPolicy=Equivalent,reinvocationPolicy=IfNeeded
// +kubebuilder:rbac:groups="",resources=serviceaccounts,verbs=get;list;watch

// this is required for the webhook server certs generated and rotated as part of cert-controller rotator
Expand Down

0 comments on commit a2c807b

Please sign in to comment.