Skip to content

Commit 09e13e1

Browse files
committed
[zh-cn]sync role-v1
Signed-off-by: xin.li <[email protected]>
1 parent 2de7dde commit 09e13e1

1 file changed

Lines changed: 59 additions & 42 deletions

File tree

  • content/zh-cn/docs/reference/kubernetes-api/authorization-resources

content/zh-cn/docs/reference/kubernetes-api/authorization-resources/role-v1.md

Lines changed: 59 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -84,55 +84,54 @@ Role 是一个按命名空间划分的 PolicyRule 逻辑分组,可以被 RoleB
8484
*Atomic: will be replaced during a merge*
8585
8686
NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.
87-
-->
88-
87+
-->
8988
- **rules** ([]PolicyRule)
9089

9190
**原子:将在合并期间被替换**
9291

93-
rules 包含了这个 Role 的所有 PolicyRule。
92+
`rules` 包含了这个 Role 的所有 PolicyRule。
9493

9594
<a name="PolicyRule"></a>
9695
**PolicyRule 包含描述一个策略规则的信息,但不包含该规则适用于哪个主体或适用于哪个命名空间的信息。**
9796

9897
- **rules.apiGroups** ([]string)
9998

10099
**原子:将在合并期间被替换**
101-
102-
apiGroups 是包含资源的 apiGroup 的名称。
100+
101+
`apiGroups` 是包含资源的 `apiGroup` 的名称。
103102
如果指定了多个 API 组,则允许对任何 API 组中的其中一个枚举资源来请求任何操作。
104103
"" 表示核心 API 组,“*” 表示所有 API 组。
105-
104+
106105
- **rules.resources** ([]string)
107106

108107
**原子:将在合并期间被替换**
109108

110-
resources 是此规则所适用的资源的列表。
109+
`resources` 是此规则所适用的资源的列表。
111110
*” 表示所有资源。
112111

113112
- **rules.verbs** ([]string),必需
114113

115114
**原子:将在合并期间被替换**
116115

117-
verbs 是适用于此规则中所包含的所有 ResourceKinds 的动作。
116+
`verbs` 是适用于此规则中所包含的所有 ResourceKinds 的动作。
118117
*” 表示所有动作。
119-
118+
120119
- **rules.resourceNames** ([]string)
121120

122121
**原子:将在合并期间被替换**
123-
124-
resourceNames 是此规则所适用的资源名称白名单,可选。
122+
123+
`resourceNames` 是此规则所适用的资源名称白名单,可选。
125124
空集合意味着允许所有资源。
126-
125+
127126
- **rules.nonResourceURLs** ([]string)
128127

129128
**原子:将在合并期间被替换**
130-
131-
nonResourceURLs 是用户应有权访问的一组部分 URL。
129+
130+
`nonResourceURLs` 是用户应有权访问的一组部分 URL。
132131
允许使用 “*”,但仅能作为路径中最后一段且必须用于完整的一段,
133132
因为非资源 URL 没有划分命名空间。
134133
此字段仅适用于从 ClusterRoleBinding 引用的 ClusterRole。
135-
rules 可以应用到 API 资源(如 “pod” 或 “secret”)或非资源 URL 路径(如 “/api”),
134+
`rules` 可以应用到 API 资源(如 “pod” 或 “secret”)或非资源 URL 路径(如 “/api”),
136135
但不能同时应用于两者。
137136

138137
## RoleList {#RoleList}
@@ -162,19 +161,20 @@ RoleList 是 Role 的集合。
162161
标准的对象元数据。
163162

164163
- **items** ([]<a href="{{< ref "../authorization-resources/role-v1#Role" >}}">Role</a>),必需
165-
166-
items 是 Role 的列表。
164+
165+
`items` 是 Role 的列表。
167166

168167
<!--
169168
## Operations {#Operations}
170-
<hr>
171-
### `get` read the specified Role
172-
#### HTTP Request
173169
-->
174170
## 操作 {#Operations}
175171

176172
<hr>
177173

174+
<!--
175+
### `get` read the specified Role
176+
#### HTTP Request
177+
-->
178178
### `get` 读取指定的 Role
179179

180180
#### HTTP 请求
@@ -195,15 +195,15 @@ GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}
195195
#### 参数
196196

197197
- **name****路径参数**):string,必需
198-
198+
199199
Role 的名称
200200

201201
- **namespace****路径参数**):string,必需
202-
202+
203203
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>
204204

205205
- **pretty****查询参数**):string
206-
206+
207207
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
208208

