service-account.yaml 1022 B

12345678910111213141516171819202122
  1. {{- if .Values.serviceAccount.create }}
  2. apiVersion: v1
  3. kind: ServiceAccount
  4. metadata:
  5. name: {{ include "clickhouse.serviceAccountName" . }}
  6. namespace: {{ include "common.names.namespace" . | quote }}
  7. labels: {{- include "common.labels.standard" . | nindent 4 }}
  8. app.kubernetes.io/component: clickhouse
  9. {{- if .Values.commonLabels }}
  10. {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
  11. {{- end }}
  12. {{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }}
  13. annotations:
  14. {{- if .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. automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
  22. {{- end }}