diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 7cd598f6542c..1ecebf2fb3d2 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -20080,6 +20080,10 @@ "type": "string", "default": "" }, + "purgeMode": { + "description": "PurgeMode represents how to deal with the legacy applications on the cluster from which the application is migrated. Valid options are \"Immediately\", \"Graciously\" and \"Never\".", + "type": "string" + }, "reason": { "description": "Reason contains a programmatic identifier indicating the reason for the eviction. Producers may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", "type": "string", diff --git a/charts/karmada/_crds/bases/work/work.karmada.io_clusterresourcebindings.yaml b/charts/karmada/_crds/bases/work/work.karmada.io_clusterresourcebindings.yaml index d4aab0dea6c4..7cf018870a91 100644 --- a/charts/karmada/_crds/bases/work/work.karmada.io_clusterresourcebindings.yaml +++ b/charts/karmada/_crds/bases/work/work.karmada.io_clusterresourcebindings.yaml @@ -381,6 +381,16 @@ spec: description: Producer indicates the controller who triggered the eviction. type: string + purgeMode: + description: |- + PurgeMode represents how to deal with the legacy applications on the + cluster from which the application is migrated. + Valid options are "Immediately", "Graciously" and "Never". + enum: + - Immediately + - Graciously + - Never + type: string reason: description: |- Reason contains a programmatic identifier indicating the reason for the eviction. diff --git a/charts/karmada/_crds/bases/work/work.karmada.io_resourcebindings.yaml b/charts/karmada/_crds/bases/work/work.karmada.io_resourcebindings.yaml index c0c20e1217bd..d77bb39a2cb8 100644 --- a/charts/karmada/_crds/bases/work/work.karmada.io_resourcebindings.yaml +++ b/charts/karmada/_crds/bases/work/work.karmada.io_resourcebindings.yaml @@ -381,6 +381,16 @@ spec: description: Producer indicates the controller who triggered the eviction. type: string + purgeMode: + description: |- + PurgeMode represents how to deal with the legacy applications on the + cluster from which the application is migrated. + Valid options are "Immediately", "Graciously" and "Never". + enum: + - Immediately + - Graciously + - Never + type: string reason: description: |- Reason contains a programmatic identifier indicating the reason for the eviction. diff --git a/pkg/apis/work/v1alpha2/binding_types.go b/pkg/apis/work/v1alpha2/binding_types.go index 7797fb3c60fb..ad2ee731bf21 100644 --- a/pkg/apis/work/v1alpha2/binding_types.go +++ b/pkg/apis/work/v1alpha2/binding_types.go @@ -240,6 +240,13 @@ type GracefulEvictionTask struct { // +required FromCluster string `json:"fromCluster"` + // PurgeMode represents how to deal with the legacy applications on the + // cluster from which the application is migrated. + // Valid options are "Immediately", "Graciously" and "Never". + // +kubebuilder:validation:Enum=Immediately;Graciously;Never + // +optional + PurgeMode policyv1alpha1.PurgeMode `json:"purgeMode,omitempty"` + // Replicas indicates the number of replicas should be evicted. // Should be ignored for resource type that doesn't have replica. // +optional diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go index 25eb8f9d5c26..3b71aade0368 100644 --- a/pkg/generated/openapi/zz_generated.openapi.go +++ b/pkg/generated/openapi/zz_generated.openapi.go @@ -6839,6 +6839,13 @@ func schema_pkg_apis_work_v1alpha2_GracefulEvictionTask(ref common.ReferenceCall Format: "", }, }, + "purgeMode": { + SchemaProps: spec.SchemaProps{ + Description: "PurgeMode represents how to deal with the legacy applications on the cluster from which the application is migrated. Valid options are \"Immediately\", \"Graciously\" and \"Never\".", + Type: []string{"string"}, + Format: "", + }, + }, "replicas": { SchemaProps: spec.SchemaProps{ Description: "Replicas indicates the number of replicas should be evicted. Should be ignored for resource type that doesn't have replica.",