{{- if .Values.rbac.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
  labels:
    app.kubernetes.io/name: {{ include "kube-ops-view.name" . }}
    helm.sh/chart: {{ include "kube-ops-view.chart" . }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/version: {{ .Chart.AppVersion }}
    app.kubernetes.io/part-of: {{ .Release.Name }}
  name: {{ template "kube-ops-view.fullname" . }}
{{- end -}}
