serviceaccount.yaml 562 B

1234567891011121314151617
  1. {{- $sa := .Values.serviceAccount }}
  2. {{- if $sa.create }}
  3. {{- $ctx := dict "helm" . }}
  4. {{- $fullname := include "vm.plain.fullname" $ctx }}
  5. {{- $ns := include "vm.namespace" $ctx }}
  6. apiVersion: v1
  7. kind: ServiceAccount
  8. metadata:
  9. {{- $_ := set $ctx "extraLabels" $sa.extraLabels }}
  10. labels: {{ include "vm.metaLabels" $ctx | nindent 4 }}
  11. {{- $_ := unset $ctx "extraLabels" }}
  12. {{- with $sa.annotations }}
  13. annotations: {{ toYaml . | nindent 4 }}
  14. {{- end }}
  15. name: {{ (.Values.serviceAccount).name | default $fullname }}
  16. namespace: {{ $ns }}
  17. {{- end }}