forked from karmada-io/karmada
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadmin-clusterrole-aggregation.yaml
149 lines (147 loc) · 3.61 KB
/
admin-clusterrole-aggregation.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# This configuration is used to grant the admin clusterrole read
# and write permissions for Karmada resources.
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations:
# refer to https://kubernetes.io/docs/reference/access-authn-authz/rbac/#auto-reconciliation
# and https://kubernetes.io/docs/reference/access-authn-authz/rbac/#kubectl-auth-reconcile
rbac.authorization.kubernetes.io/autoupdate: "true"
labels:
# refer to https://kubernetes.io/docs/reference/access-authn-authz/rbac/#default-roles-and-role-bindings
kubernetes.io/bootstrapping: rbac-defaults
# used to aggregate rules to view clusterrole
rbac.authorization.k8s.io/aggregate-to-view: "true"
name: karmada-view
rules:
- apiGroups:
- "autoscaling.karmada.io"
resources:
- cronfederatedhpas
- cronfederatedhpas/status
- federatedhpas
- federatedhpas/status
verbs:
- get
- list
- watch
- apiGroups:
- "multicluster.x-k8s.io"
resources:
- serviceexports
- serviceexports/status
- serviceimports
- serviceimports/status
verbs:
- get
- list
- watch
- apiGroups:
- "networking.karmada.io"
resources:
- multiclusteringresses
- multiclusteringresses/status
- multiclusterservices
- multiclusterservices/status
verbs:
- get
- list
- watch
- apiGroups:
- "policy.karmada.io"
resources:
- overridepolicies
- propagationpolicies
verbs:
- get
- list
- watch
- apiGroups:
- "work.karmada.io"
resources:
- resourcebindings
- resourcebindings/status
- works
- works/status
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations:
# refer to https://kubernetes.io/docs/reference/access-authn-authz/rbac/#auto-reconciliation
# and https://kubernetes.io/docs/reference/access-authn-authz/rbac/#kubectl-auth-reconcile
rbac.authorization.kubernetes.io/autoupdate: "true"
labels:
# refer to https://kubernetes.io/docs/reference/access-authn-authz/rbac/#default-roles-and-role-bindings
kubernetes.io/bootstrapping: rbac-defaults
# used to aggregate rules to view clusterrole
rbac.authorization.k8s.io/aggregate-to-edit: "true"
name: karmada-edit
rules:
- apiGroups:
- "autoscaling.karmada.io"
resources:
- cronfederatedhpas
- cronfederatedhpas/status
- federatedhpas
- federatedhpas/status
verbs:
- create
- delete
- deletecollection
- patch
- update
- apiGroups:
- "multicluster.x-k8s.io"
resources:
- serviceexports
- serviceexports/status
- serviceimports
- serviceimports/status
verbs:
- create
- delete
- deletecollection
- patch
- update
- apiGroups:
- "networking.karmada.io"
resources:
- multiclusteringresses
- multiclusteringresses/status
- multiclusterservices
- multiclusterservices/status
verbs:
- create
- delete
- deletecollection
- patch
- update
- apiGroups:
- "policy.karmada.io"
resources:
- overridepolicies
- propagationpolicies
verbs:
- create
- delete
- deletecollection
- patch
- update
- apiGroups:
- "work.karmada.io"
resources:
- resourcebindings
- resourcebindings/status
- works
- works/status
verbs:
- create
- delete
- deletecollection
- patch
- update