apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  labels:
    app: enmasse
  name: enmasse.io:enmasse-operator
rules:
  - apiGroups: [ "apps" ]
    resources: [ "statefulsets", "statefulsets/finalizers", "deployments", "deployments/finalizers", "replicasets" ]
    verbs: [ "get", "list", "watch", "update", "create", "patch", "delete" ]
  - apiGroups: [ "" ]
    resources: [ "configmaps", "secrets", "secrets/finalizers", "persistentvolumeclaims", "services", "services/finalizers", "pods" ]
    verbs: [ "get", "list", "watch", "update", "create", "patch", "delete", "deletecollection" ]
  - apiGroups: [ "extensions", "networking.k8s.io" ]
    resources: [ "ingresses", "ingresses/status"]
    verbs: [ "create", "update", "patch", "get", "list", "watch", "delete" ]
  - apiGroups: [ "", "route.openshift.io" ]
    resources: [ "routes", "routes/custom-host", "routes/status"]
    verbs: [ "create", "update", "patch", "get", "list", "watch", "delete" ]
  - apiGroups: [ "apps.openshift.io" ]
    resources: [ "deploymentconfigs"]
    verbs: [  "get", "list", "watch" ]
  - apiGroups: ["monitoring.coreos.com"]
    resources: ["servicemonitors"]
    verbs: ["create", "update", "patch", "get", "list", "watch", "delete"]
  - apiGroups: [ "admin.enmasse.io" ]
    resources: [ "consoleservices", "consoleservices/finalizers" ]
    verbs: [ "get", "list", "watch", "update", "create", "patch" ]
  - apiGroups: [ "iot.enmasse.io" ]
    resources: [ "iotconfigs", "iotconfigs/finalizers", "iotconfigs/status", "iotprojects", "iotprojects/finalizers", "iotprojects/status" ]
    verbs: [ "get", "list", "watch", "update", "create", "patch" ]
  - apiGroups: [ "batch" ]
    resources: [ "jobs" ]
    verbs: [ "get", "list", "watch", "update", "create", "patch", "delete" ]
