Files
devops-infra-helm-charts-gcp/helm-templates/victoria-metrics-cluster-latest/templates/serviceaccount.yaml
T
2026-08-26 03:39:42 +05:30

18 lines
573 B
YAML

{{- $sa := .Values.serviceAccount }}
{{- if $sa.create }}
{{- $ctx := dict "helm" . }}
{{- $fullname := include "vm.plain.fullname" $ctx }}
{{- $ns := include "vm.namespace" $ctx }}
apiVersion: v1
kind: ServiceAccount
metadata:
{{- $_ := set $ctx "extraLabels" $sa.extraLabels }}
labels: {{ include "vm.metaLabels" $ctx | nindent 4 }}
{{- $_ := unset $ctx "extraLabels" }}
{{- with $sa.annotations }}
annotations: {{ toYaml . | nindent 4 }}
{{- end }}
name: {{ tpl ((.Values.serviceAccount).name | default $fullname) $ctx }}
namespace: {{ $ns }}
{{- end }}