Skip to content

Commit

Permalink
fix(clustertool): exclude cnpg pods from kyverno
Browse files Browse the repository at this point in the history
  • Loading branch information
PrivatePuffin committed Oct 24, 2024
1 parent 9dd13f9 commit d9ff599
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ spec:
- resources:
kinds:
- Pod
exclude:
any:
- resources:
kinds:
- Pod
name: '*cnpg*'
preconditions:
all:
- key: "{{request.operation || 'BACKGROUND'}}"
Expand All @@ -31,6 +37,8 @@ spec:
mutate:
foreach:
- list: "request.object.spec.containers"
# Exclude containers with 'cloudnative-pg' in the name
filter: "element.name != 'cloudnative-pg'"
context:
- name: resolvedRef
imageRegistry:
Expand Down

0 comments on commit d9ff599

Please sign in to comment.