Skip to content

Commit 20d81cb

Browse files
authored
Merge pull request #47212 from windsonsea/crdsy
[zh] Sync a task: custom-resource-definitions.md
2 parents f1ddfd7 + 6a9fc11 commit 20d81cb

File tree

1 file changed

+72
-72
lines changed

1 file changed

+72
-72
lines changed

content/zh-cn/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions.md

Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ Kubernetes {{< skew currentVersion >}} 下实现的验证逐步升级不支持
11921192

11931193
<!--
11941194
- `x-kubernetes-validations`
1195-
For Kubernetes 1.28, CRD validation rules](#validation-rules) are ignored by
1195+
For Kubernetes 1.28, CRD [validation rules](#validation-rules) are ignored by
11961196
ratcheting. Starting with Alpha 2 in Kubernetes 1.29, `x-kubernetes-validations`
11971197
are ratcheted only if they do not refer to `oldSelf`.
11981198

@@ -2630,6 +2630,77 @@ The `NAME` column is implicit and does not need to be defined in the CustomResou
26302630
`NAME` 列是隐含的,不需要在 CustomResourceDefinition 中定义。
26312631
{{< /note >}}
26322632
2633+
<!--
2634+
#### Priority
2635+
2636+
Each column includes a `priority` field. Currently, the priority
2637+
differentiates between columns shown in standard view or wide view (using the `-o wide` flag).
2638+
2639+
- Columns with priority `0` are shown in standard view.
2640+
- Columns with priority greater than `0` are shown only in wide view.
2641+
-->
2642+
#### 优先级 {#priority}
2643+
2644+
每个列都包含一个 `priority`(优先级)字段。当前,优先级用来区分标准视图(Standard
2645+
View)和宽视图(Wide View)(使用 `-o wide` 标志)中显示的列:
2646+
2647+
- 优先级为 `0` 的列会在标准视图中显示。
2648+
- 优先级大于 `0` 的列只会在宽视图中显示。
2649+
2650+
<!--
2651+
#### Type
2652+
2653+
A column's `type` field can be any of the following (compare
2654+
[OpenAPI v3 data types](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#dataTypes)):
2655+
2656+
- `integer` – non-floating-point numbers
2657+
- `number` – floating point numbers
2658+
- `string` – strings
2659+
- `boolean` – `true` or `false`
2660+
- `date` – rendered differentially as time since this timestamp.
2661+
-->
2662+
#### 类型 {#type}
2663+
2664+
列的 `type` 字段可以是以下值之一
2665+
(比较 [OpenAPI v3 数据类型](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#dataTypes)):
2666+
2667+
- `integer` – 非浮点数字
2668+
- `number` – 浮点数字
2669+
- `string` – 字符串
2670+
- `boolean` – `true` 或 `false`
2671+
- `date` – 显示为以自此时间戳以来经过的时长
2672+
2673+
<!--
2674+
If the value inside a CustomResource does not match the type specified for the column,
2675+
the value is omitted. Use CustomResource validation to ensure that the value
2676+
types are correct.
2677+
-->
2678+
如果 CustomResource 中的值与列中指定的类型不匹配,该值会被忽略。
2679+
你可以通过 CustomResource 的合法性检查来确保取值类型是正确的。
2680+
2681+
<!--
2682+
#### Format
2683+
2684+
A column's `format` field can be any of the following:
2685+
-->
2686+
#### 格式 {#format}
2687+
2688+
列的 `format` 字段可以是以下值之一:
2689+
2690+
- `int32`
2691+
- `int64`
2692+
- `float`
2693+
- `double`
2694+
- `byte`
2695+
- `date`
2696+
- `date-time`
2697+
- `password`
2698+
2699+
<!--
2700+
The column's `format` controls the style used when `kubectl` prints the value.
2701+
-->
2702+
列的 `format` 字段控制 `kubectl` 打印对应取值时采用的风格。
2703+
26332704
<!--
26342705
### Field selectors
26352706
@@ -2772,77 +2843,6 @@ NAME COLOR SIZE
27722843
example2 blue M
27732844
```
27742845

2775-
<!--
2776-
#### Priority
2777-
2778-
Each column includes a `priority` field. Currently, the priority
2779-
differentiates between columns shown in standard view or wide view (using the `-o wide` flag).
2780-
2781-
- Columns with priority `0` are shown in standard view.
2782-
- Columns with priority greater than `0` are shown only in wide view.
2783-
-->
2784-
#### 优先级 {#priority}
2785-
2786-
每个列都包含一个 `priority`(优先级)字段。当前,优先级用来区分标准视图(Standard
2787-
View)和宽视图(Wide View)(使用 `-o wide` 标志)中显示的列:
2788-
2789-
- 优先级为 `0` 的列会在标准视图中显示。
2790-
- 优先级大于 `0` 的列只会在宽视图中显示。
2791-
2792-
<!--
2793-
#### Type
2794-
2795-
A column's `type` field can be any of the following (compare
2796-
[OpenAPI v3 data types](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#dataTypes)):
2797-
2798-
- `integer` – non-floating-point numbers
2799-
- `number` – floating point numbers
2800-
- `string` – strings
2801-
- `boolean` – `true` or `false`
2802-
- `date` – rendered differentially as time since this timestamp.
2803-
-->
2804-
#### 类型 {#type}
2805-
2806-
列的 `type` 字段可以是以下值之一
2807-
(比较 [OpenAPI v3 数据类型](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#dataTypes)):
2808-
2809-
- `integer` – 非浮点数字
2810-
- `number` – 浮点数字
2811-
- `string` – 字符串
2812-
- `boolean``true``false`
2813-
- `date` – 显示为以自此时间戳以来经过的时长
2814-
2815-
<!--
2816-
If the value inside a CustomResource does not match the type specified for the column,
2817-
the value is omitted. Use CustomResource validation to ensure that the value
2818-
types are correct.
2819-
-->
2820-
如果定制资源中的值与列中指定的类型不匹配,该值会被忽略。
2821-
你可以通过定制资源的合法性检查来确保取值类型是正确的。
2822-
2823-
<!--
2824-
#### Format
2825-
2826-
A column's `format` field can be any of the following:
2827-
-->
2828-
#### 格式 {#format}
2829-
2830-
列的 `format` 字段可以是以下值之一:
2831-
2832-
- `int32`
2833-
- `int64`
2834-
- `float`
2835-
- `double`
2836-
- `byte`
2837-
- `date`
2838-
- `date-time`
2839-
- `password`
2840-
2841-
<!--
2842-
The column's `format` controls the style used when `kubectl` prints the value.
2843-
-->
2844-
列的 `format` 字段控制 `kubectl` 打印对应取值时采用的风格。
2845-
28462846
<!--
28472847
### Subresources
28482848

0 commit comments

Comments
 (0)