From 1b8f6e120cc089150d5519d498f885529884d37c Mon Sep 17 00:00:00 2001 From: ColdsteelRail <574252631@qq.com> Date: Wed, 9 Oct 2024 14:27:01 +0800 Subject: [PATCH 1/3] add host delete label --- apps/v1alpha1/well_known_labels.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/v1alpha1/well_known_labels.go b/apps/v1alpha1/well_known_labels.go index 070f808..ddf2302 100644 --- a/apps/v1alpha1/well_known_labels.go +++ b/apps/v1alpha1/well_known_labels.go @@ -43,6 +43,7 @@ const ( PodReplaceIndicationLabelKey = "podopslifecycle.kusionstack.io/to-replace" // users can use this label to indicate a pod to replace PodReplaceByReplaceUpdateLabelKey = "podopslifecycle.kusionstack.io/replaced-by-replace-update" PodPreparingDeleteLabel = "podopslifecycle.kusionstack.io/preparing-to-delete" + PodDeleteHostedLabel = "podopslifecycle.kusionstack.io/delete-hosted" // indicate a terminating pod is considered as deleted by k8s ) var ( @@ -53,9 +54,8 @@ var ( // CollaSet labels const ( - PodInstanceIDLabelKey = "collaset.kusionstack.io/instance-id" // used to attach Pod instance ID on Pod - CollaSetUpdateIndicateLabelKey = "collaset.kusionstack.io/update-included" // used to indicate a pod should be updated by label - PodUpgradeByRecreateLabelKey = "collaset.kusionstack.io/upgrade-by-recreating" // used to indicate a pod is upgraded by recreate + PodInstanceIDLabelKey = "collaset.kusionstack.io/instance-id" // used to attach Pod instance ID on Pod + CollaSetUpdateIndicateLabelKey = "collaset.kusionstack.io/update-included" // used to indicate a pod should be updated by label PodReplacePairOriginName = "collaset.kusionstack.io/replace-pair-origin-name" // used to indicate the original Pod name for replacement. PodReplacePairNewId = "collaset.kusionstack.io/replace-pair-new-id" // used to indicate the new created Pod instance ID for replacement. From 8876296bfc1ad51ee42615de4f1eb7e2b0f53574 Mon Sep 17 00:00:00 2001 From: ColdsteelRail <574252631@qq.com> Date: Wed, 9 Oct 2024 14:28:26 +0800 Subject: [PATCH 2/3] revert PodUpgradeByRecreateLabelKey --- apps/v1alpha1/well_known_labels.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/v1alpha1/well_known_labels.go b/apps/v1alpha1/well_known_labels.go index ddf2302..ff6a331 100644 --- a/apps/v1alpha1/well_known_labels.go +++ b/apps/v1alpha1/well_known_labels.go @@ -54,8 +54,9 @@ var ( // CollaSet labels const ( - PodInstanceIDLabelKey = "collaset.kusionstack.io/instance-id" // used to attach Pod instance ID on Pod - CollaSetUpdateIndicateLabelKey = "collaset.kusionstack.io/update-included" // used to indicate a pod should be updated by label + PodInstanceIDLabelKey = "collaset.kusionstack.io/instance-id" // used to attach Pod instance ID on Pod + CollaSetUpdateIndicateLabelKey = "collaset.kusionstack.io/update-included" // used to indicate a pod should be updated by label + PodUpgradeByRecreateLabelKey = "collaset.kusionstack.io/upgrade-by-recreating" // used to indicate a pod is upgraded by recreate PodReplacePairOriginName = "collaset.kusionstack.io/replace-pair-origin-name" // used to indicate the original Pod name for replacement. PodReplacePairNewId = "collaset.kusionstack.io/replace-pair-new-id" // used to indicate the new created Pod instance ID for replacement. From 961fb1d309f8d404053ca8aef992d7e9086a66f5 Mon Sep 17 00:00:00 2001 From: ColdsteelRail <574252631@qq.com> Date: Thu, 10 Oct 2024 21:46:48 +0800 Subject: [PATCH 3/3] refactor delete-hosted label --- apps/v1alpha1/well_known_labels.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/apps/v1alpha1/well_known_labels.go b/apps/v1alpha1/well_known_labels.go index ff6a331..193363f 100644 --- a/apps/v1alpha1/well_known_labels.go +++ b/apps/v1alpha1/well_known_labels.go @@ -37,13 +37,9 @@ const ( PodPostCheckedLabelPrefix = "post-checked.podopslifecycle.kusionstack.io" // indicate a pod has finished post-check phase PodCompletingLabelPrefix = "completing.podopslifecycle.kusionstack.io" // indicate a pod is completing operation - PodServiceAvailableLabel = "podopslifecycle.kusionstack.io/service-available" // indicate a pod is available to serve - PodStayOfflineLabel = "podopslifecycle.kusionstack.io/stay-offline" // indicate a pod is not ready and available to serve - PodDeletionIndicationLabelKey = "podopslifecycle.kusionstack.io/to-delete" // users can use this label to indicate a pod to delete - PodReplaceIndicationLabelKey = "podopslifecycle.kusionstack.io/to-replace" // users can use this label to indicate a pod to replace - PodReplaceByReplaceUpdateLabelKey = "podopslifecycle.kusionstack.io/replaced-by-replace-update" - PodPreparingDeleteLabel = "podopslifecycle.kusionstack.io/preparing-to-delete" - PodDeleteHostedLabel = "podopslifecycle.kusionstack.io/delete-hosted" // indicate a terminating pod is considered as deleted by k8s + PodServiceAvailableLabel = "podopslifecycle.kusionstack.io/service-available" // indicate a pod is available to serve + PodStayOfflineLabel = "podopslifecycle.kusionstack.io/stay-offline" // indicate a pod is not ready and available to serve + PodPreparingDeleteLabel = "podopslifecycle.kusionstack.io/preparing-to-delete" ) var ( @@ -58,6 +54,11 @@ const ( CollaSetUpdateIndicateLabelKey = "collaset.kusionstack.io/update-included" // used to indicate a pod should be updated by label PodUpgradeByRecreateLabelKey = "collaset.kusionstack.io/upgrade-by-recreating" // used to indicate a pod is upgraded by recreate + PodDeletionIndicationLabelKey = "collaset.kusionstack.io/to-delete" // users can use this label to indicate a pod to delete + PodReplaceIndicationLabelKey = "collaset.kusionstack.io/to-replace" // users can use this label to indicate a pod to replace + PodReplaceByReplaceUpdateLabelKey = "collaset.kusionstack.io/replaced-by-replace-update" + PodIgnoringIndicationLabelKey = "collaset.kusionstack.io/to-ignore" // users can use this label to indicate a pod to be ignored by collaset + PodReplacePairOriginName = "collaset.kusionstack.io/replace-pair-origin-name" // used to indicate the original Pod name for replacement. PodReplacePairNewId = "collaset.kusionstack.io/replace-pair-new-id" // used to indicate the new created Pod instance ID for replacement.