diff --git a/charts/kyverno/templates/deployment.yaml b/charts/kyverno/templates/deployment.yaml index 6d1723d893..2a8e178e40 100644 --- a/charts/kyverno/templates/deployment.yaml +++ b/charts/kyverno/templates/deployment.yaml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ template "kyverno.fullname" . }} + name: kyverno labels: {{ include "kyverno.labels" . | nindent 4 }} app: kyverno namespace: {{ template "kyverno.namespace" . }} @@ -103,6 +103,8 @@ spec: fieldPath: metadata.namespace - name: KYVERNO_SVC value: {{ template "kyverno.serviceName" . }} + - name: KYVERNO_DEPLOYMENT + value: {{ template "kyverno.fullname" . }} {{- with .Values.livenessProbe }} livenessProbe: {{ tpl (toYaml .) $ | nindent 12 }} {{- end }} diff --git a/pkg/config/config.go b/pkg/config/config.go index 056dfdb396..7b4cce0174 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -58,7 +58,8 @@ var ( KyvernoNamespace = getKyvernoNameSpace() // KyvernoDeploymentName is the Kyverno deployment name - KyvernoDeploymentName = getKyvernoDeploymentName() + //KyvernoDeploymentName = getKyvernoDeploymentName() + KyvernoDeploymentName = "kyverno" //KyvernoServiceName is the Kyverno service name KyvernoServiceName = getKyvernoServiceName() @@ -114,7 +115,7 @@ func getKyvernoServiceName() string { return webhookServiceName } -// getKyvernoDeploymentName - setting default KyvernoServiceName +// getKyvernoDeploymentName - setting default KyvernoDeploymentName func getKyvernoDeploymentName() string { name := os.Getenv("KYVERNO_DEPLOYMENT") if name == "" {