{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: {{ include "velero.fullname" . }}-server
  namespace: {{ .Release.Namespace }}
  labels:
    app.kubernetes.io/component: server
    app.kubernetes.io/name: {{ include "velero.name" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
    helm.sh/chart: {{ include "velero.chart" . }}
rules:
- apiGroups:
    - "*"
  resources:
    - "*"
  verbs:
    - "*"

{{- end }}
