apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: edp-aggregate-view-{{ .Release.Namespace }}
  labels:
    rbac.authorization.k8s.io/aggregate-to-view: "true"
rules:
  - apiGroups:
      - v1.edp.epam.com
    resources:
      - keycloakauthflows
      - keycloakclients
      - keycloakclientscopes
      - keycloakrealmcomponents
      - keycloakrealmgroups
      - keycloakrealmidentityproviders
      - keycloakrealmrolebatches
      - keycloakrealmroles
      - keycloakrealms
      - keycloakrealmusers
      - keycloaks
      - clusterkeycloaks
      - clusterkeycloakrealms
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - v2.edp.epam.com
    resources:
      - cdpipelines
      - cdstagedeployments
      - cdstagejenkinsdeployments
      - codebasebranches
      - codebaseimagestreams
      - codebases
      - gerritgroupmembers
      - gerritgroups
      - gerritmergerequests
      - gerritprojectaccesses
      - gerritprojects
      - gerritreplicationconfigs
      - gerrits
      - gitservers
      - jiraissuemetadatas
      - jiraservers
      - quicklinks
      - stages
      - templates
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - edp.epam.com
    resources:
      - sonargroups
      - sonarpermissiontemplates
      - sonars
      - sonarusers
      - sonarqualityprofiles
      - sonarqualitygates
      - nexususers
      - nexusscripts
      - nexusroles
      - nexusrepositories
      - nexuscleanuppolicies
      - nexusblobstores
      - nexuses
      - codemieprojectsettings
      - codemieprojects
      - codemieapplications
      - codemies
      - approvaltasks
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - argoproj.io
    resources:
      - applications
    verbs:
      - list
      - get
      - watch
