From 29d5e55416e0cf28590b943a49f30cc9d4b1ae40 Mon Sep 17 00:00:00 2001 From: Ethan Mosbaugh Date: Thu, 5 Dec 2024 10:50:59 -0800 Subject: [PATCH] dont render app spec for improved dr --- pkg/kotsadmsnapshot/backup.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pkg/kotsadmsnapshot/backup.go b/pkg/kotsadmsnapshot/backup.go index b5a062949e..7c56140acf 100644 --- a/pkg/kotsadmsnapshot/backup.go +++ b/pkg/kotsadmsnapshot/backup.go @@ -557,19 +557,11 @@ func getAppInstanceBackupSpec(k8sClient kubernetes.Interface, metadata instanceB return nil, errors.New("cannot create backup for Embedded Cluster with multiple apps") } - backupSpec, err := appMeta.kotsKinds.Marshal("velero.io", "v1", "Backup") - if err != nil { - return nil, errors.Wrap(err, "failed to get backup spec from kotskinds") - } - - if backupSpec == "" { + if appMeta.kotsKinds.Backup == nil { return nil, errors.New("backup spec is empty, this is unexpected") } - appVeleroBackup, err = kotsutil.LoadBackupFromContents([]byte(backupSpec)) - if err != nil { - return nil, errors.Wrap(err, "failed to load backup from contents") - } + appVeleroBackup = appMeta.kotsKinds.Backup appVeleroBackup.Name = "" appVeleroBackup.GenerateName = "application-"