From 2404ce8b5a07162a82482884af9fb9488607e35c Mon Sep 17 00:00:00 2001 From: wangyelei Date: Thu, 27 Mar 2025 17:04:42 +0800 Subject: [PATCH] chore: improve the diff format for upgrade-to-v1 command --- pkg/cmd/cluster/upgrade_to_1.0.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/cmd/cluster/upgrade_to_1.0.go b/pkg/cmd/cluster/upgrade_to_1.0.go index b4f707cba..e7a5af08b 100644 --- a/pkg/cmd/cluster/upgrade_to_1.0.go +++ b/pkg/cmd/cluster/upgrade_to_1.0.go @@ -648,6 +648,8 @@ func (o *UpgradeToV1Options) Convert09ComponentDef(cluster *kbappsv1.Cluster, } func (o *UpgradeToV1Options) printDiff(clusterV1Alpha1 *kbappsv1alpha1.Cluster, clusterV1 *kbappsv1.Cluster) { + delete(clusterV1Alpha1.Annotations, corev1.LastAppliedConfigAnnotation) + delete(clusterV1.Annotations, corev1.LastAppliedConfigAnnotation) clusterV1Alpha1.Status = kbappsv1alpha1.ClusterStatus{} clusterV1Alpha1.ObjectMeta.ManagedFields = nil clusterV1.Status = kbappsv1.ClusterStatus{}