Switch language name 'zh' to 'zh-cn'

This is the first step to rename 'zh' to 'zh-cn'. There are several reasons why we rename the language name.

- The upstream docsy theme changed the language name, leading to many warnings during site build;
  The side-effect is that the i18n strings are no longer working.
- We believe renaming the language is the right thing to do, because this move can make room for other variants of Chinese language, such as 'zh-tw', 'zh-sg' etc.

There would be several follow-ups to this PR, such as fixing the intra-site links, adding redirects etc.

We will lock up changes to zh/zh-cn pages for the moment, until this one gets in.

This PR is based on commit cdad0a7342.
This commit is contained in:
Qiming Teng
2022-06-10 20:25:27 +08:00
parent 3d345b1816
commit c52818c03d
1347 changed files with 8 additions and 6 deletions
@@ -0,0 +1,5 @@
---
title: "公共定义"
weight: 9
---
@@ -0,0 +1,139 @@
---
api_metadata:
apiVersion: ""
import: "k8s.io/apimachinery/pkg/apis/meta/v1"
kind: "DeleteOptions"
content_type: "api_reference"
description: "删除 API 对象时可以提供 DeleteOptions。"
title: "DeleteOptions"
weight: 1
auto_generated: true
---
<!--
api_metadata:
apiVersion: ""
import: "k8s.io/apimachinery/pkg/apis/meta/v1"
kind: "DeleteOptions"
content_type: "api_reference"
description: "DeleteOptions may be provided when deleting an API object."
title: "DeleteOptions"
weight: 1
auto_generated: true
-->
`import "k8s.io/apimachinery/pkg/apis/meta/v1"`
<!--DeleteOptions may be provided when deleting an API object.-->
删除 API 对象时可以提供 DeleteOptions。
<hr>
<!--
- **apiVersion** (string)
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
-->
- **apiVersion** (string)
`APIVersion` 定义对象表示的版本化模式。
服务器应将已识别的模式转换为最新的内部值,并可能拒绝无法识别的值。
更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
<!--
- **dryRun** ([]string)
When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
-->
- **dryRun** ([]string)
该值如果存在,则表示不应保留修改。
无效或无法识别的 `dryRun` 指令将导致错误响应并且不会进一步处理请求。有效值为:
- `All`:处理所有试运行阶段(Dry Run Stages
<!--
- **gracePeriodSeconds** (int64)
The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
-->
- **gracePeriodSeconds** (int64)
表示对象被删除之前的持续时间(以秒为单位)。
值必须是非负整数。零值表示立即删除。如果此值为 `nil`,则将使用指定类型的默认宽限期。如果未指定,则为每个对象的默认值。
<!--
- **kind** (string)
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
-->
- **kind** (string)
`kind` 是一个字符串值,表示此对象代表的 REST 资源。
服务器可以从客户端提交请求的端点推断出此值。此值无法更新,是驼峰的格式。
更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 。
<!--
- **orphanDependents** (boolean)
Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the "orphan" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.
-->
- **orphanDependents** (boolean)
已弃用:该字段将在 1.7 中弃用,请使用 `propagationPolicy` 字段。
该字段表示依赖对象是否应该是孤儿。如果为 true/false,对象的 finalizers 列表中会被添加上或者移除掉 “orphan” 终结器(Finalizer)。
可以设置此字段或者设置 `propagationPolicy` 字段,但不能同时设置以上两个字段。
<!--
- **preconditions** (Preconditions)
Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.
<a name="Preconditions"></a>
*Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.*
- **preconditions.resourceVersion** (string)
Specifies the target ResourceVersion
- **preconditions.uid** (string)
Specifies the target UID.
-->
- **preconditions** (Preconditions)
先决条件必须在执行删除之前完成。如果无法满足这些条件,将返回 409(冲突)状态。
<a name="Preconditions"></a>
*执行操作(更新、删除等)之前必须满足先决条件。*
- **preconditions.resourceVersion** (string)
指定目标资源版本(resourceVersion)。
- **preconditions.uid** (string)
指定目标 UID。
<!--
- **propagationPolicy** (string)
Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground.
-->
- **propagationPolicy** (string)
表示是否以及如何执行垃圾收集。可以设置此字段或 `orphanDependents` 字段,但不能同时设置二者。
默认策略由 `metadata.finalizers` 中现有终结器(Finalizer)集合和特定资源的默认策略决定。
可接受的值为:`Orphan` - 令依赖对象成为孤儿对象;`Background` - 允许垃圾收集器在后台删除依赖项;`Foreground` - 一个级联策略,前台删除所有依赖项。
@@ -0,0 +1,106 @@
---
api_metadata:
apiVersion: ""
import: "k8s.io/apimachinery/pkg/apis/meta/v1"
kind: "LabelSelector"
content_type: "api_reference"
description: "标签选择器是对一组资源的标签查询。"
title: "LabelSelector"
weight: 2
auto_generated: true
---
<!--
api_metadata:
apiVersion: ""
import: "k8s.io/apimachinery/pkg/apis/meta/v1"
kind: "LabelSelector"
content_type: "api_reference"
description: "A label selector is a label query over a set of resources."
title: "LabelSelector"
weight: 2
-->
`import "k8s.io/apimachinery/pkg/apis/meta/v1"`
<!--
A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
-->
标签选择器是对一组资源的标签查询。
`matchLabels``matchExpressions` 的结果按逻辑与的关系组合。
一个 `empty` 标签选择器匹配所有对象。一个 `null` 标签选择器不匹配任何对象。
<hr>
<!--
- **matchExpressions** ([]LabelSelectorRequirement)
matchExpressions is a list of label selector requirements. The requirements are ANDed.
<a name="LabelSelectorRequirement"></a>
*A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.*
-->
- **matchExpressions** ([]LabelSelectorRequirement)
`matchExpressions` 是标签选择器要求的列表,这些要求的结果按逻辑与的关系来计算。
<a name="LabelSelectorRequirement"></a>
*标签选择器要求是包含值、键和关联键和值的运算符的选择器。*
<!--
- **matchExpressions.key** (string), required
*Patch strategy: merge on key `key`*
key is the label key that the selector applies to.
-->
- **matchExpressions.key** (string) 必填
*补丁策略:按照键 `key` 合并*
`key` 是选择器应用的标签键。
<!--
- **matchExpressions.operator** (string), required
operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
-->
- **matchExpressions.operator** (string),必填
`operator` 表示键与一组值的关系。有效的运算符包括 `In``NotIn``Exists``DoesNotExist`
<!--
- **matchExpressions.values** ([]string)
values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
-->
- **matchExpressions.values** ([]string)
`values` 是一个字符串值数组。如果运算符为 `In``NotIn`,则 `values` 数组必须为非空。
如果运算符是 `Exists``DoesNotExist`,则 `values` 数组必须为空。
该数组在策略性合并补丁(Strategic Merge Patch)期间被替换。
<!--
- **matchLabels** (map[string]string)
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
-->
- **matchLabels** (map[string]string)
`matchLabels` 是 {`key`,`value`} 键值对的映射。
`matchLabels` 映射中的单个 {`key`,`value`} 键值对相当于 `matchExpressions` 的一个元素,其键字段为 `key`,运算符为 `In``values` 数组仅包含 `value`
所表达的需求最终要按逻辑与的关系组合。
@@ -0,0 +1,89 @@
---
api_metadata:
apiVersion: ""
import: "k8s.io/apimachinery/pkg/apis/meta/v1"
kind: "ListMeta"
content_type: "api_reference"
description: "ListMeta 描述了合成资源必须具有的元数据,包括列表和各种状态对象。"
title: "ListMeta"
weight: 3
auto_generated: true
---
<!--
api_metadata:
apiVersion: ""
import: "k8s.io/apimachinery/pkg/apis/meta/v1"
kind: "ListMeta"
content_type: "api_reference"
description: "ListMeta describes metadata that synthetic resources must have, including lists and various status objects."
title: "ListMeta"
weight: 3
auto_generated: true
-->
`import "k8s.io/apimachinery/pkg/apis/meta/v1"`
<!--
ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.
-->
`ListMeta` 描述了合成资源必须具有的元数据,包括列表和各种状态对象。
一个资源仅能有 `{ObjectMeta, ListMeta}` 中的一个。
<hr>
<!--
- **continue** (string)
continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.
-->
- **continue** (string)
如果用户对返回的条目数量设置了限制,则 `continue` 可能被设置,表示服务器有更多可用的数据。
该值是不透明的,可用于向提供此列表服务的端点发出另一个请求,以检索下一组可用的对象。
如果服务器配置已更改或时间已过去几分钟,则可能无法继续提供一致的列表。
除非你在错误消息中收到此令牌(token),否则使用此 `continue` 值时返回的 `resourceVersion`
字段应该和第一个响应中的值是相同的。
<!--
- **remainingItemCount** (int64)
remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.
-->
- **remainingItemCount** (int64)
`remainingItemCount` 是列表中未包含在此列表响应中的后续项目的数量。
如果列表请求包含标签或字段选择器,则剩余项目的数量是未知的,并且在序列化期间该字段将保持未设置和省略。
如果列表是完整的(因为它没有分块或者这是最后一个块),那么就没有剩余的项目,并且在序列化过程中该字段将保持未设置和省略。
早于 v1.15 的服务器不设置此字段。`remainingItemCount` 的预期用途是*估计*集合的大小。
客户端不应依赖于设置准确的 `remainingItemCount`
<!--
- **resourceVersion** (string)
String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
-->
- **resourceVersion** (string)
标识该对象的服务器内部版本的字符串,客户端可以用该字段来确定对象何时被更改。
该值对客户端是不透明的,并且应该原样传回给服务器。该值由系统填充,只读。
更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency 。
<!--
Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.
-->
- **selfLink** (string)
selfLink 表示此对象的 URL,由系统填充,只读。
已弃用:selfLink 是一个遗留的只读字段,不再由系统填充。
@@ -0,0 +1,46 @@
---
api_metadata:
apiVersion: ""
import: "k8s.io/api/core/v1"
kind: "LocalObjectReference"
content_type: "api_reference"
description: "LocalObjectReference 包含足够的信息,可以让你在同一命名空间内找到引用的对象。"
title: "LocalObjectReference"
weight: 4
auto_generated: true
---
<!--
api_metadata:
apiVersion: ""
import: "k8s.io/api/core/v1"
kind: "LocalObjectReference"
content_type: "api_reference"
description: "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace."
title: "LocalObjectReference"
weight: 4
auto_generated: true
-->
`import "k8s.io/api/core/v1"`
<!--
LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
-->
LocalObjectReference 包含足够的信息,可以让你在同一命名空间(namespace)内找到引用的对象。
<hr>
<!--
- **name** (string)
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
-->
- **name** (string)
被引用者的名称。
更多信息: https://kubernetes.io/zh/docs/concepts/overview/working-with-objects/names/#names
@@ -0,0 +1,77 @@
---
api_metadata:
apiVersion: ""
import: "k8s.io/api/core/v1"
kind: "NodeSelectorRequirement"
content_type: "api_reference"
description: "节点选择器是要求包含键、值和关联键和值的运算符的选择器"
title: "NodeSelectorRequirement"
weight: 5
auto_generated: true
---
<!--
api_metadata:
apiVersion: ""
import: "k8s.io/api/core/v1"
kind: "NodeSelectorRequirement"
content_type: "api_reference"
description: "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values."
title: "NodeSelectorRequirement"
weight: 5
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"`
<!--
A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
-->
节点选择器是要求包含键、值和关联键和值的运算符的选择器。
<hr>
<!--
- **key** (string), required
The label key that the selector applies to.
-->
- **key** (string), 必选
选择器适用的标签键。
<!--
- **operator** (string), required
Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
-->
- **operator** (string), 必选
表示键与一组值的关系的运算符。有效的运算符包括:In、NotIn、Exists、DoesNotExist、Gt 和 Lt。
<!--
- **values** ([]string)
An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
-->
- **values** ([]string)
字符串数组。如果运算符为 In 或 NotIn,则数组必须为非空。
如果运算符为 Exists 或 DoesNotExist,则数组必须为空。
如果运算符为 Gt 或 Lt,则数组必须有一个元素,该元素将被译为整数。
该数组在合并计划补丁时将被替换。
@@ -0,0 +1,54 @@
---
api_metadata:
apiVersion: ""
import: "k8s.io/api/core/v1"
kind: "ObjectFieldSelector"
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.
-->
`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.
- **apiVersion** (string)
Version of the schema the FieldPath is written in terms of, defaults to "v1".
-->
<hr>
- **fieldPath** (string), 必需的
在指定 API 版本中要选择的字段的路径。
- **apiVersion** (string)
`fieldPath` 写入时所使用的模式版本,默认为 "v1"。
@@ -0,0 +1,401 @@
---
api_metadata:
apiVersion: ""
import: "k8s.io/apimachinery/pkg/apis/meta/v1"
kind: "ObjectMeta"
content_type: "api_reference"
description: "ObjectMeta 是所有持久化资源必须具有的元数据,其中包括用户必须创建的所有对象。"
title: "ObjectMeta"
weight: 7
auto_generated: true
---
<!--
api_metadata:
apiVersion: ""
import: "k8s.io/apimachinery/pkg/apis/meta/v1"
kind: "ObjectMeta"
content_type: "api_reference"
description: "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create."
title: "ObjectMeta"
weight: 7
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"`
<!--
ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
-->
ObjectMeta 是所有持久化资源必须具有的元数据,其中包括用户必须创建的所有对象。
<hr>
- **name** (string)
<!--
Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names
-->
name 在命名空间内必须是唯一的。创建资源时需要,尽管某些资源可能允许客户端请求自动地生成适当的名称。
名称主要用于创建幂等性和配置定义。无法更新。
更多信息: http://kubernetes.io/docs/user-guide/identifiers#names
- **generateName** (string)
<!--
GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.
-->
generateName 是一个可选前缀,由服务器使用,**仅在**未提供 name 字段时生成唯一名称。
如果使用此字段,则返回给客户端的名称将与传递的名称不同。该值还将与唯一的后缀组合。
提供的值与 name 字段具有相同的验证规则,并且可能会根据所需的后缀长度被截断,以使该值在服务器上唯一。
<!--
If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).
Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency
-->
如果指定了此字段并且生成的名称存在,则服务器将不会返回 409 ——相反,它将返回 201 Created 或 500
原因是 ServerTimeout 指示在分配的时间内找不到唯一名称,客户端应重试(可选,在 Retry-After 标头中指定的时间之后)。
仅在未指定 name 时应用。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency
- **namespace** (string)
<!--
Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the "default" namespace, but "default" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.
Must be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces
-->
namespace 定义了一个值空间,其中每个名称必须唯一。空命名空间相当于 “default” 命名空间,但 “default” 是规范表示。
并非所有对象都需要限定在命名空间中——这些对象的此字段的值将为空。
必须是 DNS_LABEL。无法更新。更多信息: http://kubernetes.io/docs/user-guide/namespaces
- **labels** (map[string]string)
<!--
Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels
-->
可用于组织和分类(确定范围和选择)对象的字符串键和值的映射。
可以匹配 ReplicationControllers 和 Service 的选择器。更多信息: http://kubernetes.io/docs/user-guide/labels
- **annotations** (map[string]string)
<!--
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations
-->
annotations 是一个非结构化的键值映射,存储在资源中,可以由外部工具设置以存储和检索任意元数据。
它们不可查询,在修改对象时应保留。更多信息: http://kubernetes.io/docs/user-guide/annotations
<!-- ### System {#System} -->
### 系统字段 {#System}
- **finalizers** ([]string)
<!--
Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.
-->
在从注册表中删除对象之前该字段必须为空。
每个条目都是负责的组件的标识符,各组件将从列表中删除自己对应的条目。
如果对象的 deletionTimestamp 非空,则只能删除此列表中的条目。
终结器可以按任何顺序处理和删除。**没有**按照顺序执行,
因为它引入了终结器卡住的重大风险。finalizers 是一个共享字段,
任何有权限的参与者都可以对其进行重新排序。如果按顺序处理终结器列表,
那么这可能导致列表中第一个负责终结器的组件正在等待列表中靠后负责终结器的组件产生的信号(字段值、外部系统或其他),
从而导致死锁。在没有强制排序的情况下,终结者可以在它们之间自由排序,
并且不容易受到列表中排序更改的影响。
- **managedFields** ([]ManagedFieldsEntry)
<!--
ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like "ci-cd". The set of fields is always in the version that the workflow used when modifying the object.
-->
managedFields 将 workflow-id 和版本映射到由该工作流管理的字段集。
这主要用于内部管理,用户通常不需要设置或理解该字段。
工作流可以是用户名、控制器名或特定应用路径的名称,如 “ci-cd”。
字段集始终存在于修改对象时工作流使用的版本。
<a name="ManagedFieldsEntry"></a>
<!--
*ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.*
-->
ManagedFieldsEntry 是一个 workflow-id,一个 FieldSet,也是该字段集适用的资源的组版本。
- **managedFields.apiVersion** (string)
<!--
APIVersion defines the version of this resource that this field set applies to. The format is "group/version" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.
-->
apiVersion 定义此字段集适用的资源的版本。
格式是 “group/version”,就像顶级 apiVersion 字段一样。
必须跟踪字段集的版本,因为它不能自动转换。
- **managedFields.fieldsType** (string)
<!--
FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: "FieldsV1"
-->
FieldsType 是不同字段格式和版本的鉴别器。
目前只有一个可能的值:“FieldsV1”
- **managedFields.fieldsV1** (FieldsV1)
<!-- FieldsV1 holds the first JSON version format as described in the "FieldsV1" type. -->
FieldsV1 包含类型 “FieldsV1” 中描述的第一个 JSON 版本格式。
<a name="FieldsV1"></a>
<!--
*FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.
Each key is either a '.' representing the field itself, and will always map to an empty set,
or a string representing a sub-field or item. The string will follow one of these four formats:
'f:<name>', where <name> is the name of a field in a struct, or key in a map
'v:<value>', where <value> is the exact json formatted value of a list item
'i:<index>', where <index> is position of a item in a list
'k:<keys>', where <keys> is a map of a list item's key fields to their unique values
If a key maps to an empty Fields value, the field that key represents is part of the set.
The exact format is defined in sigs.k8s.io/structured-merge-diff*
-->
FieldsV1 以 JSON 格式将一组字段存储在像 Trie 这样的数据结构中。
每个键或是 `.` 表示字段本身,并且始终映射到一个空集,
或是一个表示子字段或元素的字符串。该字符串将遵循以下四种格式之一:
1. `f:<name>`,其中 `<name>` 是结构中字段的名称,或映射中的键
2. `v:<value>`,其中 `<value>` 是列表项的精确 json 格式值
3. `i:<index>`,其中 `<index>` 是列表中项目的位置
4. `k:<keys>`,其中 `<keys>` 是列表项的关键字段到其唯一值的映射
如果一个键映射到一个空的 Fields 值,则该键表示的字段是集合的一部分。
确切的格式在 sigs.k8s.io/structured-merge-diff 中定义。
- **managedFields.manager** (string)
<!-- Manager is an identifier of the workflow managing these fields. -->
manager 是管理这些字段的工作流的标识符。
- **managedFields.operation** (string)
<!--
Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.
-->
operation 是导致创建此 managedFields 表项的操作类型。
此字段的仅有合法值是 “Apply” 和 “Update”。
- **managedFields.subresource** (string)
<!--
Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.
-->
subresource 是用于更新该对象的子资源的名称,如果对象是通过主资源更新的,则为空字符串。
该字段的值用于区分管理者,即使他们共享相同的名称。例如,状态更新将不同于使用相同管理者名称的常规更新。
请注意,apiVersion 字段与 subresource 字段无关,它始终对应于主资源的版本。
- **managedFields.time** (Time)
<!--
Time is timestamp of when these fields were set. It should always be empty if Operation is 'Apply'
-->
time 是设置这些字段的时间戳。如果 operation 为 “Apply”,则它应始终为空
<a name="Time"></a>
<!--
*Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.*
-->
time 是 time.Time 的包装类,支持正确地序列化为 YAML 和 JSON。
为 time 包提供的许多工厂方法提供了包装类。
- **ownerReferences** ([]OwnerReference)
<!--
*Patch strategy: merge on key `uid`*
List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.
-->
补丁策略:在键 `uid` 上执行合并操作
此对象所依赖的对象列表。如果列表中的所有对象都已被删除,则该对象将被垃圾回收。
如果此对象由控制器管理,则此列表中的条目将指向此控制器,controller 字段设置为 true。
管理控制器不能超过一个。
<a name="OwnerReference"></a>
<!--
*OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.*
-->
OwnerReference 包含足够可以让你识别拥有对象的信息。
拥有对象必须与依赖对象位于同一命名空间中,或者是集群作用域的,因此没有命名空间字段。
- **ownerReferences.apiVersion** (string)<!-- required -->必选
<!-- API version of the referent. -->
被引用资源的 API 版本。
- **ownerReferences.kind** (string)<!-- required -->必选
<!-- Kind of the referent. 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
- **ownerReferences.name** (string)<!-- required -->必选
<!-- Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names -->
被引用资源的名称。更多信息: http://kubernetes.io/docs/user-guide/identifiers#names
- **ownerReferences.uid** (string)<!-- required -->必选
<!-- UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids -->
被引用资源的 uid。更多信息: http://kubernetes.io/docs/user-guide/identifiers#uids
- **ownerReferences.blockOwnerDeletion** (boolean)
<!--
If true, AND if the owner has the "foregroundDeletion" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs "delete" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.
-->
如果为 true,**并且**如果所有者具有 “foregroundDeletion” 终结器,
则在删除此引用之前,无法从键值存储中删除所有者。
默认为 false。要设置此字段,用户需要所有者的 “delete” 权限,
否则将返回 422 (Unprocessable Entity)。
- **ownerReferences.controller** (boolean)
<!-- If true, this reference points to the managing controller. -->
如果为 true,则此引用指向管理的控制器。
<!-- ### Read-only {#Read-only} -->
### 只读字段 {#Read-only}
- **creationTimestamp** (Time)
<!--
CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.
Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-->
creationTimestamp 是一个时间戳,表示创建此对象时的服务器时间。
不能保证在单独的操作中按发生前的顺序设置。
客户端不得设置此值。它以 RFC3339 形式表示,并采用 UTC。
由系统填充。只读。列表为空。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
<a name="Time"></a>
<!--
*Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.*
-->
time 是 time.Time 的包装类,支持正确地序列化为 YAML 和 JSON。
为 time 包提供的许多工厂方法提供了包装类。
- **deletionGracePeriodSeconds** (int64)
<!--
Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.
-->
此对象从系统中删除之前允许正常终止的秒数。
仅当设置了 deletionTimestamp 时才设置。
只能缩短。只读。
- **deletionTimestamp** (Time)
<!--
DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.
Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-->
deletionTimestamp 是删除此资源的 RFC 3339 日期和时间。
该字段在用户请求优雅删除时由服务器设置,客户端不能直接设置。
一旦 finalizers 列表为空,该资源预计将在此字段中的时间之后被删除
(不再从资源列表中可见,并且无法通过名称访问)。
只要 finalizers 列表包含项目,就阻止删除。一旦设置了 deletionTimestamp
该值可能不会被取消设置或在未来进一步设置,尽管它可能会缩短或在此时间之前可能会删除资源。
例如,用户可能要求在 30 秒内删除一个 Pod。
Kubelet 将通过向 Pod 中的容器发送优雅的终止信号来做出反应。
30 秒后,Kubelet 将向容器发送硬终止信号(SIGKILL),
并在清理后从 API 中删除 Pod。在网络存在分区的情况下,
此对象可能在此时间戳之后仍然存在,直到管理员或自动化进程可以确定资源已完全终止。
如果未设置,则未请求优雅删除该对象。
请求优雅删除时由系统填充。只读。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
<a name="Time"></a>
<!--
*Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.*
-->
“Time 是 time.Time 的包装类,支持正确地序列化为 YAML 和 JSON。
为 time 包提供的许多工厂方法提供了包装类。”
- **generation** (int64)
<!--
A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.
-->
表示期望状态的特定生成的序列号。由系统填充。只读。
- **resourceVersion** (string)
<!--
An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.
Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
-->
一个不透明的值,表示此对象的内部版本,客户端可以使用该值来确定对象是否已被更改。
可用于乐观并发、变更检测以及对资源或资源集的监听操作。
客户端必须将这些值视为不透明的,且未更改地传回服务器。
它们可能仅对特定资源或一组资源有效。
由系统填充。只读。客户端必须将值视为不透明。
更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
- **selfLink** (string)
<!--
SelfLink is a URL representing this object. Populated by the system. Read-only.
DEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release.
-->
selfLink 是表示此对象的 URL。由系统填充。只读。
**已弃用**。Kubernetes 将在 1.20 版本中停止传播该字段,并计划在 1.21 版本中删除该字段。
- **uid** (string)
<!--
UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.
Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids
-->
UID 是该对象在时间和空间上的唯一值。它通常由服务器在成功创建资源时生成,并且不允许使用 PUT 操作更改。
由系统填充。只读。更多信息: http://kubernetes.io/docs/user-guide/identifiers#uids
<!-- ### Ignored {#Ignored} -->
### 忽略字段 {#Ignored}
- **clusterName** (string)
<!--
Deprecated: ClusterName is a legacy field that was always cleared by the system and never used; it will be removed completely in 1.25.
The name in the go struct is changed to help clients detect accidental use.
-->
已弃用:clusterName 是一个总是被系统清除并且从未使用过的遗留字段;它将在 1.25 中完全删除。
go 结构体中的对应字段名称已更改,以帮助客户端检测意外使用。
@@ -0,0 +1,111 @@
---
api_metadata:
apiVersion: ""
import: "k8s.io/api/core/v1"
kind: "ObjectReference"
content_type: "api_reference"
description: "ObjectReference 包含足够的信息,可以让你检查或修改引用的对象。"
title: "ObjectReference"
weight: 8
auto_generated: true
---
<!--
api_metadata:
apiVersion: ""
import: "k8s.io/api/core/v1"
kind: "ObjectReference"
content_type: "api_reference"
description: "ObjectReference contains enough information to let you inspect or modify the referred object."
title: "ObjectReference"
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包含足够的信息,允许你检查或修改引用的对象。
<hr>
<!--
- **apiVersion** (string)
API version of the referent.
- **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 版本。
- **fieldPath** (string)
如果引用的是对象的某个对象是整个对象,则该字符串而不是应包含的 JSON/Go 字段有效访问语句,
例如 `desiredState.manifest.containers[ 2 ]`。例如,如果对象引用针对的是 Pod 中的一个容器,
此字段取值类似于:`spec.containers{name}``name` 指触发的容器的名称),
或者如果没有指定容器名称,`spec.containers[ 2 ]`(此 Pod 中索引为 2 的容器)。
选择这种只是为了有一些定义好的语法来引用对象的部分。
- **kind** (string)
被引用者的类别(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
- **namespace** (string)
被引用对象的名字空间。更多信息: https://kubernetes.io/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
- **uid** (string)
被引用对象的UID。更多信息: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
@@ -0,0 +1,49 @@
---
api_metadata:
apiVersion: ""
import: "k8s.io/apimachinery/pkg/apis/meta/v1"
kind: "Patch"
content_type: "api_reference"
description: "提供 Patch 是为了给 Kubernetes PATCH 请求正文提供一个具体的名称和类型。"
title: "Patch"
weight: 9
auto_generated: true
---
<!--
api_metadata:
apiVersion: ""
import: "k8s.io/apimachinery/pkg/apis/meta/v1"
kind: "Patch"
content_type: "api_reference"
description: "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body."
title: "Patch"
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 是为了给 Kubernetes PATCH 请求正文提供一个具体的名称和类型。
<hr>
@@ -0,0 +1,135 @@
---
api_metadata:
apiVersion: ""
import: "k8s.io/apimachinery/pkg/api/resource"
kind: "Quantity"
content_type: "api_reference"
description: "数量(Quantity)是数字的定点表示。"
title: "Quantity"
weight: 10
auto_generated: true
---
<!--
api_metadata:
apiVersion: ""
import: "k8s.io/apimachinery/pkg/api/resource"
kind: "Quantity"
content_type: "api_reference"
description: "Quantity is a fixed-point representation of a number."
title: "Quantity"
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.
-->
`import "k8s.io/apimachinery/pkg/api/resource"`
<!--
Quantity is a fixed-point representation of a number.
It provides convenient marshaling/unmarshaling in JSON and YAML,
in addition to String() and AsInt64() accessors.
The serialization format is:
-->
数量(Quantity)是数字的定点表示。
除了 String() 和 AsInt64() 的访问接口之外,
它以 JSON 和 YAML形式提供方便的打包和解包方法。
序列化格式如下:
<!--
\<quantity> ::= \<signedNumber>\<suffix>
(Note that \<suffix> may be empty, from the "" case in \<decimalSI>.)
\<digit> ::= 0 | 1 | ... | 9
\<digits> ::= \<digit> | \<digit>\<digits>
\<number> ::= \<digits> | \<digits>.\<digits> | \<digits>. | .\<digits>
\<sign> ::= "+" | "-"
\<signedNumber> ::= \<number> | \<sign>\<number>
\<suffix> ::= \<binarySI> | \<decimalExponent> | \<decimalSI>
\<binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei
(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)
\<decimalSI> ::= m | "" | k | M | G | T | P | E
(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)
\<decimalExponent> ::= "e" \<signedNumber> | "E" \<signedNumber>
-->
```
<quantity> ::= <signedNumber><suffix>
(注意 <suffix> 可能为空,例如 <decimalSI> 的 "" 情形。) </br>
<digit> ::= 0 | 1 | ... | 9 </br>
<digits> ::= <digit> | <digit><digits> </br>
<number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> </br>
<sign> ::= "+" | "-" </br>
<signedNumber> ::= <number> | <sign><number> </br>
<suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> </br>
<binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei
(国际单位制度;查阅: http://physics.nist.gov/cuu/Units/binary.html)</br>
<decimalSI> ::= m | "" | k | M | G | T | P | E
(注意,1024 = 1ki 但 1000 = 1k;我没有选择大写。) </br>
<decimalExponent> ::= "e" <signedNumber> | "E" <signedNumber> </br>
```
<!--
No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.
When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.
-->
无论使用三种指数形式中哪一种,没有数量可以表示大于 2<sup>63</sup>-1 的数,也不可能超过 3 个小数位。
更大或更精确的数字将被截断或向上取整。(例如:0.1m 将向上取整为 1m。)
如果将来我们需要更大或更小的数量,可能会扩展。
当从字符串解析数量时,它将记住它具有的后缀类型,并且在序列化时将再次使用相同类型。
<!--
Before serializing, Quantity will be put in "canonical form".
This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:
a. No precision is lost
b. No fractional digits will be emitted
c. The exponent (or suffix) is as large as possible.
The sign will be omitted unless the number is negative.
-->
在序列化之前,数量将以“规范形式”放置。这意味着指数或者后缀将被向上或向下调整(尾数相应增加或减少),并确保:
1. 没有精度丢失
2. 不会输出小数数字
3. 指数(或后缀)尽可能大。
除非数量是负数,否则将省略正负号。
<!--
Examples:
1.5 will be serialized as "1500m"
1.5Gi will be serialized as "1536Mi"
-->
例如:
- 1.5 将会被序列化成 “1500m”
- 1.5Gi 将会被序列化成 “1536Mi”
<!--
Note that the quantity will NEVER be internally represented by a floating point number.
That is the whole point of this exercise.
Non-canonical values will still parse as long as they are well formed,
but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)
This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.
-->
请注意,数量永远**不会**在内部以浮点数表示。这是本设计的重中之重。
只要它们格式正确,非规范值仍将解析,但将以其规范形式重新输出。(所以应该总是使用规范形式,否则不要执行 diff 比较。)
这种格式旨在使得很难在不撰写某种特殊处理代码的情况下使用这些数字,进而希望实现者也使用定点实现。
<hr>
@@ -0,0 +1,62 @@
---
api_metadata:
apiVersion: ""
import: "k8s.io/api/core/v1"
kind: "ResourceFieldSelector"
content_type: "api_reference"
description: "ResourceFieldSelector 表示容器资源(CPU,内存)及其输出格式。"
title: "ResourceFieldSelector"
weight: 11
auto_generated: true
---
<!--
api_metadata:
apiVersion: ""
import: "k8s.io/api/core/v1"
kind: "ResourceFieldSelector"
content_type: "api_reference"
description: "ResourceFieldSelector represents container resources (cpu, memory) and their output format."
title: "ResourceFieldSelector"
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 表示容器资源(CPU,内存)及其输出格式。
<hr>
- **resource** (string), 必选
<!-- Required: resource to select -->
必选:选择的资源
- **containerName** (string)
<!-- 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”
@@ -0,0 +1,208 @@
---
api_metadata:
apiVersion: ""
import: "k8s.io/apimachinery/pkg/apis/meta/v1"
kind: "Status"
content_type: "api_reference"
description: "状态(Status)是不返回其他对象的调用的返回值。"
title: "Status"
weight: 12
auto_generated: true
---
<!--
api_metadata:
apiVersion: ""
import: "k8s.io/apimachinery/pkg/apis/meta/v1"
kind: "Status"
content_type: "api_reference"
description: "Status is a return value for calls that don't return other objects."
title: "Status"
weight: 12
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"`
<!-- Status is a return value for calls that don't return other objects. -->
状态(Status)是不返回其他对象的调用的返回值。
<hr>
- **apiVersion** (string)
<!--
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
-->
APIVersion 定义对象表示的版本化模式。
服务器应将已识别的模式转换为最新的内部值,并可能拒绝无法识别的值。
更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- **code** (int32)
<!-- Suggested HTTP return code for this status, 0 if not set. -->
此状态的建议 HTTP 返回代码,如果未设置,则为 0。
- **details** (StatusDetails)
<!--
Extended data associated with the reason. Each reason may define its own extended details.
This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.
-->
与原因(Reason)相关的扩展数据。每个原因都可以定义自己的扩展细节。
此字段是可选的,并且不保证返回的数据符合任何模式,除非由原因类型定义。
<a name="StatusDetails"></a>
<!--
*StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response.
The Reason field of a Status object defines what attributes will be set.
Clients must ignore fields that do not match the defined type of each attribute,
and should assume that any attribute may be empty, invalid, or under defined.*
-->
*StatusDetails 是一组附加属性,可以由服务器设置以提供有关响应的附加信息。*
*状态对象的原因字段定义将设置哪些属性。*
*客户端必须忽略与每个属性的定义类型不匹配的字段,并且应该假定任何属性可能为空、无效或未定义。*
- **details.causes** ([]StatusCause)
<!--
The Causes array includes more details associated with the StatusReason failure.
Not all StatusReasons may provide detailed causes.
-->
Causes 数组包含与 StatusReason 故障相关的更多详细信息。
并非所有 StatusReasons 都可以提供详细的原因。
<a name="StatusCause"></a>
<!--
*StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.*
-->
*StatusCause 提供有关 api.Status 失败的更多信息,包括遇到多个错误的情况。*
- **details.causes.field** (string)
<!--
The field of the resource that has caused this error, as named by its JSON serialization.
May include dot and postfix notation for nested attributes. Arrays are zero-indexed.
Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.
-->
导致此错误的资源字段,由其 JSON 序列化命名。
可能包括嵌套属性的点和后缀表示法。数组是从零开始索引的。
由于字段有多个错误,字段可能会在一系列原因中出现多次。可选。
<!--
Examples:
"name" - the field "name" on the current resource
"items[0].name" - the field "name" on the first array entry in "items"
-->
示例:
- “name”:当前资源上的字段 “name”
- “items[0].name”:“items” 中第一个数组条目上的字段 “name”
- **details.causes.message** (string)
<!-- A human-readable description of the cause of the error. This field may be presented as-is to a reader. -->
对错误原因的可读描述。该字段可以按原样呈现给读者。
- **details.causes.reason** (string)
<!-- A machine-readable description of the cause of the error. If this value is empty there is no information available. -->
错误原因的机器可读描述。如果此值为空,则没有可用信息。
- **details.group** (string)
<!-- The group attribute of the resource associated with the status StatusReason. -->
与状态 StatusReason 关联的资源的组属性。
- **details.kind** (string)
<!--
The kind attribute of the resource associated with the status StatusReason.
On some operations may differ from the requested resource Kind.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
-->
与状态 StatusReason 关联的资源的种类属性。
在某些操作上可能与请求的资源种类不同。
更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- **details.name** (string)
<!-- The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). -->
与状态 StatusReason 关联的资源的名称属性(当有一个可以描述的名称时)。
- **details.retryAfterSeconds** (int32)
<!--
If specified, the time in seconds before the operation should be retried.
Some errors may indicate the client must take an alternate action -
for those errors this field may indicate how long to wait before taking the alternate action.
-->
如果指定,则应重试操作前的时间(以秒为单位)。
一些错误可能表明客户端必须采取替代操作——对于这些错误,此字段可能指示在采取替代操作之前等待多长时间。
- **details.uid** (string)
<!--
UID of the resource. (when there is a single resource which can be described).
More info: http://kubernetes.io/docs/user-guide/identifiers#uids
-->
资源的 UID(当有单个可以描述的资源时)。
更多信息: http://kubernetes.io/docs/user-guide/identifiers#uids
- **kind** (string)
<!--
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated. In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
-->
Kind 是一个字符串值,表示此对象表示的 REST 资源。
服务器可以从客户端提交请求的端点推断出这一点。
无法更新。驼峰式规则。
更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- **message** (string)
<!-- A human-readable description of the status of this operation. -->
此操作状态的人类可读描述。
- **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
- **reason** (string)
<!--
A machine-readable description of why this operation is in the "Failure" status.
If this value is empty there is no information available.
A Reason clarifies an HTTP status code but does not override it.
-->
机器可读的说明,说明此操作为何处于“失败”状态。
如果此值为空,则没有可用信息。
Reason 澄清了 HTTP 状态代码,但不会覆盖它。
- **status** (string)
<!--
Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-->
操作状态。“Success”或“Failure” 之一。
更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
@@ -0,0 +1,79 @@
---
api_metadata:
apiVersion: ""
import: "k8s.io/api/core/v1"
kind: "TypedLocalObjectReference"
content_type: "api_reference"
description: "TypedLocalObjectReference 包含足够的信息,可以让你在同一个名称空间中定位指定类型的引用对象。"
title: "TypedLocalObjectReference"
weight: 13
auto_generated: true
---
<!--
---
api_metadata:
apiVersion: ""
import: "k8s.io/api/core/v1"
kind: "TypedLocalObjectReference"
content_type: "api_reference"
description: "TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace."
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
- **name** (string), required
Name is the name of resource being referenced
- **apiGroup** (string)
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 是被引用的资源的类型
- **name** (string), 必需
Name 是被引用的资源的名称
- **apiGroup** (string)
APIGroup 是被引用资源的组。如果不指定 APIGroup,则指定的 Kind 必须在核心 API 组中。对于任何其它第三方类型,都需要 APIGroup。