Skip to content

Commit

Permalink
Merge pull request #261 from vshn/fix/invalid_backup_refs
Browse files Browse the repository at this point in the history
Prevent empty BackupNames from being referenced
  • Loading branch information
Kidswiss authored Nov 15, 2024
2 parents 17433a7 + 409e5c9 commit 4440dc9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ func createSgCluster(ctx context.Context, comp *vshnv1.VSHNPostgreSQL, svc *runt

initialData := &sgv1.SGClusterSpecInitialData{}
backupRef := xkubev1.Reference{}
if comp.Spec.Parameters.Restore != nil {
if comp.Spec.Parameters.Restore != nil && comp.Spec.Parameters.Restore.BackupName != "" {
initialData = &sgv1.SGClusterSpecInitialData{
Restore: &sgv1.SGClusterSpecInitialDataRestore{
FromBackup: &sgv1.SGClusterSpecInitialDataRestoreFromBackup{
Expand Down

0 comments on commit 4440dc9

Please sign in to comment.