Skip to content

Commit

Permalink
[zh] Update kubernetes-api/ files
Browse files Browse the repository at this point in the history
  • Loading branch information
windsonsea committed Oct 2, 2023
1 parent 91c23ee commit 5b4e2d4
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 94 deletions.
Expand Up @@ -7,9 +7,7 @@ content_type: "api_reference"
description: "ServiceAccount 将以下内容绑定在一起:1. 用户可以理解的名称,也可能是外围系统理解的身份标识 2. 可以验证和授权的主体 3. 一组 Secret。"
title: "ServiceAccount"
weight: 1
auto_generated: true
---

<!--
api_metadata:
apiVersion: "v1"
Expand All @@ -22,28 +20,17 @@ weight: 1
auto_generated: true
-->

<!--
The file is auto-generated from the Go source code of the component using a generic
[generator](https://github.com/kubernetes-sigs/reference-docs/). To learn how
to generate the reference documentation, please read
[Contributing to the reference documentation](/docs/contribute/generate-ref-docs/).
To update the reference content, please follow the
[Contributing upstream](/docs/contribute/generate-ref-docs/contribute-upstream/)
guide. You can file document formatting bugs against the
[reference-docs](https://github.com/kubernetes-sigs/reference-docs/) project.
-->

`apiVersion: v1`

`import "k8s.io/api/core/v1"`


## ServiceAccount {#ServiceAccount}

<!--
ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets
-->
ServiceAccount 将以下内容绑定在一起:

* 用户可以理解的名称,也可能是外围系统理解的身份标识
* 可以验证和授权的主体
* 一组 Secret
Expand All @@ -52,16 +39,15 @@ ServiceAccount 将以下内容绑定在一起:

- **apiVersion**: v1


- **kind**: ServiceAccount


- **metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a>)

<!--
Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-->
标准对象的元数据,更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
标准对象的元数据,更多信息:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

- **automountServiceAccountToken** (boolean)

Expand All @@ -77,8 +63,8 @@ ServiceAccount 将以下内容绑定在一起:
ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
-->
imagePullSecrets 是对同一命名空间中 Secret 的引用列表,用于拉取引用此 ServiceAccount 的 Pod 中的任何镜像。
imagePullSecrets 与 Secrets 不同,因为 Secrets 可以挂载在 Pod 中,但 imagePullSecrets 只能由 kubelet 访问。
更多信息: https://kubernetes.io/zh-cn/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
imagePullSecrets 与 Secret 不同,因为 Secret 可以挂载在 Pod 中,但 imagePullSecrets 只能由 kubelet 访问。更多信息:
https://kubernetes.io/zh-cn/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod

- **secrets** ([]<a href="{{< ref "../common-definitions/object-reference#ObjectReference" >}}">ObjectReference</a>)

Expand All @@ -94,7 +80,7 @@ ServiceAccount 将以下内容绑定在一起:
-->
**补丁策略:基于键 `name` 合并**

Secrets 是允许使用此 ServiceAccount 运行的 Pod 使用的同一命名空间中的秘密列表。
secrets 是允许使用此 ServiceAccount 运行的 Pod 使用的同一命名空间中的秘密列表。
仅当此服务帐户的 “kubernetes.io/enforce-mountable-secrets” 注释设置为 “true” 时,Pod 才限于此列表。
此字段不应用于查找自动生成的服务帐户令牌机密以在 Pod 之外使用。
相反,可以使用 TokenRequest API 直接请求令牌,或者可以手动创建服务帐户令牌 Secret。
Expand All @@ -111,16 +97,15 @@ ServiceAccountList 是 ServiceAccount 对象的列表

- **apiVersion**: v1


- **kind**: ServiceAccountList


- **metadata** (<a href="{{< ref "../common-definitions/list-meta#ListMeta" >}}">ListMeta</a>)

<!--
Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
-->
标准列表元数据, 更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
标准列表元数据, 更多信息:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

<!--
- **items** ([]<a href="{{< ref "../authentication-resources/service-account-v1#ServiceAccount" >}}">ServiceAccount</a>), required
Expand All @@ -130,7 +115,8 @@ ServiceAccountList 是 ServiceAccount 对象的列表
<!--
List of ServiceAccounts. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
-->
ServiceAccount 列表,更多信息: https://kubernetes.io/zh-cn/docs/tasks/configure-pod-container/configure-service-account/
ServiceAccount 列表,更多信息:
https://kubernetes.io/zh-cn/docs/tasks/configure-pod-container/configure-service-account/

<!--
## Operations {#Operations}
Expand All @@ -157,13 +143,12 @@ GET /api/v1/namespaces/{namespace}/serviceaccounts/{name}

<!--
- **name** (*in path*): string, required
name of the ServiceAccount
-->
- **name** (**路径参数**): string, 必需

<!--
name of the ServiceAccount
-->
ServiceAccount 的名称
ServiceAccount 的名称。

<!--
- **namespace** (*in path*): string, required
Expand Down Expand Up @@ -240,7 +225,6 @@ GET /api/v1/namespaces/{namespace}/serviceaccounts

<a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector</a>


<!--
- **limit** (*in query*): integer
-->
Expand Down Expand Up @@ -337,7 +321,6 @@ GET /api/v1/serviceaccounts

<a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector</a>


<!--
- **labelSelector** (*in query*): string
-->
Expand Down Expand Up @@ -394,7 +377,6 @@ GET /api/v1/serviceaccounts

<a href="{{< ref "../common-parameters/common-parameters#watch" >}}">watch</a>


<!--
#### Response
-->
Expand Down Expand Up @@ -453,15 +435,13 @@ POST /api/v1/namespaces/{namespace}/serviceaccounts

<a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation</a>


<!--
- **pretty** (*in query*): string
-->
- **pretty** (**查询参数**): string

<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>


<!--
#### Response
-->
Expand All @@ -480,7 +460,7 @@ POST /api/v1/namespaces/{namespace}/serviceaccounts
#### HTTP Request
-->
`update` 替换指定的ServiceAccount
### `update` 替换指定的 ServiceAccount

#### HTTP 请求

Expand All @@ -493,11 +473,12 @@ PUT /api/v1/namespaces/{namespace}/serviceaccounts/{name}

<!--
- **name** (*in path*): string, required
-->
- **name** (**路径参数**): string, required
name of the ServiceAccount
-->
- **name** (**路径参数**): string,必需

ServiceAccount 的名称。

<!--
- **namespace** (*in path*): string, required
Expand Down Expand Up @@ -532,7 +513,6 @@ PUT /api/v1/namespaces/{namespace}/serviceaccounts/{name}

<a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation</a>


<!--
- **pretty** (*in query*): string
-->
Expand All @@ -556,7 +536,7 @@ PUT /api/v1/namespaces/{namespace}/serviceaccounts/{name}
#### HTTP Request
-->
`patch` 部分更新指定的 ServiceAccount
### `patch` 部分更新指定的 ServiceAccount

#### HTTP 请求

Expand All @@ -569,13 +549,12 @@ PATCH /api/v1/namespaces/{namespace}/serviceaccounts/{name}

<!--
- **name** (*in path*): string, required
name of the ServiceAccount
-->
- **name** (**路径参数**): string,必需

<!--
name of the ServiceAccount
-->
ServiceAccount 的名称
ServiceAccount 的名称。

<!--
- **namespace** (*in path*): string, required
Expand All @@ -587,7 +566,6 @@ PATCH /api/v1/namespaces/{namespace}/serviceaccounts/{name}

- **body**: <a href="{{< ref "../common-definitions/patch#Patch" >}}">Patch</a>, required


<!--
- **dryRun** (*in query*): string
-->
Expand Down Expand Up @@ -616,21 +594,18 @@ PATCH /api/v1/namespaces/{namespace}/serviceaccounts/{name}

<a href="{{< ref "../common-parameters/common-parameters#force" >}}">force</a>


<!--
- **pretty** (*in query*): string
-->
- **pretty** (**查询参数**): string

<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>


<!--
#### Response
-->
#### 响应


200 (<a href="{{< ref "../authentication-resources/service-account-v1#ServiceAccount" >}}">ServiceAccount</a>): OK

201 (<a href="{{< ref "../authentication-resources/service-account-v1#ServiceAccount" >}}">ServiceAccount</a>): Created
Expand All @@ -643,8 +618,8 @@ PATCH /api/v1/namespaces/{namespace}/serviceaccounts/{name}
#### HTTP Request
-->
### `delete` 删除一个 ServiceAccount
#### HTTP 请求

#### HTTP 请求

DELETE /api/v1/namespaces/{namespace}/serviceaccounts/{name}

Expand All @@ -655,14 +630,12 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts/{name}

<!--
- **name** (*in path*): string, required
-->
- **name** (**路径参数**): string,必需
<!--
name of the ServiceAccount
-->
ServiceAccount 的名称
-->
- **name** (**路径参数**): string,必需

ServiceAccount 的名称。

<!--
- **namespace** (*in path*): string, required
Expand All @@ -671,7 +644,6 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts/{name}

<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>


- **body**: <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions</a>

<!--
Expand All @@ -688,20 +660,17 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts/{name}

<a href="{{< ref "../common-parameters/common-parameters#gracePeriodSeconds" >}}">gracePeriodSeconds</a>


<!--
- **pretty** (*in query*): string
-->
- **pretty** (**查询参数**): string

<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty</a>


- **propagationPolicy** (*in query*): string

<a href="{{< ref "../common-parameters/common-parameters#propagationPolicy" >}}">propagationPolicy</a>


<!--
#### Response
-->
Expand Down Expand Up @@ -736,7 +705,6 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts

<a href="{{< ref "../common-parameters/common-parameters#namespace" >}}">namespace</a>


- **body**: <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions</a>

<!--
Expand All @@ -746,7 +714,6 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts

<a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue</a>


<!--
- **dryRun** (*in query*): string
-->
Expand All @@ -761,7 +728,6 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts

<a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector</a>


<!--
- **gracePeriodSeconds** (*in query*): integer
-->
Expand All @@ -783,7 +749,6 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts

<a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit</a>


<!--
- **pretty** (*in query*): string
-->
Expand Down Expand Up @@ -826,7 +791,6 @@ DELETE /api/v1/namespaces/{namespace}/serviceaccounts

<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds</a>


<!--
#### Response
-->
Expand Down
Expand Up @@ -7,15 +7,3 @@ title: "Other Resources"
weight: 10
auto_generated: true
-->

<!--
The file is auto-generated from the Go source code of the component using a generic
[generator](https://github.com/kubernetes-sigs/reference-docs/). To learn how
to generate the reference documentation, please read
[Contributing to the reference documentation](/docs/contribute/generate-ref-docs/).
To update the reference content, please follow the
[Contributing upstream](/docs/contribute/generate-ref-docs/contribute-upstream/)
guide. You can file document formatting bugs against the
[reference-docs](https://github.com/kubernetes-sigs/reference-docs/) project.
-->

0 comments on commit 5b4e2d4

Please sign in to comment.