Skip to content

Commit

Permalink
Merge pull request #664 from SchSeba/fix_matchcondition
Browse files Browse the repository at this point in the history
Fix resource injector for pods wihtout annotation
  • Loading branch information
SchSeba authored Mar 21, 2024
2 parents d9bbbb6 + 74e3501 commit e110c51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bindata/manifests/webhook/003-webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ webhooks:
failurePolicy: Fail
matchConditions:
- name: 'include-networks-annotation'
expression: '"k8s.v1.cni.cncf.io/networks" in object.metadata.annotations'
expression: 'has(object.metadata.annotations) && "k8s.v1.cni.cncf.io/networks" in object.metadata.annotations'
{{- else }}
failurePolicy: Ignore
{{- end}}
Expand Down

0 comments on commit e110c51

Please sign in to comment.