apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  labels:
    {{- include "jenkins-operator.labels" . | nindent 4 }}
  name: jenkins-resources-role
rules:
  - apiGroups: ["*"] # "" indicates the core API group
    resources: ["codebases", "codebasebranches", "codebasebranches/status", "codebaseimagestreams", "cdpipelines", "nexuses", "stages",
                "gitservers", "adminconsoles", "jenkinses", "jenkins", "edpcomponents", "keycloakrealms",
                "jirafixversions", "codebases/finalizers", "jiraissuemetadatas", "jiraissuemetadatas/finalizers",
                "jiraissuemetadatas/status"]
    verbs: ["get", "create", "update", "patch", "list", "delete"]
  - apiGroups: ["build.openshift.io"] # "" indicates the core API group
    resources: ["buildconfigs", "builds"]
    verbs: ["list"]
  - apiGroups: ["image.openshift.io"] # "" indicates the core API group
    resources: ["imagestreams"]
    verbs: ["list"]
