From 90d8c96e746d8e63115cdd4544d2667ecd1e38fd Mon Sep 17 00:00:00 2001 From: Harald Skoglund Date: Thu, 9 Nov 2023 16:58:58 +0100 Subject: [PATCH] fix: allow not setting .Values.podSecurityContext for kyvernoPlugin subchart Signed-off-by: Harald Skoglund --- .../charts/kyvernoPlugin/templates/deployment.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/policy-reporter/charts/kyvernoPlugin/templates/deployment.yaml b/charts/policy-reporter/charts/kyvernoPlugin/templates/deployment.yaml index dde9e566..251c08f9 100644 --- a/charts/policy-reporter/charts/kyvernoPlugin/templates/deployment.yaml +++ b/charts/policy-reporter/charts/kyvernoPlugin/templates/deployment.yaml @@ -45,7 +45,9 @@ spec: imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} - securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- if .Values.podSecurityContext }} + securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- end }} serviceAccountName: {{ include "kyvernoplugin.serviceAccountName" . }} automountServiceAccountToken: true containers: