Skip to content

Commit e34f0cc

Browse files
committed
feat(helm): support custom policies with built-in scanner
1 parent 421d81e commit e34f0cc

3 files changed

Lines changed: 26 additions & 1 deletion

File tree

deploy/helm/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ type: application
66
# This is the chart version. This version number should be incremented each time you make changes
77
# to the chart and its templates, including the app version.
88
# Versions are expected to follow Semantic Versioning (https://semver.org/)
9-
version: 0.10.4
9+
version: 0.11.0
1010

1111
# This is the version number of the application being deployed. This version number should be
1212
# incremented each time you make changes to the application. Versions are not expected to

deploy/helm/templates/policies.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,3 +863,12 @@ data:
863863
kubernetes.namespace]))\n\n\tres := {\n\t\t\"msg\": msg,\n\t\t\"id\": __rego_metadata__.id,\n\t\t\"title\":
864864
__rego_metadata__.title,\n\t\t\"severity\": __rego_metadata__.severity,\n\t\t\"type\":
865865
__rego_metadata__.type,\n\t}\n}\n"
866+
{{- with .Values.additionalPolicies }}
867+
{{- range $key, $val := .library }}
868+
library.{{ $key }}: {{ $val | quote }}
869+
{{- end }}
870+
{{- range $key, $val := .policy }}
871+
policy.{{ $key }}.rego: {{ $val.rego | quote }}
872+
policy.{{ $key }}.kinds: {{ $val.kinds | quote }}
873+
{{- end }}
874+
{{- end }}

deploy/helm/values.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,3 +476,19 @@ nodeSelector: {}
476476
tolerations: []
477477

478478
affinity: {}
479+
480+
additionalPolicies:
481+
library: {}
482+
# kubernetes.rego: |
483+
# << REGO >>
484+
# utils.rego: |
485+
# << REGO >>
486+
policy: {}
487+
# access_to_host_pid:
488+
# rego: |
489+
# << REGO >>
490+
# kinds: Workload
491+
# configmap_with_sensitive_data:
492+
# rego: |
493+
# << REGO >>
494+
# kinds: ConfigMap

0 commit comments

Comments
 (0)