File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
internal/controller/postgrescluster Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -345,18 +345,6 @@ func (r *Reconciler) cleanupRepoResources(ctx context.Context,
345345 delete = false
346346 }
347347 }
348- case hasLabel (naming .LabelPGBackRestBackup ):
349- if ! backupsSpecFound {
350- break
351- }
352- // If a Job is identified for a repo that no longer exists in the spec then
353- // delete it. Otherwise add it to the slice and continue.
354- for _ , repo := range postgresCluster .Spec .Backups .PGBackRest .Repos {
355- if repo .Name == owned .GetLabels ()[naming .LabelPGBackRestRepo ] {
356- ownedNoDelete = append (ownedNoDelete , owned )
357- delete = false
358- }
359- }
360348 case hasLabel (naming .LabelPGBackRestCronJob ):
361349 if ! backupsSpecFound {
362350 break
@@ -371,6 +359,18 @@ func (r *Reconciler) cleanupRepoResources(ctx context.Context,
371359 break
372360 }
373361 }
362+ case hasLabel (naming .LabelPGBackRestBackup ):
363+ if ! backupsSpecFound {
364+ break
365+ }
366+ // If a Job is identified for a repo that no longer exists in the spec then
367+ // delete it. Otherwise add it to the slice and continue.
368+ for _ , repo := range postgresCluster .Spec .Backups .PGBackRest .Repos {
369+ if repo .Name == owned .GetLabels ()[naming .LabelPGBackRestRepo ] {
370+ ownedNoDelete = append (ownedNoDelete , owned )
371+ delete = false
372+ }
373+ }
374374 case hasLabel (naming .LabelPGBackRestRestore ):
375375 if ! backupsSpecFound {
376376 break
You can’t perform that action at this time.
0 commit comments