serviceaccount.yaml 1010 B

123456789101112131415161718192021
  1. {{- if .Values.replica.serviceAccount.create }}
  2. apiVersion: v1
  3. kind: ServiceAccount
  4. automountServiceAccountToken: {{ .Values.replica.serviceAccount.automountServiceAccountToken }}
  5. metadata:
  6. name: {{ template "redis.replicaServiceAccountName" . }}
  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.replica.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.replica.serviceAccount.annotations }}
  18. {{- include "common.tplvalues.render" ( dict "value" .Values.replica.serviceAccount.annotations "context" $ ) | nindent 4 }}
  19. {{- end }}
  20. {{- end }}
  21. {{- end }}