-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrbac.yaml
67 lines (66 loc) · 1.38 KB
/
rbac.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#
# admin
#
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: wego-admin-cluster-role
roleRef:
kind: ClusterRole
name: wego-admin-cluster-role # created by default.
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: User
name: [email protected]
apiGroup: rbac.authorization.k8s.io
---
#
# readonly
#
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: wego-readonly-cluster-role
roleRef:
kind: ClusterRole
name: wego-readonly-role
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: User
name: [email protected]
apiGroup: rbac.authorization.k8s.io
---
#
# namespace admin
#
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: wego-admin-apps-rolebinding
namespace: apps
subjects:
- kind: User
name: [email protected]
apiGroup: rbac.authorization.k8s.io
roleRef:
# Use the cluster role to set rules, just bind them in the team-a namespace
kind: ClusterRole
name: wego-admin-cluster-role
apiGroup: rbac.authorization.k8s.io
---
#
# namespace readonly
#
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: wego-ro-apps-rolebinding
namespace: apps
roleRef:
kind: ClusterRole
name: wego-readonly-role
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: User
name: [email protected]
apiGroup: rbac.authorization.k8s.io