apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: docker-secret-tool
rules:
  - apiGroups:
      - ""
    resources:
      - configmaps
      - secrets
      - pods
      - namespaces
      - services
    verbs:
      - get
      - list
      - watch
      - create
      - update
      - patch
      - delete
  - apiGroups:
      - ""
    resources:
      - configmaps/status
    verbs:
      - list
      - get
      - update
      - patch
  - apiGroups:
      - ""
    resources:
      - events
    verbs:
      - create
      - patch
      - list
  - apiGroups:
      - ""
    resources:
      - pods/exec
    verbs:
      - create
      - get
      - patch
      - update
      - list
  - apiGroups:
      - "apps"
    resources:
      - deployments
      - statefulsets
      - daemonsets
      - replicasets
    verbs:
      - get
      - patch
      - update
      - list
  - apiGroups:
      - "admissionregistration.k8s.io"
    resources:
      - mutatingWebhookconfigurations 
    verbs:
      - get  
      - create
      - update
      - patch
      - delete
      - list
  - apiGroups:
      - coordination.k8s.io
      - admissionregistration.k8s.io
    resources:
      - "*"
    verbs:
      - "*"
  - apiGroups:
      - "certificates.k8s.io" 
    resources:
      - "*"
    verbs:
      - "*"