32 lines
700 B
YAML
32 lines
700 B
YAML
kind: ServiceAccount
|
|
apiVersion: v1
|
|
metadata:
|
|
name: completed-pod-cleanup
|
|
labels:
|
|
app: completed-pod-cleanup
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: cluster-completed-pod-cleanup
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources:
|
|
- "pods"
|
|
verbs: ["get", "list", "create", "delete", "watch"]
|
|
---
|
|
kind: ClusterRoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: completed-pod-cleanup
|
|
labels:
|
|
app: completed-pod-cleanup
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: completed-pod-cleanup
|
|
namespace: clean-completed-pods
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: cluster-completed-pod-cleanup
|