From 1af13878a037c44c1ef1770d5aebdaa451ee5b6f Mon Sep 17 00:00:00 2001 From: Adrian Stobbe Date: Mon, 14 Aug 2023 09:16:46 +0200 Subject: [PATCH] fix configmap backup during upgrade (#2219) --- cli/internal/kubernetes/upgrade.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/internal/kubernetes/upgrade.go b/cli/internal/kubernetes/upgrade.go index 47a77bf3c..38eedbdd6 100644 --- a/cli/internal/kubernetes/upgrade.go +++ b/cli/internal/kubernetes/upgrade.go @@ -337,7 +337,7 @@ func (u *Upgrader) BackupConfigMap(ctx context.Context, name string) error { } backup := cm.DeepCopy() backup.ObjectMeta = metav1.ObjectMeta{} - backup.Name = fmt.Sprintf("%s-backup", backup.Name) + backup.Name = fmt.Sprintf("%s-backup", name) if _, err := u.stableInterface.CreateConfigMap(ctx, backup); err != nil { if _, err := u.stableInterface.UpdateConfigMap(ctx, backup); err != nil { return fmt.Errorf("updating backup config map: %w", err)