{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ .Values.serviceAccount.node }}
  namespace: {{ .Release.Namespace }}
{{ include "azuredisk.labels" . | indent 2 }}
{{- if .Values.workloadIdentity.clientID }}
    azure.workload.identity/use: "true"
  annotations:
    azure.workload.identity/client-id: {{ .Values.workloadIdentity.clientID }}
{{- if .Values.workloadIdentity.tenantID }}
    azure.workload.identity/tenant-id: {{ .Values.workloadIdentity.tenantID }}
{{- end }}
{{- end }}
{{- end -}}
