1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-30 03:15:05 +00:00

sanity check in parent chart for crd-controller mismatch (#9608)

* samity check in parent chart for crd-controller mismatch

Signed-off-by: anushkamittal2001 <anushka@nirmata.com>

* shift checks to validate.yaml

Signed-off-by: anushkamittal2001 <anushka@nirmata.com>

---------

Signed-off-by: anushkamittal2001 <anushka@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Anushka Mittal 2024-02-02 23:58:05 +05:30 committed by GitHub
parent b532525321
commit dd46f9eaf0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,3 +1,22 @@
{{- if and (eq .Values.cleanupController.enabled true) (eq .Values.crds.groups.kyverno.cleanuppolicies false) }}
{{- fail "CRD cleanuppolicies disabled while cleanupController enabled" }}
{{- end }}
{{- if and (eq .Values.cleanupController.enabled true) (eq .Values.crds.groups.kyverno.clustercleanuppolicies false) }}
{{- fail "CRD clustercleanuppolicies disabled while cleanupController enabled" }}
{{- end }}
{{- if and (eq .Values.reportsController.enabled true) (eq .Values.crds.groups.wgpolicyk8s.clusterpolicyreports false) }}
{{- fail "CRD clusterpolicyreports disabled while reportsController enabled" }}
{{- end }}
{{- if and (eq .Values.reportsController.enabled true) (eq .Values.crds.groups.wgpolicyk8s.clusterpolicyreports false) }}
{{- fail "CRD clusterpolicyreports disabled while reportsController enabled" }}
{{- end }}
{{- if and (eq .Values.reportsController.enabled true) (eq .Values.crds.groups.kyverno.backgroundscanreports false) }}
{{- fail "CRD backgroundscanreports disabled while reportsController enabled" }}
{{- end }}
{{- if and (eq .Values.reportsController.enabled true) (eq .Values.crds.groups.kyverno.clusterbackgroundscanreports false) }}
{{- fail "CRD backgroundscanreports disabled while reportsController enabled" }}
{{- end }}
{{- if hasKey .Values "mode" -}}
{{- fail "mode is not supported anymore, please remove it from your release and use admissionController.replicas instead." -}}
{{- end -}}