1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00

fix: prevent installing helm chart in namespace kube-system (#4368)

Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
This commit is contained in:
Charles-Edouard Brétéché 2022-08-22 17:53:05 +02:00 committed by GitHub
parent 8e5f831b07
commit e02dbc17d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -30,3 +30,5 @@ annotations:
description: Added possibility to define additional init and sidecar container
- kind: added
description: Added ability to remove namespaces from default resourceFilters list
- kind: added
description: Prevent installing Kyverno in namespace kube-system.

View file

@ -7,3 +7,7 @@
{{ fail "Kyverno does not support running with 2 replicas. For a highly-available deployment, select 3 replicas or for standalone select 1 replica." }}
{{- end }}
{{- end }}
{{- if eq (include "kyverno.namespace" .) "kube-system" }}
{{ fail "Kyverno cannot be installed in namespace kube-system." }}
{{- end }}