Skip to content

Commit

Permalink
Merge pull request #43653 from windsonsea/comdef
Browse files Browse the repository at this point in the history
[zh] Clean up kubernetes-api/common-definitions/ files
  • Loading branch information
k8s-ci-robot committed Oct 23, 2023
2 parents cdb1e28 + ed70f0d commit ab1a4a4
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 142 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,29 @@ content_type: "api_reference"
description: "ObjectFieldSelector 选择对象的 APIVersioned 字段。"
title: "ObjectFieldSelector"
weight: 6
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.
api_metadata:
apiVersion: ""
import: "k8s.io/api/core/v1"
kind: "ObjectFieldSelector"
content_type: "api_reference"
description: "ObjectFieldSelector selects an APIVersioned field of an object."
title: "ObjectFieldSelector"
weight: 6
auto_generated: true
-->



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

<!--
ObjectFieldSelector selects an APIVersioned field of an object.
-->
ObjectFieldSelector 选择对象的 APIVersioned 字段。
<!--

<hr>

<!--
- **fieldPath** (string), required
Path of the field to select in the specified API version.
Expand All @@ -40,15 +38,10 @@ ObjectFieldSelector 选择对象的 APIVersioned 字段。
Version of the schema the FieldPath is written in terms of, defaults to "v1".
-->
<hr>


- **fieldPath** (string),必需的
- **fieldPath** (string),必需

在指定 API 版本中要选择的字段的路径。

- **apiVersion** (string)

`fieldPath` 写入时所使用的模式版本,默认为 "v1"。


Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ content_type: "api_reference"
description: "ObjectReference 包含足够的信息,可以让你检查或修改引用的对象。"
title: "ObjectReference"
weight: 8
auto_generated: true
---
<!--
api_metadata:
Expand All @@ -21,32 +20,15 @@ weight: 8
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.
-->



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

<!--
ObjectReference contains enough information to let you inspect or modify the referred object.
<hr>
-->

ObjectReference包含足够的信息,允许你检查或修改引用的对象。
ObjectReference 包含足够的信息,允许你检查或修改引用的对象。

<hr>


<!--
- **apiVersion** (string)
Expand All @@ -55,28 +37,7 @@ ObjectReference包含足够的信息,允许你检查或修改引用的对象
- **fieldPath** (string)
If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.
- **kind** (string)
Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- **name** (string)
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- **namespace** (string)
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
- **resourceVersion** (string)
Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
- **uid** (string)
UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
-->

- **apiVersion** (string)

被引用者的 API 版本。
Expand All @@ -89,23 +50,49 @@ ObjectReference包含足够的信息,允许你检查或修改引用的对象
或者如果没有指定容器名称,`spec.containers[ 2 ]`(此 Pod 中索引为 2 的容器)。
选择这种只是为了有一些定义好的语法来引用对象的部分。

<!--
- **kind** (string)
Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- **name** (string)
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
- **namespace** (string)
Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
-->
- **kind** (string)

被引用者的类别(kind)。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
被引用者的类别(kind)。更多信息:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

- **name** (string)

被引用对象的名称。更多信息: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
被引用对象的名称。更多信息:
https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/names/#names

- **namespace** (string)

被引用对象的名字空间。更多信息: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
被引用对象的名字空间。更多信息:
https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/namespaces/

<!--
- **resourceVersion** (string)
被引用对象的特定资源版本(如果有)。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
- **uid** (string)
被引用对象的UID。更多信息: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
-->
- **resourceVersion** (string)

被引用对象的特定资源版本(如果有)。更多信息:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency

- **uid** (string)

被引用对象的 UID。更多信息:
https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/names/#uids
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ content_type: "api_reference"
description: "提供 Patch 是为了给 Kubernetes PATCH 请求正文提供一个具体的名称和类型。"
title: "Patch"
weight: 9
auto_generated: true
---

<!--
api_metadata:
apiVersion: ""
Expand All @@ -22,28 +20,11 @@ weight: 9
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.
-->



`import "k8s.io/apimachinery/pkg/apis/meta/v1"`


<!-- Patch is provided to give a concrete name and type to the Kubernetes PATCH request body. -->
<!--
Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.
-->
提供 Patch 是为了给 Kubernetes PATCH 请求正文提供一个具体的名称和类型。

<hr>





Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ content_type: "api_reference"
description: "ResourceFieldSelector 表示容器资源(CPU,内存)及其输出格式。"
title: "ResourceFieldSelector"
weight: 11
auto_generated: true
---

<!--
api_metadata:
apiVersion: ""
Expand All @@ -22,41 +20,32 @@ weight: 11
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.
-->



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


<!-- ResourceFieldSelector represents container resources (cpu, memory) and their output format -->
<!--
ResourceFieldSelector represents container resources (cpu, memory) and their output format
-->
ResourceFieldSelector 表示容器资源(CPU,内存)及其输出格式。

<hr>

- **resource** (string),必选
- **resource** (string),必需

<!-- Required: resource to select -->
必选:选择的资源
<!--
Required: resource to select
-->
必需:选择的资源。

- **containerName** (string)

<!-- Container name: required for volumes, optional for env vars -->
容器名称:对卷必选,对环境变量可选
<!--
Container name: required for volumes, optional for env vars
-->
容器名称:对卷必需,对环境变量可选。

- **divisor** (<a href="{{< ref "../common-definitions/quantity#Quantity" >}}">Quantity</a>)

<!-- Specifies the output format of the exposed resources, defaults to "1" -->
指定所曝光资源的输出格式,默认值为“1”



<!--
Specifies the output format of the exposed resources, defaults to "1"
-->
指定所公开的资源的输出格式,默认值为 “1”。
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ content_type: "api_reference"
description: "TypedLocalObjectReference 包含足够的信息,可以让你在同一个名称空间中定位指定类型的引用对象。"
title: "TypedLocalObjectReference"
weight: 13
auto_generated: true
---
<!--
---
api_metadata:
apiVersion: ""
import: "k8s.io/api/core/v1"
Expand All @@ -20,32 +18,18 @@ description: "TypedLocalObjectReference contains enough information to let you l
title: "TypedLocalObjectReference"
weight: 13
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.
-->



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

<!--
TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.
-->

TypedLocalObjectReference 包含足够的信息,可以让你在同一个名称空间中定位特定类型的引用对象。
<!--

<hr>

<!--
- **kind** (string), required
Kind is the type of resource being referenced
Expand All @@ -58,22 +42,15 @@ TypedLocalObjectReference 包含足够的信息,可以让你在同一个名称
APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required.
-->

<hr>

- **kind** (string),必需

Kind 是被引用的资源的类型
kind 是被引用的资源的类型

- **name** (string),必需

Name 是被引用的资源的名称
name 是被引用的资源的名称

- **apiGroup** (string)

APIGroup 是被引用资源的组。如果不指定 APIGroup,则指定的 Kind 必须在核心 API 组中。对于任何其它第三方类型,都需要 APIGroup。





apiGroup 是被引用资源的组。如果不指定 apiGroup,则指定的 kind 必须在核心 API 组中。
对于任何其它第三方类型,都需要 apiGroup。

0 comments on commit ab1a4a4

Please sign in to comment.