209209
<!--
@@ -247,6 +247,8 @@ GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles
247247
<a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch</a>
248248
- **sendInitialEvents** (*in query*): boolean
249249
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</a>
250+
- **shardSelector** (*in query*): string
251+
<a href="{{< ref "../common-parameters/common-parameters#shardSelector" >}}">shardSelector</a>
250252
- **timeoutSeconds** (*in query*): integer
251253
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a>
252254
- **watch** (*in query*): boolean
@@ -255,51 +257,55 @@ GET /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles
255257
#### 参数
256258

257259
- **namespace****路径参数**):string,必需
258-
260+
259261
<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>
260262

261263
- **allowWatchBookmarks****查询参数**):boolean
262-
264+
263265
<a href="{{< ref "../common-parameters/common-parameters#allowWatchBookmarks" >}}">allowWatchBookmarks</a>
264266

265267
- **continue****查询参数**):string
266-
268+
267269
<a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue</a>
268270

269271
- **fieldSelector****查询参数**):string
270-
272+
271273
<a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector</a>
272274

273275
- **labelSelector****查询参数**):string
274-
276+
275277
<a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector</a>
276278

277279
- **limit****查询参数**):integer
278-
280+
279281
<a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit</a>
280282

281283
- **pretty****查询参数**):string
282-
284+
283285
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
284286

285287
- **resourceVersion****查询参数**):string
286-
288+
287289
<a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion</a>
288290

289291
- **resourceVersionMatch****查询参数**):string
290-
292+
291293
<a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch</a>
292294

293295
- **sendInitialEvents** (**查询参数**): boolean
294296

295297
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</a>
296298

299+
- **shardSelector** (**查询参数**): string
300+
301+
<a href="{{< ref "../common-parameters/common-parameters#shardSelector" >}}">shardSelector</a>
302+
297303
- **timeoutSeconds****查询参数**):integer
298-
304+
299305
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a>
300306

301307
- **watch****查询参数**):boolean
302-
308+
303309
<a href="{{< ref "../common-parameters/common-parameters#watch" >}}">watch</a>
304310

305311
<!--
@@ -341,6 +347,8 @@ GET /apis/rbac.authorization.k8s.io/v1/roles
341347
<a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch</a>
342348
- **sendInitialEvents** (*in query*): boolean
343349
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</a>
350+
- **shardSelector** (*in query*): string
351+
<a href="{{< ref "../common-parameters/common-parameters#shardSelector" >}}">shardSelector</a>
344352
- **timeoutSeconds** (*in query*): integer
345353
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a>
346354
- **watch** (*in query*): boolean
@@ -349,41 +357,45 @@ GET /apis/rbac.authorization.k8s.io/v1/roles
349357
#### 参数
350358

351359
- **allowWatchBookmarks****查询参数**):boolean
352-
360+
353361
<a href="{{< ref "../common-parameters/common-parameters#allowWatchBookmarks" >}}">allowWatchBookmarks</a>
354362

355363
- **continue****查询参数**):string
356-
364+
357365
<a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue</a>
358366

359367
- **fieldSelector****查询参数**):string
360-
368+
361369
<a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector</a>
362370

363371
- **labelSelector****查询参数**):string
364-
372+
365373
<a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector</a>
366374

367375
- **limit****查询参数**):integer
368-
376+
369377
<a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit</a>
370378

371379
- **pretty****查询参数**):string
372-
380+
373381
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
374382

375383
- **resourceVersion****查询参数**):string
376-
384+
377385
<a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion</a>
378386

379387
- **resourceVersionMatch****查询参数**):string
380-
388+
381389
<a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch</a>
382390

383391
- **sendInitialEvents** (**查询参数**): boolean
384392

385393
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</a>
386394

395+
- **shardSelector** (**查询参数**): string
396+
397+
<a href="{{< ref "../common-parameters/common-parameters#shardSelector" >}}">shardSelector</a>
398+
387399
- **timeoutSeconds****查询参数**):integer
388400

389401
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a>
@@ -708,6 +720,8 @@ DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles
708720
<a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch</a>
709721
- **sendInitialEvents** (*in query*): boolean
710722
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</a>
723+
- **shardSelector** (*in query*): string
724+
<a href="{{< ref "../common-parameters/common-parameters#shardSelector" >}}">shardSelector</a>
711725
- **timeoutSeconds** (*in query*): integer
712726
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a>
713727
-->
@@ -767,6 +781,9 @@ DELETE /apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles
767781

768782
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents</a>
769783

784+
- **shardSelector** (**查询参数**): string
785+
786+
<a href="{{< ref "../common-parameters/common-parameters#shardSelector" >}}">shardSelector</a>
770787

771788
- **timeoutSeconds****查询参数**):integer
772789

0 commit comments

Comments
 (0)