diff --git a/helm/kanister-operator/templates/_helpers.tpl b/helm/kanister-operator/templates/_helpers.tpl index b9d9ab4688..a535f530a2 100644 --- a/helm/kanister-operator/templates/_helpers.tpl +++ b/helm/kanister-operator/templates/_helpers.tpl @@ -111,3 +111,12 @@ Define a custom kanister-tools image {{- define "kanister-tools.image" -}} {{- printf "%s:%s" (.Values.kanisterToolsImage.image) (.Values.kanisterToolsImage.tag) -}} {{- end -}} + +{{/* +Define a security Context at Container level +*/}} +{{- define "controller.containerSecurityContext" -}} +{{- if .Values.controller.containerSecurityContext -}} +{{ toYaml .Values.controller.containerSecurityContext | indent 10 }} +{{- end -}} +{{- end -}} \ No newline at end of file