Skip to content

Commit

Permalink
Fix modifySet (#96)
Browse files Browse the repository at this point in the history
* Add modifySet in values
  • Loading branch information
Edvin N authored Jan 30, 2023
1 parent 27761a7 commit 68726cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 5 additions & 5 deletions charts/gatekeeper-library-constraints/templates/modifyset.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{{- $prefix := .Values.namePrefix }}

{{- range .Values.modifyset }}
{{- $modifysetData := $.Files.Get (printf "generated/%s.yaml" .name) | toString | fromYaml }}
{{- range .Values.modifySets }}
{{- $modifySetData := $.Files.Get (printf "generated/%s.yaml" .name) | toString | fromYaml }}
apiVersion: mutations.gatekeeper.sh/v1beta1
kind: ModifySet
metadata:
name: {{ $prefix }}{{ required "ModifySet name needs to be set" .name }}
spec:
applyTo: {{- $modifysetData.spec.applyTo | toYaml | nindent 4 }}
location: {{ quote $modifysetData.spec.location }}
parameters: {{- $modifysetData.spec.parameters | toYaml | nindent 4 }}
applyTo: {{- $modifySetData.spec.applyTo | toYaml | nindent 4 }}
location: {{ quote $modifySetData.spec.location }}
parameters: {{- $modifySetData.spec.parameters | toYaml | nindent 4 }}
---
{{- end }}
3 changes: 3 additions & 0 deletions charts/gatekeeper-library-constraints/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ constraints: []
mutationExcludedNamespaces: ["kube-system", "gatekeeper-system"]
assigns: []
#- name: container-read-only-root-fs

modifySets: []
#- name: remove-azure-node-spot-taints

0 comments on commit 68726cf

Please sign in to comment.