From 2e52a56a8231aaaff2e48924f9dd5d2a9433c475 Mon Sep 17 00:00:00 2001 From: xingran Date: Mon, 4 Mar 2024 20:22:33 +0800 Subject: [PATCH] chore: mark switchover scriptSpec selector field deprecated (#6733) --- apis/apps/v1alpha1/clusterdefinition_types.go | 1 + apis/apps/v1alpha1/componentdefinition_types.go | 1 + docs/developer_docs/api-reference/cluster.md | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apis/apps/v1alpha1/clusterdefinition_types.go b/apis/apps/v1alpha1/clusterdefinition_types.go index 5d6481da296..4a6dc1a523a 100644 --- a/apis/apps/v1alpha1/clusterdefinition_types.go +++ b/apis/apps/v1alpha1/clusterdefinition_types.go @@ -1012,6 +1012,7 @@ type SwitchoverAction struct { // Used to select the script that need to be referenced. // When defined, the scripts defined in scriptSpecs can be referenced within the SwitchoverAction.CmdExecutorConfig. // + // +kubebuilder:deprecatedversion:warning="This field is deprecated from KB 0.9.0" // +optional ScriptSpecSelectors []ScriptSpecSelector `json:"scriptSpecSelectors,omitempty"` } diff --git a/apis/apps/v1alpha1/componentdefinition_types.go b/apis/apps/v1alpha1/componentdefinition_types.go index bf5bc45618f..a3909a8d518 100644 --- a/apis/apps/v1alpha1/componentdefinition_types.go +++ b/apis/apps/v1alpha1/componentdefinition_types.go @@ -809,6 +809,7 @@ type ComponentSwitchover struct { // Used to define the selectors for the scriptSpecs that need to be referenced. // When this field is defined, the scripts specified in the scripts field can be referenced in the Action. // + // +kubebuilder:deprecatedversion:warning="This field is deprecated from KB 0.9.0" // +optional ScriptSpecSelectors []ScriptSpecSelector `json:"scriptSpecSelectors,omitempty"` } diff --git a/docs/developer_docs/api-reference/cluster.md b/docs/developer_docs/api-reference/cluster.md index f3b51b4200c..fa0a55d1a50 100644 --- a/docs/developer_docs/api-reference/cluster.md +++ b/docs/developer_docs/api-reference/cluster.md @@ -9971,7 +9971,8 @@ If set to Enable, the corresponding service will be exposed. Conversely, if set -

A list of services that are to be exposed or removed.

+

A list of services that are to be exposed or removed. +If componentNamem is not specified, each OpsService in the list must specify ports and selectors.