From ea5c565f6443d45d05d68cde39ff1989cc981f85 Mon Sep 17 00:00:00 2001 From: wu8685 Date: Tue, 29 Oct 2024 23:57:39 +0800 Subject: [PATCH] add creating label when replacing pod created --- pkg/controllers/collaset/synccontrol/replace.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/controllers/collaset/synccontrol/replace.go b/pkg/controllers/collaset/synccontrol/replace.go index 2cf9432b..9c9ea05e 100644 --- a/pkg/controllers/collaset/synccontrol/replace.go +++ b/pkg/controllers/collaset/synccontrol/replace.go @@ -154,6 +154,7 @@ func (r *RealSyncControl) replaceOriginPods( ownedIDs[newPodId].Remove(podcontext.JustCreateContextDataKey) } newPod.Labels[appsv1alpha1.PodReplacePairOriginName] = originPod.GetName() + newPod.Labels[appsv1alpha1.PodCreatingLabel] = strconv.FormatInt(time.Now().UnixNano(), 10) newPodContext.Put(podcontext.RevisionContextDataKey, replaceRevision.Name) // create pvcs for new pod err = r.pvcControl.CreatePodPvcs(ctx, instance, newPod, resources.ExistingPvcs)