From 33bf4fa728d9ff9d927763be3a50ecd8685695c6 Mon Sep 17 00:00:00 2001 From: changzhen Date: Wed, 5 Jun 2024 11:24:09 +0800 Subject: [PATCH] add mutate configuration description for upgrading v1.9-v1.10 Signed-off-by: changzhen --- docs/administrator/upgrading/v1.9-v1.10.md | 67 ++++++++++++++++--- .../administrator/upgrading/v1.9-v1.10.md | 67 ++++++++++++++++--- 2 files changed, 116 insertions(+), 18 deletions(-) diff --git a/docs/administrator/upgrading/v1.9-v1.10.md b/docs/administrator/upgrading/v1.9-v1.10.md index 351eb42c..8b39a0eb 100644 --- a/docs/administrator/upgrading/v1.9-v1.10.md +++ b/docs/administrator/upgrading/v1.9-v1.10.md @@ -15,18 +15,67 @@ Follow the [Regular Upgrading Process](./README.md). ### Deprecation * The following labels have been deprecated from release `v1.8.0` and now have been removed: - * `resourcebinding.karmada.io/uid` - * `clusterresourcebinding.karmada.io/uid` - * `work.karmada.io/uid` - * `propagationpolicy.karmada.io/uid` - * `clusterpropagationpolicy.karmada.io/uid` + * `resourcebinding.karmada.io/uid` + * `clusterresourcebinding.karmada.io/uid` + * `work.karmada.io/uid` + * `propagationpolicy.karmada.io/uid` + * `clusterpropagationpolicy.karmada.io/uid` * The following labels now have been deprecated and removed: - * `resourcebinding.karmada.io/key` replaced by `resourcebinding.karmada.io/permanent-id` - * `clusterresourcebinding.karmada.io/key` replaced by `clusterresourcebinding.karmada.io/permanent-id` - * `work.karmada.io/namespace` replaced by `work.karmada.io/permanent-id` - * `work.karmada.io/name` replaced by `work.karmada.io/permanent-id` + * `resourcebinding.karmada.io/key` replaced by `resourcebinding.karmada.io/permanent-id` + * `clusterresourcebinding.karmada.io/key` replaced by `clusterresourcebinding.karmada.io/permanent-id` + * `work.karmada.io/namespace` replaced by `work.karmada.io/permanent-id` + * `work.karmada.io/name` replaced by `work.karmada.io/permanent-id` * `karmadactl`: The flag `--cluster-zone`, which was deprecated in release 1.7 and replaced by `--cluster-zones`, now has been removed. +### Webhook Configuration + +In v1.10, we move the logic of generating Permanent ID from the karmada-controller-manager component to the Karmada-webhook component, so you need to add mutate configuration for ResourceBinding/ClusterResourceBinding/MultiClusterService type resources in the `mutating-config` MutatingWebhookConfiguration resource object. The specific configuration is as follows: + +```yaml + - name: resourcebinding.karmada.io + rules: + - operations: [ "CREATE" ] + apiGroups: [ "work.karmada.io" ] + apiVersions: [ "*" ] + resources: [ "resourcebindings" ] + scope: "Namespaced" + clientConfig: + url: https://karmada-webhook.karmada-system.svc:443/mutate-resourcebinding + caBundle: {{caBundle}} + failurePolicy: Fail + sideEffects: None + admissionReviewVersions: [ "v1" ] + timeoutSeconds: 3 + - name: clusterresourcebinding.karmada.io + rules: + - operations: [ "CREATE" ] + apiGroups: [ "work.karmada.io" ] + apiVersions: [ "*" ] + resources: [ "clusterresourcebindings" ] + scope: "Cluster" + clientConfig: + url: https://karmada-webhook.karmada-system.svc:443/mutate-clusterresourcebinding + caBundle: {{caBundle}} + failurePolicy: Fail + sideEffects: None + admissionReviewVersions: [ "v1" ] + timeoutSeconds: 3 + - name: multiclusterservice.karmada.io + rules: + - operations: [ "CREATE", "UPDATE" ] + apiGroups: [ "networking.karmada.io" ] + apiVersions: [ "*" ] + resources: [ "multiclusterservices" ] + scope: "Namespaced" + clientConfig: + url: https://karmada-webhook.karmada-system.svc:443/mutate-multiclusterservice + caBundle: {{caBundle}} + failurePolicy: Fail + sideEffects: None + admissionReviewVersions: [ "v1" ] + timeoutSeconds: 3 +``` + ### karmada-search * The feature APIPriorityAndFairness now has moved to GA, thus not allowed to be disabled by feature gates. You have to remove it from the `--feature-gates` flag. diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/administrator/upgrading/v1.9-v1.10.md b/i18n/zh/docusaurus-plugin-content-docs/current/administrator/upgrading/v1.9-v1.10.md index e862b0ab..ffbccd6e 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/administrator/upgrading/v1.9-v1.10.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/administrator/upgrading/v1.9-v1.10.md @@ -15,18 +15,67 @@ title: v1.9 升级到 v1.10 ### 弃用 * 以下 Labels 已从版本 `v1.8.0` 中弃用,现在已被移除: - * `resourcebinding.karmada.io/uid` - * `clusterresourcebinding.karmada.io/uid` - * `work.karmada.io/uid` - * `propagationpolicy.karmada.io/uid` - * `clusterpropagationpolicy.karmada.io/uid` + * `resourcebinding.karmada.io/uid` + * `clusterresourcebinding.karmada.io/uid` + * `work.karmada.io/uid` + * `propagationpolicy.karmada.io/uid` + * `clusterpropagationpolicy.karmada.io/uid` * 以下 Labels 现已弃用并删除: - * `resourcebinding.karmada.io/key` 被替换为 `resourcebinding.karmada.io/permanent-id` - * `clusterresourcebinding.karmada.io/key` 被替换为 `clusterresourcebinding.karmada.io/permanent-id` - * `work.karmada.io/namespace` 被替换为`work.karmada.io/permanent-id` - * `work.karmada.io/name` 被替换为 `work.karmada.io/permanent-id` + * `resourcebinding.karmada.io/key` 被替换为 `resourcebinding.karmada.io/permanent-id` + * `clusterresourcebinding.karmada.io/key` 被替换为 `clusterresourcebinding.karmada.io/permanent-id` + * `work.karmada.io/namespace` 被替换为`work.karmada.io/permanent-id` + * `work.karmada.io/name` 被替换为 `work.karmada.io/permanent-id` * `karmadactl`: 参数“--cluster-zone”在版本 1.7 中已弃用并被“--cluster-zones”取代,现已被删除。 +### Webhook 配置 + +v1.10 版本将生成 Permanent ID 的工作从 karmada-controller-manager 组件中移至了 Karmada-webhook组件,因此您需要在 `mutating-config` MutatingWebhookConfiguration 资源对象中增加对 ResourceBinding/ClusterResourceBinding/MultiClusterService 类型资源的 mutate 操作,具体配置如下: + +```yaml + - name: resourcebinding.karmada.io + rules: + - operations: [ "CREATE" ] + apiGroups: [ "work.karmada.io" ] + apiVersions: [ "*" ] + resources: [ "resourcebindings" ] + scope: "Namespaced" + clientConfig: + url: https://karmada-webhook.karmada-system.svc:443/mutate-resourcebinding + caBundle: {{caBundle}} + failurePolicy: Fail + sideEffects: None + admissionReviewVersions: [ "v1" ] + timeoutSeconds: 3 + - name: clusterresourcebinding.karmada.io + rules: + - operations: [ "CREATE" ] + apiGroups: [ "work.karmada.io" ] + apiVersions: [ "*" ] + resources: [ "clusterresourcebindings" ] + scope: "Cluster" + clientConfig: + url: https://karmada-webhook.karmada-system.svc:443/mutate-clusterresourcebinding + caBundle: {{caBundle}} + failurePolicy: Fail + sideEffects: None + admissionReviewVersions: [ "v1" ] + timeoutSeconds: 3 + - name: multiclusterservice.karmada.io + rules: + - operations: [ "CREATE", "UPDATE" ] + apiGroups: [ "networking.karmada.io" ] + apiVersions: [ "*" ] + resources: [ "multiclusterservices" ] + scope: "Namespaced" + clientConfig: + url: https://karmada-webhook.karmada-system.svc:443/mutate-multiclusterservice + caBundle: {{caBundle}} + failurePolicy: Fail + sideEffects: None + admissionReviewVersions: [ "v1" ] + timeoutSeconds: 3 +``` + ### karmada-search * 功能 APIPriorityAndFairness 已经被移入到 GA,因此现在不允许通过 feature gates禁用此功能. 你需要删除相应的 `--feature-gates` 启动参数。