You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Define a ClusterRole with permissions to automatically approve the agent CSRs when the agentcsrapproving controller is enabled by karmada-controller-manager.
# ClusterRole `system:karmada:agent-rbac-generator` is not used for the connection between the karmada-agent and the control plane,
145
+
# but is used by karmadactl register to generate the RBAC resources required by the karmada-agent.
99
146
apiVersion: rbac.authorization.k8s.io/v1
100
147
kind: ClusterRole
101
148
metadata:
102
149
labels:
103
150
karmada.io/bootstrapping: rbac-defaults
104
-
name: system:karmada:agent
151
+
name: system:karmada:agent-rbac-generator
105
152
rules:
106
-
- apiGroups:
107
-
- cluster.karmada.io
108
-
resources:
109
-
- clusters
110
-
verbs:
111
-
- create
112
-
- get
113
-
- list
114
-
- watch
115
-
- delete
116
-
- apiGroups:
117
-
- cluster.karmada.io
118
-
resources:
119
-
- clusters/status
120
-
verbs:
121
-
- update
122
-
- apiGroups:
123
-
- work.karmada.io
124
-
resources:
125
-
- works
126
-
verbs:
127
-
- create
128
-
- get
129
-
- list
130
-
- watch
131
-
- update
132
-
- delete
133
-
- apiGroups:
134
-
- work.karmada.io
135
-
resources:
136
-
- works/status
137
-
verbs:
138
-
- patch
139
-
- update
140
-
- apiGroups:
141
-
- config.karmada.io
142
-
resources:
143
-
- resourceinterpreterwebhookconfigurations
144
-
- resourceinterpretercustomizations
145
-
verbs:
146
-
- get
147
-
- list
148
-
- watch
149
-
- apiGroups:
150
-
- ""
151
-
resources:
152
-
- namespaces
153
-
verbs:
154
-
- get
155
-
- apiGroups:
156
-
- ""
157
-
resources:
158
-
- secrets
159
-
verbs:
160
-
- get
161
-
- create
162
-
- patch
163
-
- apiGroups:
164
-
- coordination.k8s.io
165
-
resources:
166
-
- leases
167
-
verbs:
168
-
- create
169
-
- get
170
-
- update
171
-
- apiGroups:
172
-
- certificates.k8s.io
173
-
resources:
174
-
- certificatesigningrequests
175
-
verbs:
176
-
- create
177
-
- get
178
-
- apiGroups:
179
-
- ""
180
-
resources:
181
-
- events
182
-
verbs:
183
-
- create
184
-
- patch
185
-
- update
153
+
- apiGroups: ['*']
154
+
resources: ['*']
155
+
verbs: ['*']
186
156
187
157
---
158
+
# User `system:karmada:agent:rbac-generator` is specifically used during the `karmadactl register` process to generate restricted RBAC resources for the `karmada-agent`.
188
159
apiVersion: rbac.authorization.k8s.io/v1
189
160
kind: ClusterRoleBinding
190
161
metadata:
191
162
labels:
192
163
karmada.io/bootstrapping: rbac-defaults
193
-
name: system:karmada:agent
164
+
name: system:karmada:agent-rbac-generator
194
165
roleRef:
195
166
apiGroup: rbac.authorization.k8s.io
196
167
kind: ClusterRole
197
-
name: system:karmada:agent
168
+
name: system:karmada:agent-rbac-generator
198
169
subjects:
199
-
- apiGroup: rbac.authorization.k8s.io
200
-
kind: Group
201
-
name: system:nodes
202
-
203
-
# To ensure the agent has the minimal RBAC permissions, the ideal approach is to
204
-
# use different RBAC configurations for different agents of member clusters with pull mode.
205
-
# Below is the minimal set of RBAC permissions required for a single pull mode member cluster.
206
-
# Here are the definitions of the variables used:
207
-
#
208
-
# - clustername: the name of the member cluster.
209
-
# - cluster_namespace: the namespace where the member cluster secrets are stored, default to karmada-cluster.
0 commit comments