Skip to content

Commit 629f829

Browse files
committed
[zh] fix indentation issues for two API references
1 parent 2444459 commit 629f829

File tree

2 files changed

+64
-37
lines changed

2 files changed

+64
-37
lines changed

content/zh-cn/docs/reference/kubernetes-api/authorization-resources/self-subject-access-review-v1.md

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ weight: 2
2323
`import "k8s.io/api/authorization/v1"`
2424

2525
## SelfSubjectAccessReview {#SelfSubjectAccessReview}
26+
2627
<!--
2728
SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means "in all namespaces". Self is a special case, because users should always be able to check whether they can perform an action
2829
-->
@@ -58,6 +59,7 @@ Self 是一个特殊情况,因为用户应始终能够检查自己是否可以
5859
status 由服务器填写,表示请求是否被允许。
5960

6061
## SelfSubjectAccessReviewSpec {#SelfSubjectAccessReviewSpec}
62+
6163
<!--
6264
SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set
6365
-->
@@ -90,6 +92,7 @@ resourceAuthorizationAttributes 和 nonResourceAuthorizationAttributes 二者必
9092
- **nonResourceAttributes.verb** (string)
9193

9294
verb 是标准的 HTTP 动作。
95+
9396
<!--
9497
- **resourceAttributes** (ResourceAttributes)
9598
ResourceAuthorizationAttributes describes information for a resource access request
@@ -119,35 +122,40 @@ resourceAuthorizationAttributes 和 nonResourceAuthorizationAttributes 二者必
119122

120123
name 是 "get" 正在请求或 "delete" 已删除的资源的名称。
121124
""(空字符串)表示所有资源。
122-
<!--
123-
- **resourceAttributes.namespace** (string)
124-
Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
125125

126-
- **resourceAttributes.resource** (string)
127-
Resource is one of the existing resource types. "*" means all.
128-
-->
126+
<!--
127+
- **resourceAttributes.namespace** (string)
128+
Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
129+
130+
- **resourceAttributes.resource** (string)
131+
Resource is one of the existing resource types. "*" means all.
132+
-->
133+
129134
- **resourceAttributes.namespace** (string)
130135

131136
namespace 是正在请求的操作的命名空间。
132137
目前,无命名空间和所有命名空间之间没有区别。
133138
对于 LocalSubjectAccessReviews,默认为 ""(空字符串)。
134139
对于集群范围的资源,默认为 ""(空字符串)。
135-
对于来自 SubjectAccessReview 或 SelfSubjectAccessReview 的命名空间范围的资源,""(空字符串)表示 "all"(所有资源)。
140+
对于来自 SubjectAccessReview 或 SelfSubjectAccessReview 的命名空间范围的资源,
141+
""(空字符串)表示 "all"(所有资源)。
136142

137143
- **resourceAttributes.resource** (string)
138144

139145
resource 是现有的资源类别之一。
140146
"*" 表示所有资源类别。
141-
<!--
142-
- **resourceAttributes.subresource** (string)
143-
Subresource is one of the existing resource types. "" means none.
144147

145-
- **resourceAttributes.verb** (string)
146-
Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
148+
<!--
149+
- **resourceAttributes.subresource** (string)
150+
Subresource is one of the existing resource types. "" means none.
151+
152+
- **resourceAttributes.verb** (string)
153+
Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
154+
155+
- **resourceAttributes.version** (string)
156+
Version is the API Version of the Resource. "*" means all.
157+
-->
147158

148-
- **resourceAttributes.version** (string)
149-
Version is the API Version of the Resource. "*" means all.
150-
-->
151159
- **resourceAttributes.subresource** (string)
152160

153161
subresource 是现有的资源类型之一。
@@ -162,6 +170,7 @@ resourceAuthorizationAttributes 和 nonResourceAuthorizationAttributes 二者必
162170

163171
version 是资源的 API 版本。
164172
"*" 表示所有版本。
173+
165174
<!--
166175
## Operations {#Operations}
167176
@@ -180,6 +189,7 @@ resourceAuthorizationAttributes 和 nonResourceAuthorizationAttributes 二者必
180189
#### HTTP 请求
181190

182191
POST /apis/authorization.k8s.io/v1/selfsubjectaccessreviews
192+
183193
<!--
184194
#### Parameters
185195
@@ -216,6 +226,7 @@ POST /apis/authorization.k8s.io/v1/selfsubjectaccessreviews
216226
- **pretty** (**查询参数**): string
217227

