apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: myelin-app-role
rules:
  - apiGroups:
      - ""
    resources:
      - namespaces
      - namespaces/exec
    verbs:
      - list
  - apiGroups:
      - ""
    resources:
      - pods
      - pods/exec
      - pods/log
    verbs:
      - create
      - get
      - list
      - watch
      - update
      - patch
      - delete
  - apiGroups:
      - ""
    resources:
      - configmaps
    verbs:
      - create
      - get
      - list
      - watch
      - update
      - patch
      - delete
  - apiGroups:
      - ""
    resources:
      - secrets
    verbs:
      - get
  - apiGroups:
      - ""
    resources:
      - persistentvolumeclaims
    verbs:
      - create
      - delete
  - apiGroups:
      - myelinproj.io
    resources:
      - workflows
      - workflows/finalizers
    verbs:
      - create
      - get
      - list
      - watch
      - update
      - patch
      - delete
  - apiGroups:
      - myelinproj.io
    resources:
      - axons
      - axons/finalizers
    verbs:
      - create
      - get
      - list
      - watch
      - update
      - patch
      - delete
  - apiGroups:
      - myelinproj.io
    resources:
      - deployers
      - deployers/finalizers
    verbs:
      - create
      - get
      - list
      - watch
      - update
      - patch
      - delete
  - apiGroups:
      - machinelearning.seldon.io
    resources:
      - seldondeployments
      - seldondeployments/finalizers
    verbs:
      - create
      - get
      - list
      - watch
      - update
      - patch
      - delete
  - apiGroups:
      - monitoring.coreos.com
    resources:
      - alertmanagers
      - prometheuses
      - servicemonitors
      - prometheusrules
    verbs:
      - create
      - get
      - list
      - watch
      - update
      - patch
      - delete
  # Deployer
  - apiGroups:
      - apps
    resources:
      - deployments
      - deployments/exec
    verbs:
      - create
      - get
      - list
      - watch
      - update
      - patch
      - delete
  - apiGroups:
      - ""
    resources:
      - services
      - services/exec
    verbs:
      - create
      - get
      - list
      - watch
      - update
      - patch
      - delete
  - apiGroups:
      - "networking.istio.io"
    resources:
      - virtualservices
      - virtualservices/exec
    verbs:
      - create
      - get
      - list
      - watch
      - update
      - patch
      - delete
  - apiGroups:
      - "networking.istio.io"
    resources:
      - destinationrules
      - destinationrules/exec
    verbs:
      - create
      - get
      - list
      - watch
      - update
      - patch
      - delete
  - apiGroups:
      - "networking.istio.io"
    resources:
      - gateways
      - gateways/exec
    verbs:
      - create
      - get
      - list
      - watch
      - update
      - patch
      - delete
  - apiGroups:
      - "batch"
    resources:
      - cronjobs
      - cronjobs/exec
    verbs:
      - create
      - get
      - list
      - watch
      - update
      - patch
      - delete