forked from AhmadRafiee/Kubernetes_training_with_DockerMe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrbac-default.yaml
34 lines (34 loc) · 868 Bytes
/
rbac-default.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
apiVersion: v1
kind: ServiceAccount
metadata:
name: serviceaccount-jenkins
namespace: ci-testbed
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: clusterrole-jenkins
rules:
- apiGroups: [""] # "" indicates the core API group
resources: ["configmaps"]
verbs: ["get", "list", "watch", "patch"]
- apiGroups: [""] # "" indicates the core API group
resources: ["pods"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["pods/exec"]
verbs: ["get", "create"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: service-account-jenkins
subjects:
- kind: ServiceAccount
name: serviceaccount-jenkins
namespace: ci-testbed
roleRef:
kind: ClusterRole
name: clusterrole-jenkins
apiGroup: rbac.authorization.k8s.io