apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: kubefledged-operator
rules:
- apiGroups:
  - ""
  resources:
  - namespaces
  verbs:
  - get
- apiGroups:
  - ""
  resources:
  - configmaps
  - secrets
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
- apiGroups:
  - ""
  resources:
  - events
  verbs:
  - create
- apiGroups:
  - ""
  resources:
  - serviceaccounts
  - services
  verbs:
  - '*'
- apiGroups:
  - apps
  resources:
  - deployments
  verbs:
  - '*'
- apiGroups:
  - monitoring.coreos.com
  resources:
  - servicemonitors
  verbs:
  - get
  - create
- apiGroups:
  - apps
  resourceNames:
  - kubefledged-operator
  resources:
  - deployments/finalizers
  verbs:
  - update
- apiGroups:
  - ""
  resources:
  - pods
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - apps
  resources:
  - replicasets
  - deployments
  verbs:
  - get
- apiGroups:
  - charts.helm.k8s.io
  resources:
  - '*'
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
- apiGroups:
  - apiextensions.k8s.io
  resources:
  - customresourcedefinitions
  verbs:
  - create
  - delete
  - get
  - patch
- apiGroups:
  - rbac.authorization.k8s.io
  resources:
  - clusterroles
  - clusterrolebindings
  verbs:
  - create
  - delete
  - get
  - patch
- apiGroups:
    - "kubefledged.k8s.io"
  resources:
    - imagecaches
  verbs:
    - get
    - list
    - watch
    - update
    - patch      
- apiGroups:
    - "kubefledged.k8s.io"
  resources:
    - imagecaches/status
  verbs:
    - patch
- apiGroups:
    - ""
  resources:
    - nodes
  verbs:
    - list
    - watch
    - get
- apiGroups:
    - ""
  resources:
    - events
  verbs:
    - get
    - list
    - create
    - update
    - patch
- apiGroups:
    - "batch"
  resources:
    - jobs
  verbs:
    - get
    - list
    - create
    - delete
- apiGroups:
    - "admissionregistration.k8s.io"
  resources:
    - validatingwebhookconfigurations
  verbs:
    - get
    - list
    - create
    - update
    - patch
    - delete    
