AlexRogalskiy/java-patterns

View on GitHub
charts/templates/serviceaccount.yaml

Summary

Maintainability
Test Coverage
{{- if .Values.serviceAccount.enabled -}}
{{- $serviceAccountName := include "backend-java-patterns.serviceAccountName" . -}}
apiVersion: v1
kind: ServiceAccount
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
metadata:
  name: {{ $serviceAccountName }}
  namespace: {{ .Release.Namespace | quote }}
  labels:
    {{- include "backend-java-patterns.labels" . | nindent 4 }}
  {{- if .Values.serviceAccount.annotations }}
  {{- with .Values.serviceAccount.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
  {{- end }}
{{- end }}