Files
devops-infra-helm-charts-gcp/helm-templates/mimir-distributed/templates/lib/podSecurityContext.tpl
T
2026-08-26 03:39:42 +05:30

14 lines
636 B
Smarty

{{/*
Mimir common podSecurityContext
Params:
ctx = . context
component = name of the component
*/}}
{{- define "mimir.lib.podSecurityContext" -}}
{{- $componentSection := include "mimir.componentSectionFromName" . | fromYaml }}
{{- /* Some components have security context in the values.yalm as podSecurityContext and others as securityContext */}}
{{- $podSecurityContextSection := $componentSection.securityContext | default $componentSection.podSecurityContext -}}
{{- $defaultContext := deepCopy .ctx.Values.rbac.podSecurityContext }}
{{- $podSecurityContextSection | mustMergeOverwrite $defaultContext | toYaml -}}
{{- end -}}