Skip to content

Commit

Permalink
dont render app spec for improved dr
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh committed Dec 5, 2024
1 parent f92b5a1 commit 29d5e55
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions pkg/kotsadmsnapshot/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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-"
Expand Down

0 comments on commit 29d5e55

Please sign in to comment.