218228
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>
229+
219230
<!--
220231
#### Response
221232
-->
@@ -228,3 +239,4 @@ POST /apis/authorization.k8s.io/v1/selfsubjectaccessreviews
228239
202 (<a href="{{< ref "../authorization-resources/self-subject-access-review-v1#SelfSubjectAccessReview" >}}">SelfSubjectAccessReview</a>): Accepted
229240

230241
401: Unauthorized
242+

content/zh-cn/docs/reference/kubernetes-api/authorization-resources/subject-access-review-v1.md

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ weight: 4
2424
`import "k8s.io/api/authorization/v1"`
2525

2626
## SubjectAccessReview {#SubjectAccessReview}
27+
2728
<!--
2829
SubjectAccessReview checks whether or not a user or group can perform an action.
2930
-->
@@ -36,16 +37,18 @@ SubjectAccessReview 检查用户或组是否可以执行某操作。
3637
- **kind**: SubjectAccessReview
3738

3839
- **metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a>)
39-
<!--
40+
<!--
4041
Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
42+
-->
43+
标准的列表元数据。更多信息:
44+
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
45+
46+
<!--
4147
- **spec** (<a href="{{< ref "../authorization-resources/subject-access-review-v1#SubjectAccessReviewSpec" >}}">SubjectAccessReviewSpec</a>), required
4248
Spec holds information about the request being evaluated
4349
- **status** (<a href="{{< ref "../authorization-resources/subject-access-review-v1#SubjectAccessReviewStatus" >}}">SubjectAccessReviewStatus</a>)
4450
Status is filled in by the server and indicates whether the request is allowed or not
4551
-->
46-
标准的列表元数据。更多信息:
47-
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
48-
4952
- **spec** (<a href="{{< ref "../authorization-resources/subject-access-review-v1#SubjectAccessReviewSpec" >}}">SubjectAccessReviewSpec</a>),必需
5053

5154
spec 包含有关正在评估的请求的信息。
@@ -55,6 +58,7 @@ SubjectAccessReview 检查用户或组是否可以执行某操作。
5558
status 由服务器填写,表示请求是否被允许。
5659

5760
## SubjectAccessReviewSpec {#SubjectAccessReviewSpec}
61+
5862
<!--
5963
SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set
6064
-->
@@ -77,6 +81,7 @@ resourceAuthorizationAttributes 和 nonResourceAuthorizationAttributes 二者必
7781
- **groups** ([]string)
7882

7983
groups 是你正在测试的组。
84+
8085
<!--
8186
- **nonResourceAttributes** (NonResourceAttributes)
8287
NonResourceAttributes describes information for a non-resource access request
@@ -104,6 +109,7 @@ resourceAuthorizationAttributes 和 nonResourceAuthorizationAttributes 二者必
104109
- **nonResourceAttributes.verb** (string)
105110

106111
verb 是标准的 HTTP 动作。
112+
107113
<!--
108114
- **resourceAttributes** (ResourceAttributes)
109115
ResourceAuthorizationAttributes describes information for a resource access request
@@ -133,16 +139,18 @@ resourceAuthorizationAttributes 和 nonResourceAuthorizationAttributes 二者必
133139

134140
name 是 "get" 正在请求或 "delete" 已删除的资源。
135141
""(空字符串)表示所有资源。
136-
<!--
137-
- **resourceAttributes.namespace** (string)
138-
Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
139142

140-
- **resourceAttributes.resource** (string)
141-
Resource is one of the existing resource types. "*" means all.
143+
<!--
144+
- **resourceAttributes.namespace** (string)
145+
Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces "" (empty) is defaulted for LocalSubjectAccessReviews "" (empty) is empty for cluster-scoped resources "" (empty) means "all" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview
146+
147+
- **resourceAttributes.resource** (string)
148+
Resource is one of the existing resource types. "*" means all.
149+
150+
- **resourceAttributes.subresource** (string)
151+
Subresource is one of the existing resource types. "" means none.
152+
-->
142153

143-
- **resourceAttributes.subresource** (string)
144-
Subresource is one of the existing resource types. "" means none.
145-
-->
146154
- **resourceAttributes.namespace** (string)
147155

148156
namespace 是正在请求的操作的命名空间。
@@ -161,19 +169,15 @@ resourceAuthorizationAttributes 和 nonResourceAuthorizationAttributes 二者必
161169

162170
subresource 是现有的资源类别之一。
163171
"" 表示无子资源。
164-
<!--
165-
- **resourceAttributes.verb** (string)
166-
Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
167172

168-
- **resourceAttributes.version** (string)
169-
Version is the API Version of the Resource. "*" means all.
173+
<!--
174+
- **resourceAttributes.verb** (string)
175+
Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. "*" means all.
170176
171-
- **uid** (string)
172-
UID information about the requesting user.
177+
- **resourceAttributes.version** (string)
178+
Version is the API Version of the Resource. "*" means all.
179+
-->
173180

174-
- **user** (string)
175-
User is the user you're testing for. If you specify "User" but not "Groups", then is it interpreted as "What if User were not a member of any groups
176-
-->
177181
- **resourceAttributes.verb** (string)
178182

179183
verb 是 kubernetes 资源的 API 动作,例如 get、list、watch、create、update、delete、proxy。
@@ -184,6 +188,14 @@ resourceAuthorizationAttributes 和 nonResourceAuthorizationAttributes 二者必
184188
version 是资源的 API 版本。
185189
"*" 表示所有版本。
186190

191+
<!--
192+
- **uid** (string)
193+
UID information about the requesting user.
194+
195+
- **user** (string)
196+
User is the user you're testing for. If you specify "User" but not "Groups", then is it interpreted as "What if User were not a member of any groups
197+
-->
198+
187199
- **uid** (string)
188200

189201
有关正在请求的用户的 UID 信息。
@@ -217,6 +229,7 @@ SubjectAccessReviewStatus
217229
如果拒绝该操作,则为 true,否则为 false。
218230
如果 allowed 和 denied 均为 false,则 Authorizer 对是否鉴权操作没有意见。
219231
如果 allowed 为 true,则 denied 不能为 true。
232+
220233
<!--
221234
- **evaluationError** (string)
222235
EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request.
@@ -234,6 +247,7 @@ SubjectAccessReviewStatus
234247

235248
reason 是可选的。
236249
它表示为什么允许或拒绝请求。
250+
237251
<!--
238252
## Operations {#Operations}
239253
@@ -252,6 +266,7 @@ SubjectAccessReviewStatus
252266
#### HTTP 请求
253267

254268
POST /apis/authorization.k8s.io/v1/subjectaccessreviews
269+
255270
<!--
256271
#### Parameters
257272
- **body**: <a href="{{< ref "../authorization-resources/subject-access-review-v1#SubjectAccessReview" >}}">SubjectAccessReview</a>, required

0 commit comments

Comments
 (0)