Skip to content

Commit

Permalink
Add matchCondition to webhook config (#376)
Browse files Browse the repository at this point in the history
Should add some efficiency as it only lets the webhook fire when needed

Signed-off-by: Brett Tofel <[email protected]>
  • Loading branch information
bentito authored Sep 5, 2024
1 parent 7603eaa commit 6584e7e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/base/manager/webhook/patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@
- op: add
path: /webhooks/0/clientConfig/service/port
value: 443
- op: add
path: /webhooks/0/matchConditions
value:
- name: MissingOrIncorrectMetadataNameLabel
expression: "!has(object.metadata.labels) || !('olm.operatorframework.io/metadata.name' in object.metadata.labels) || object.metadata.labels['olm.operatorframework.io/metadata.name'] != object.metadata.name"

0 comments on commit 6584e7e

Please sign in to comment.