# services/maintenance/node-ops/pod-cleaner-rbac.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: pod-cleaner
  namespace: maintenance

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: pod-cleaner
rules:
  - apiGroups: [""]
    resources: ["pods"]
    verbs: ["get", "list", "delete"]

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: pod-cleaner
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: pod-cleaner
subjects:
  - kind: ServiceAccount
    name: pod-cleaner
    namespace: maintenance
