Skip to content

Commit

Permalink
Replace NotIn operator with AnyNotIn (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
treydock authored Dec 12, 2024
1 parent 0bcf191 commit 72988c1
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/kyverno-policies/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: kyverno-policies
description: OSC Kyverno policies deployment
type: application
version: 0.29.1
version: 0.29.2
appVersion: "v1.13.2"
maintainers:
- name: treydock
Expand Down
2 changes: 1 addition & 1 deletion charts/kyverno-policies/templates/ingress-allowed-dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ spec:
operator: Equals
value: "*.osc.edu"
- key: "{{`{{ element.host }}`}}"
operator: NotIn
operator: AnyNotIn
value: "{{`{{ allowed | split(@, ',') }}`}}"
2 changes: 1 addition & 1 deletion charts/kyverno-policies/templates/namespace-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ spec:
deny:
conditions:
- key: "{{`{{ request.object.metadata.labels.account }}`}}"
operator: NotIn
operator: AnyNotIn
value: "{{`{{`}} userGroupMap.data.\"user-{{`{{`}} request.object.metadata.labels.\"{{ include "osc.common.serviceAccountKey" . }}\" {{`}}`}}\" {{`}}`}}"
4 changes: 2 additions & 2 deletions charts/kyverno-policies/templates/pod-account-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
deny:
conditions:
- key: "{{`{{ request.object.metadata.labels.account }}`}}"
operator: NotIn
operator: AnyNotIn
value: "{{`{{ userGroupMap.data.\"{{ request.object.metadata.namespace }}\" }}`}}"
- name: paas-user-authorized-for-account
match:
Expand Down Expand Up @@ -92,5 +92,5 @@ spec:
deny:
conditions:
- key: "{{`{{ request.object.metadata.labels.account }}`}}"
operator: NotIn
operator: AnyNotIn
value: "{{`{{ userGroupMap.data.\"user-{{ serviceAccount }}\" }}`}}"
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ spec:
deny:
conditions:
- key: "{{`{{ request.object.spec.securityContext.supplementalGroups[*].to_string(@) }}`}}"
operator: NotIn
operator: AnyNotIn
value: "{{`{{ userGIDMap.data.\"{{ request.object.metadata.namespace }}\" }}`}}"
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ spec:
deny:
conditions:
- key: "{{`{{ request.object.spec.securityContext.supplementalGroups[*].to_string(@) }}`}}"
operator: NotIn
operator: AnyNotIn
value: "{{`{{`}} userGIDMap.data.\"user-{{`{{`}} request.object.metadata.labels.\"{{ include "osc.common.serviceAccountKey" . }}\" {{`}}`}}\" {{`}}`}}"
- name: paas-require-valid-service-account
match:
Expand Down Expand Up @@ -190,5 +190,5 @@ spec:
deny:
conditions:
- key: "{{`{{ request.object.spec.securityContext.supplementalGroups[*].to_string(@) }}`}}"
operator: NotIn
operator: AnyNotIn
value: "{{`{{ userGIDMap.data.\"user-{{ serviceAccount }}\" }}`}}"

0 comments on commit 72988c1

Please sign in to comment.