Skip to content

Commit 3523bd9

Browse files
authored
Merge pull request #26237 from CaoDonghui123/fix-sync1
[zh] sync Misc Batch 1
2 parents 9ade714 + 437c56d commit 3523bd9

File tree

2 files changed

+57
-19
lines changed

2 files changed

+57
-19
lines changed

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

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -519,21 +519,34 @@ CRDs converted from `apiextensions.k8s.io/v1beta1` to
519519
`apiextensions.k8s.io/v1` might lack structural schemas, and
520520
`spec.preserveUnknownFields` might be `true`.
521521

522-
For migrated CustomResourceDefinitions where `spec.preserveUnknownFields` is
523-
set, pruning is _not_ enabled and you can store arbitrary data. For best
524-
compatibility, you should update your custom resources to meet an OpenAPI schema,
525-
and you should set `spec.preserveUnknownFields` true for the
526-
CustomResourceDefinition itself.
522+
For legacy CustomResourceDefinition objects created as
523+
`apiextensions.k8s.io/v1beta1` with `spec.preserveUnknownFields` set to
524+
`true`, the following is also true:
525+
526+
* Pruning is not enabled.
527+
* You can store arbitrary data.
528+
529+
For compatibility with `apiextensions.k8s.io/v1`, update your custom
530+
resource definitions to:
531+
532+
1. Use a structural OpenAPI schema.
533+
2. Set `spec.preserveUnknownFields` to `false`.
527534
-->
528535
{{< note >}}
529536
从 `apiextensions.k8s.io/v1beta1` 转换到 `apiextensions.k8s.io/v1` 的 CRD
530537
可能没有结构化的模式定义,因此其 `spec.preserveUnknownFields` 可能为 `true`。
531538

532-
对于迁移而来的 CustomResourceDefinition,如果其 `spec.preserveUnknownFields`
533-
被设置为 `true`,则 Kubernetes _不会_ 执行剪裁操作,你可以存储任意数据。
534-
要实现最佳的兼容性,你应该更新定制资源以满足某 OpenAPI 模式定义,并且你
535-
应该将 CustomResourceDefinition 自身的 `spec.preserveUnknownFields` 设置为
536-
`true`
539+
对于使用 `apiextensions.k8s.io/v1beta1` 且将 `spec.preserveUnknownFields` 设置为 `true`
540+
创建的旧 CustomResourceDefinition 对象,有以下表现:
541+
542+
* 裁剪未启用。
543+
* 可以存储任意数据。
544+
545+
为了与 `apiextensions.k8s.io/v1` 兼容,将你的自定义资源定义更新为:
546+
547+
1. 使用结构化的 OpenAPI 模式。
548+
2. `spec.preserveUnknownFields` 设置为 `false`。
549+
537550
{{< /note >}}
538551

539552
<!--

content/zh/docs/tasks/extend-kubernetes/setup-konnectivity.md

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,23 @@ by providing the following flags to the kube-apiserver:
4141
--service-account-signing-key-file=/etc/kubernetes/pki/sa.key
4242
--api-audiences=system:konnectivity-server
4343
```
44+
1. Create an egress configuration file such as `admin/konnectivity/egress-selector-configuration.yaml`.
45+
1. Set the `--egress-selector-config-file` flag of the API Server to the path of
46+
your API Server egress configuration file.
47+
1. If you use UDS connection, add volumes config to the kube-apiserver:
48+
```yaml
49+
spec:
50+
containers:
51+
volumeMounts:
52+
- name: konnectivity-uds
53+
mountPath: /etc/kubernetes/konnectivity-server
54+
readOnly: false
55+
volumes:
56+
- name: konnectivity-uds
57+
hostPath:
58+
path: /etc/kubernetes/konnectivity-server
59+
type: DirectoryOrCreate
60+
```
4461
-->
4562
你需要配置 API 服务器来使用 Konnectivity 服务,并将网络流量定向到集群节点:
4663

@@ -55,18 +72,26 @@ by providing the following flags to the kube-apiserver:
5572
--api-audiences=system:konnectivity-server
5673
```
5774

58-
<!--
59-
1. Create an egress configuration file such as `admin/konnectivity/egress-selector-configuration.yaml`.
60-
1. Set the `--egress-selector-config-file` flag of the API Server to the path of
61-
your API Server egress configuration file.
62-
-->
63-
{{< codenew file="admin/konnectivity/egress-selector-configuration.yaml" >}}
64-
2. 创建一个出口配置文件比如 `admin/konnectivity/egress-selector-configuration.yaml`
65-
3. 将 API 服务器的 `--egress-selector-config-file` 参数设置为你的 API 服务器的
75+
1. 创建一个出站流量配置文件,比如 `admin/konnectivity/egress-selector-configuration.yaml`
76+
1. 将 API 服务器的 `--egress-selector-config-file` 参数设置为你的 API 服务器的
6677
离站流量配置文件路径。
78+
1. 如果你在使用 UDS 连接,须将卷配置添加到 kube-apiserver:
79+
```yaml
80+
spec:
81+
containers:
82+
volumeMounts:
83+
- name: konnectivity-uds
84+
mountPath: /etc/kubernetes/konnectivity-server
85+
readOnly: false
86+
volumes:
87+
- name: konnectivity-uds
88+
hostPath:
89+
path: /etc/kubernetes/konnectivity-server
90+
type: DirectoryOrCreate
91+
```
6792
6893
<!--
69-
Generate or obtain a certificate and kubeconfig for konnectivity-server.
94+
Generate or obtain a certificate and kubeconfig for konnectivity-server.
7095
For example, you can use the OpenSSL command line tool to issue a X.509 certificate,
7196
using the cluster CA certificate `/etc/kubernetes/pki/ca.crt` from a control-plane host.
7297
-->

0 commit comments

Comments
 (0)