Merge branch 'main' into kubeconfig
This commit is contained in:
@@ -158,6 +158,14 @@ PUT | update
|
||||
PATCH | patch
|
||||
DELETE | delete(针对单个资源)、deletecollection(针对集合)
|
||||
|
||||
{{< caution >}}
|
||||
<!--
|
||||
The `get`, `list` and `watch` verbs can all return the full details of a resource. In terms of the returned data they are equivalent. For example, `list` on `secrets` will still reveal the `data` attributes of any returned resources.
|
||||
-->
|
||||
`get`、`list` 和 `watch` 动作都可以返回一个资源的完整详细信息。就返回的数据而言,它们是等价的。
|
||||
例如,对 `secrets` 使用 `list` 仍然会显示所有已返回资源的 `data` 属性。
|
||||
{{< /caution >}}
|
||||
|
||||
<!--
|
||||
Kubernetes sometimes checks authorization for additional permissions using specialized verbs. For example:
|
||||
|
||||
|
||||
+1736
File diff suppressed because it is too large
Load Diff
@@ -4,13 +4,12 @@ api_metadata:
|
||||
import: "k8s.io/api/networking/v1"
|
||||
kind: "IngressClass"
|
||||
content_type: "api_reference"
|
||||
description: "IngressClass 代表 Ingress 的类, 被 Ingress 的规约引用。"
|
||||
description: "IngressClass 代表 Ingress 的类,被 Ingress 的规约引用。"
|
||||
title: "IngressClass"
|
||||
weight: 5
|
||||
---
|
||||
|
||||
<!--
|
||||
---
|
||||
api_metadata:
|
||||
apiVersion: "networking.k8s.io/v1"
|
||||
import: "k8s.io/api/networking/v1"
|
||||
@@ -20,7 +19,6 @@ description: "IngressClass represents the class of the Ingress, referenced by th
|
||||
title: "IngressClass"
|
||||
weight: 5
|
||||
auto_generated: true
|
||||
---
|
||||
-->
|
||||
|
||||
`apiVersion: networking.k8s.io/v1`
|
||||
@@ -34,8 +32,9 @@ IngressClass represents the class of the Ingress, referenced by the Ingress Spec
|
||||
-->
|
||||
## IngressClass {#IngressClass}
|
||||
|
||||
IngressClass 代表 Ingress 的类, 被 Ingress 的规约引用。
|
||||
`ingressclass.kubernetes.io/is-default-class` 注解可以用来标明一个 IngressClass 应该被视为默认的 Ingress 类。
|
||||
IngressClass 代表 Ingress 的类,被 Ingress 的规约引用。
|
||||
`ingressclass.kubernetes.io/is-default-class`
|
||||
注解可以用来标明一个 IngressClass 应该被视为默认的 Ingress 类。
|
||||
当某个 IngressClass 资源将此注解设置为 true 时,
|
||||
没有指定类的新 Ingress 资源将被分配到此默认类。
|
||||
|
||||
@@ -50,22 +49,23 @@ IngressClass 代表 Ingress 的类, 被 Ingress 的规约引用。
|
||||
<!--
|
||||
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
|
||||
|
||||
- **spec** (<a href="{{< ref "../service-resources/ingress-class-v1#IngressClassSpec" >}}">IngressClassSpec</a>)
|
||||
|
||||
<!--
|
||||
Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
-->
|
||||
spec 是 IngressClass 的期望状态。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
spec 是 IngressClass 的期望状态。更多信息:
|
||||
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
|
||||
|
||||
## IngressClassSpec {#IngressClassSpec}
|
||||
|
||||
<!--
|
||||
IngressClassSpec provides information about the class of an Ingress.
|
||||
-->
|
||||
IngressClassSpec 提供有关 Ingress 类的信息。
|
||||
IngressClassSpec 提供有关 Ingress 类的信息。
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -120,14 +120,16 @@ IngressClassSpec 提供有关 Ingress 类的信息。
|
||||
|
||||
apiGroup 是被引用资源的组。
|
||||
如果未指定 apiGroup,则被指定的 kind 必须在核心 API 组中。
|
||||
对于任何其他第三方类型, APIGroup 是必需的。
|
||||
对于任何其他第三方类型,apiGroup 是必需的。
|
||||
|
||||
- **parameters.namespace** (string)
|
||||
<!--
|
||||
Namespace is the namespace of the resource being referenced. This field is required when scope is set to "Namespace" and must be unset when scope is set to "Cluster".
|
||||
-->
|
||||
|
||||
namespace 是被引用资源的命名空间。当范围被设置为 “namespace” 时,此字段是必需的,当范围被设置为 “Cluster”,此字段必须取消设置。
|
||||
namespace 是被引用资源的命名空间。
|
||||
当范围被设置为 “namespace” 时,此字段是必需的;
|
||||
当范围被设置为 “Cluster” 时,此字段必须不设置。
|
||||
|
||||
- **parameters.scope** (string)
|
||||
<!--
|
||||
@@ -164,7 +166,7 @@ IngressClassList 是 IngressClasses 的集合。
|
||||
-->
|
||||
- **items** ([]<a href="{{< ref "../service-resources/ingress-class-v1#IngressClass" >}}">IngressClass</a>),必需
|
||||
|
||||
items 是 IngressClasses 的列表
|
||||
items 是 IngressClasses 的列表。
|
||||
|
||||
<!--
|
||||
## Operations {#Operations}
|
||||
|
||||
+17
-10
@@ -7,7 +7,6 @@ content_type: "api_reference"
|
||||
description: "ControllerRevision 实现了状态数据的不可变快照。"
|
||||
title: "ControllerRevision"
|
||||
weight: 7
|
||||
auto_generated: false
|
||||
---
|
||||
|
||||
<!--
|
||||
@@ -22,7 +21,6 @@ weight: 7
|
||||
auto_generated: true
|
||||
-->
|
||||
|
||||
|
||||
`apiVersion: apps/v1`
|
||||
|
||||
`import "k8s.io/api/apps/v1"`
|
||||
@@ -71,8 +69,8 @@ API 服务器将无法成功验证所有尝试改变 data 字段的请求。
|
||||
-->
|
||||
- **metadata** (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta</a>)
|
||||
|
||||
标准的对象元数据。
|
||||
更多信息: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
|
||||
|
||||
<!--
|
||||
- **revision** (int64), required
|
||||
@@ -97,7 +95,7 @@ API 服务器将无法成功验证所有尝试改变 data 字段的请求。
|
||||
*RawExtension is used to hold extensions in external versions.
|
||||
-->
|
||||
<a name="RawExtension"></a>
|
||||
*RawExtension 用于以外部版本来保存扩展数据。
|
||||
**RawExtension 用于以外部版本来保存扩展数据。**
|
||||
|
||||
<!--
|
||||
To use this, make a field which has RawExtension as its type in your external, versioned struct, and Object in your internal struct. You also need to register your various plugin types.
|
||||
@@ -112,7 +110,9 @@ API 服务器将无法成功验证所有尝试改变 data 字段的请求。
|
||||
AOption string `json:"aOption"`
|
||||
}
|
||||
-->
|
||||
// 内部包:
|
||||
内部包:
|
||||
|
||||
```go
|
||||
type MyAPIObject struct {
|
||||
runtime.TypeMeta `json:",inline"`
|
||||
MyPlugin runtime.Object `json:"myPlugin"`
|
||||
@@ -120,6 +120,7 @@ API 服务器将无法成功验证所有尝试改变 data 字段的请求。
|
||||
type PluginA struct {
|
||||
AOption string `json:"aOption"`
|
||||
}
|
||||
```
|
||||
|
||||
<!--
|
||||
// External package: type MyAPIObject struct {
|
||||
@@ -129,7 +130,9 @@ API 服务器将无法成功验证所有尝试改变 data 字段的请求。
|
||||
AOption string `json:"aOption"`
|
||||
}
|
||||
-->
|
||||
// 外部包:
|
||||
外部包:
|
||||
|
||||
```go
|
||||
type MyAPIObject struct {
|
||||
runtime.TypeMeta `json:",inline"`
|
||||
MyPlugin runtime.RawExtension `json:"myPlugin"`
|
||||
@@ -137,6 +140,7 @@ API 服务器将无法成功验证所有尝试改变 data 字段的请求。
|
||||
type PluginA struct {
|
||||
AOption string `json:"aOption"`
|
||||
}
|
||||
```
|
||||
|
||||
<!--
|
||||
// On the wire, the JSON will look something like this: {
|
||||
@@ -148,7 +152,8 @@ API 服务器将无法成功验证所有尝试改变 data 字段的请求。
|
||||
},
|
||||
}
|
||||
-->
|
||||
// 在网络上,JSON 看起来像这样:
|
||||
在网络上,JSON 看起来像这样:
|
||||
```json
|
||||
{
|
||||
"kind":"MyAPIObject",
|
||||
"apiVersion":"v1",
|
||||
@@ -157,6 +162,7 @@ API 服务器将无法成功验证所有尝试改变 data 字段的请求。
|
||||
"aOption":"foo",
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
<!--
|
||||
So what happens? Decode first uses json or yaml to unmarshal the serialized data into your external MyAPIObject. That causes the raw JSON to be stored, but not unpacked. The next step is to copy (using pkg/conversion) into the internal struct. The runtime package's DefaultScheme has conversion functions installed which will unpack the JSON stored in RawExtension, turning it into the correct object type, and storing it in the Object. (TODO: In the case where the object is of an unknown type, a runtime.Unknown object will be created and stored.)*
|
||||
@@ -167,7 +173,7 @@ API 服务器将无法成功验证所有尝试改变 data 字段的请求。
|
||||
下一步是复制(使用 pkg/conversion)到内部结构中。
|
||||
runtime 包的 DefaultScheme 安装了转换函数,它将解析存储在 RawExtension 中的 JSON,
|
||||
将其转换为正确的对象类型,并将其存储在 Object 中。
|
||||
(TODO:如果对象是未知类型,将创建并存储一个 `runtime.Unknown`对象。)*
|
||||
(TODO:如果对象是未知类型,将创建并存储一个 `runtime.Unknown`对象。)
|
||||
|
||||
<!--
|
||||
## ControllerRevisionList {#ControllerRevisionList}
|
||||
@@ -199,7 +205,8 @@ ControllerRevisionList 是一个包含 ControllerRevision 对象列表的资源
|
||||
-->
|
||||
- **metadata** (<a href="{{< ref "../common-definitions/list-meta#ListMeta" >}}">ListMeta</a>)
|
||||
|
||||
更多信息: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
|
||||
|
||||
<!--
|
||||
- **items** ([]<a href="{{< ref "../workload-resources/controller-revision-v1#ControllerRevision" >}}">ControllerRevision</a>), required
|
||||
|
||||
@@ -152,12 +152,12 @@ Here's a summary of each level:
|
||||
## API 组
|
||||
|
||||
<!--
|
||||
[API groups](https://git.k8s.io/community/contributors/design-proposals/api-machinery/api-group.md)
|
||||
[API groups](https://git.k8s.io/design-proposals-archive/api-machinery/api-group.md)
|
||||
make it easier to extend the Kubernetes API.
|
||||
The API group is specified in a REST path and in the `apiVersion` field of a
|
||||
serialized object.
|
||||
-->
|
||||
[API 组](https://git.k8s.io/community/contributors/design-proposals/api-machinery/api-group.md)
|
||||
[API 组](https://git.k8s.io/design-proposals-archive/api-machinery/api-group.md)
|
||||
能够简化对 Kubernetes API 的扩展。
|
||||
API 组信息出现在REST 路径中,也出现在序列化对象的 `apiVersion` 字段中。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user