---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: edp-{{ .Values.name }}-role
  labels:
    {{- include "sonar-operator.labels" . | nindent 4 }}
rules:
- apiGroups:
  - ""
  resources:
  - secrets
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - edp.epam.com
  resources:
  - sonargroups
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
- apiGroups:
  - edp.epam.com
  resources:
  - sonargroups/finalizers
  verbs:
  - update
- apiGroups:
  - edp.epam.com
  resources:
  - sonargroups/status
  verbs:
  - get
  - patch
  - update
- apiGroups:
  - edp.epam.com
  resources:
  - sonarpermissiontemplates
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
- apiGroups:
  - edp.epam.com
  resources:
  - sonarpermissiontemplates/finalizers
  verbs:
  - update
- apiGroups:
  - edp.epam.com
  resources:
  - sonarpermissiontemplates/status
  verbs:
  - get
  - patch
  - update
- apiGroups:
  - edp.epam.com
  resources:
  - sonarqualitygates
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
- apiGroups:
  - edp.epam.com
  resources:
  - sonarqualitygates/finalizers
  verbs:
  - update
- apiGroups:
  - edp.epam.com
  resources:
  - sonarqualitygates/status
  verbs:
  - get
  - patch
  - update
- apiGroups:
  - edp.epam.com
  resources:
  - sonarqualityprofiles
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
- apiGroups:
  - edp.epam.com
  resources:
  - sonarqualityprofiles/finalizers
  verbs:
  - update
- apiGroups:
  - edp.epam.com
  resources:
  - sonarqualityprofiles/status
  verbs:
  - get
  - patch
  - update
- apiGroups:
  - edp.epam.com
  resources:
  - sonars
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
- apiGroups:
  - edp.epam.com
  resources:
  - sonars/finalizers
  verbs:
  - update
- apiGroups:
  - edp.epam.com
  resources:
  - sonars/status
  verbs:
  - get
  - patch
  - update
- apiGroups:
  - edp.epam.com
  resources:
  - sonarusers
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
- apiGroups:
  - edp.epam.com
  resources:
  - sonarusers/finalizers
  verbs:
  - update
- apiGroups:
  - edp.epam.com
  resources:
  - sonarusers/status
  verbs:
  - get
  - patch
  - update
