apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: minio-operator-role
rules:
  - apiGroups:
      - "apiextensions.k8s.io"
    resources:
      - customresourcedefinitions
    verbs:
      - get
      - update
  - apiGroups:
      - ""
    resources:
      - persistentvolumeclaims
    verbs:
      - get
      - update
      - list
  - apiGroups:
      - ""
    resources:
      - namespaces
    verbs:
      - get
      - watch
      - list
  - apiGroups:
      - ""
    resources:
      - pods
      - services
      - events
      - configmaps
    verbs:
      - get
      - watch
      - patch
      - create
      - list
      - delete
      - deletecollection
      - update
  - apiGroups:
      - ""
    resources:
      - secrets
    verbs:
      - get
      - watch
      - create
      - update
      - list
      - delete
      - deletecollection
  - apiGroups:
      - apps
    resources:
      - statefulsets
      - deployments
    verbs:
      - get
      - create
      - list
      - patch
      - watch
      - update
      - delete
  - apiGroups:
      - batch
    resources:
      - jobs
    verbs:
      - get
      - create
      - list
      - patch
      - watch
      - update
      - delete
  - apiGroups:
      - "certificates.k8s.io"
    resources:
      - "certificatesigningrequests"
      - "certificatesigningrequests/approval"
      - "certificatesigningrequests/status"
    verbs:
      - update
      - create
      - get
      - delete
  - apiGroups:
      - certificates.k8s.io
    resourceNames:
      - kubernetes.io/legacy-unknown
      - kubernetes.io/kube-apiserver-client
      - kubernetes.io/kubelet-serving
    resources:
      - signers
    verbs:
      - approve
      - sign
  - apiGroups:
      - minio.min.io
    resources:
      - "*"
    verbs:
      - "*"
  - apiGroups:
      - min.io
    resources:
      - "*"
    verbs:
      - "*"
  - apiGroups:
      - monitoring.coreos.com
    resources:
      - servicemonitors
    verbs:
      - get
      - create
      - list
  - apiGroups:
      - "coordination.k8s.io"
    resources:
      - leases
    verbs:
      - get
      - update
      - create