apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: encrypted-secrets
rules:
# main functionality
- apiGroups: [""]
  resources: ["secrets"]
  verbs: ["create", "list", "update", "watch"]
- apiGroups: ["k8s.linki.space"]
  resources: ["encryptedsecrets", "managedsecrets"]
  verbs: ["list", "watch"]
# sending events
- apiGroups: [""]
  resources: ["events"]
  verbs: ["create", "patch"]
# leader election
- apiGroups: [""]
  resources: ["pods"]
  verbs: ["get"]
- apiGroups: [""]
  resources: ["services"]
  verbs: ["create"]
- apiGroups: [""]
  resources: ["configmaps"]
  verbs: ["create", "get"]
- apiGroups: ["apps"]
  resources: ["deployments", "replicasets"]
  verbs: ["get"]
