{{ if .Values.rbac.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ include "kube-downscaler.fullname" . }}
  labels:
    app.kubernetes.io/name: {{ include "kube-downscaler.name" . }}
    helm.sh/chart: {{ include "kube-downscaler.chart" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
