kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch20/web-ping/operator/01-wpo-rbac.yaml

49 lines
1.0 KiB
YAML
Raw Permalink Normal View History

apiVersion: v1
kind: ServiceAccount
metadata:
name: web-ping-operator
labels:
kiamol: ch20
automountServiceAccountToken: false
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: web-ping-operator
labels:
kiamol: ch20
rules:
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["list", "create"]
- apiGroups: ["ch20.kiamol.net"]
resources: ["webpingers", "webpingerarchives"]
verbs: ["list", "watch"]
- apiGroups: [""]
resources: ["services", "configmaps"]
verbs: ["list", "create", "delete"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["list", "create", "delete"]
- apiGroups: ["batch"]
resources: ["jobs"]
verbs: ["list", "create", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: web-ping-operator
labels:
kiamol: ch20
subjects:
- kind: ServiceAccount
name: web-ping-operator
namespace: default
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: web-ping-operator