apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  labels:
    {{- include "nexus-operator.labels" . | nindent 4 }}
  name: edp-{{ .Values.name }}-role
rules:
  - apiGroups:
      - ""
    resources:
      - secrets
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - ''
    verbs:
      - get
      - patch
      - update
      - create
    resources:
      - secrets
    resourceNames:
      - edp-nexus-operator-webhook-certs
  - apiGroups:
      - edp.epam.com
    resources:
      - nexuses
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - update
      - watch
  - apiGroups:
      - edp.epam.com
    resources:
      - nexuses/finalizers
    verbs:
      - update
  - apiGroups:
      - edp.epam.com
    resources:
      - nexuses/status
    verbs:
      - get
      - patch
      - update
  - apiGroups:
      - edp.epam.com
    resources:
      - nexusrepositories
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - update
      - watch
  - apiGroups:
      - edp.epam.com
    resources:
      - nexusrepositories/finalizers
    verbs:
      - update
  - apiGroups:
      - edp.epam.com
    resources:
      - nexusrepositories/status
    verbs:
      - get
      - patch
      - update
  - apiGroups:
      - edp.epam.com
    resources:
      - nexusroles
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - update
      - watch
  - apiGroups:
      - edp.epam.com
    resources:
      - nexusroles/finalizers
    verbs:
      - update
  - apiGroups:
      - edp.epam.com
    resources:
      - nexusroles/status
    verbs:
      - get
      - patch
      - update
  - apiGroups:
      - edp.epam.com
    resources:
      - nexusscripts
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - update
      - watch
  - apiGroups:
      - edp.epam.com
    resources:
      - nexusscripts/finalizers
    verbs:
      - update
  - apiGroups:
      - edp.epam.com
    resources:
      - nexusscripts/status
    verbs:
      - get
      - patch
      - update
  - apiGroups:
      - edp.epam.com
    resources:
      - nexususers
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - update
      - watch
  - apiGroups:
      - edp.epam.com
    resources:
      - nexususers/finalizers
    verbs:
      - update
  - apiGroups:
      - edp.epam.com
    resources:
      - nexususers/status
    verbs:
      - get
      - patch
      - update
  - apiGroups:
      - edp.epam.com
    resources:
      - nexusblobstores
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - update
      - watch
  - apiGroups:
      - edp.epam.com
    resources:
      - nexusblobstores/finalizers
    verbs:
      - update
  - apiGroups:
      - edp.epam.com
    resources:
      - nexusblobstores/status
    verbs:
      - get
      - patch
      - update
  - apiGroups:
      - edp.epam.com
    resources:
      - nexuscleanuppolicies
    verbs:
      - create
      - delete
      - get
      - list
      - patch
      - update
      - watch
  - apiGroups:
      - edp.epam.com
    resources:
      - nexuscleanuppolicies/finalizers
    verbs:
      - update
  - apiGroups:
      - edp.epam.com
    resources:
      - nexuscleanuppolicies/status
    verbs:
      - get
      - patch
      - update
