serviceaccount.yaml 1.0 KB

123456789101112131415161718192021
  1. {{- if and .Values.serviceAccount.create (and (not .Values.master.serviceAccount.create) (not .Values.replica.serviceAccount.create)) }}
  2. apiVersion: v1
  3. kind: ServiceAccount
  4. automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
  5. metadata:
  6. name: {{ template "redis.serviceAccountName" . }}
  7. namespace: {{ .Release.Namespace | quote }}
  8. labels: {{- include "common.labels.standard" . | nindent 4 }}
  9. {{- if .Values.commonLabels }}
  10. {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
  11. {{- end }}
  12. {{- if or .Values.commonAnnotations .Values.serviceAccount.annotations }}
  13. annotations:
  14. {{- if or .Values.commonAnnotations }}
  15. {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
  16. {{- end }}
  17. {{- if .Values.serviceAccount.annotations }}
  18. {{- include "common.tplvalues.render" ( dict "value" .Values.serviceAccount.annotations "context" $ ) | nindent 4 }}
  19. {{- end }}
  20. {{- end }}
  21. {{- end }}