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

feat: allow setting admission controller replica count to 2 (#8932)

* feat: allow setting admission controller replica count to 2

Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>

* feat: add warning for HA mode

Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>

---------

Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: treydock <tdockendorf@osc.edu>
This commit is contained in:
Vishal Choudhary 2023-11-17 20:29:40 +05:30 committed by GitHub
parent d8c2c5818d
commit b391694e67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 9 deletions

View file

@ -77,6 +77,8 @@ annotations:
description: missing image pull policy missing in a couple of deployments
- kind: added
description: added TUF flags for custom sigstore deployments
- kind: added
description: allow setting admission controller replica count to 2
dependencies:
- name: grafana
version: "0.0.0"

View file

@ -22,9 +22,9 @@ The following components have been installed in your cluster:
{{- end }}
{{ if not .Values.admissionController.replicas }}
⚠️ WARNING: Setting the admission controller replica count below 3 means Kyverno is not running in high availability mode.
{{- else if lt (int .Values.admissionController.replicas) 3 }}
⚠️ WARNING: Setting the admission controller replica count below 3 means Kyverno is not running in high availability mode.
⚠️ WARNING: Setting the admission controller replica count below 2 means Kyverno is not running in high availability mode.
{{- else if lt (int .Values.admissionController.replicas) 2 }}
⚠️ WARNING: Setting the admission controller replica count below 2 means Kyverno is not running in high availability mode.
{{- end }}
{{- if semverCompare "<1.21.0" .Capabilities.KubeVersion.Version }}

View file

@ -2,12 +2,6 @@
{{- fail "mode is not supported anymore, please remove it from your release and use admissionController.replicas instead." -}}
{{- end -}}
{{- if .Values.admissionController.replicas -}}
{{- if eq (int .Values.admissionController.replicas) 2 -}}
{{- 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 -}}