Skip to content

Commit

Permalink
Update cr example.
Browse files Browse the repository at this point in the history
  • Loading branch information
inelpandzic committed Dec 23, 2024
1 parent 8b0c1d1 commit 82ee9f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions deploy/cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
# finalizers:
# - percona.com/delete-pvc
# - percona.com/delete-ssl
# - percona.com/delete-backups
spec:
crVersion: 2.6.0
# secrets:
Expand Down
3 changes: 2 additions & 1 deletion percona/controller/pgcluster/finalizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ func (r *PGClusterReconciler) deleteBackups(ctx context.Context, cr *v2.PerconaP
pod := podList.Items[0]

var stdout, stderr bytes.Buffer
cmd := "pgbackrest --stanza=db --log-level-console=info stop; pgbackrest --stanza=db --log-level-console=info --repo=%s stanza-delete --force"
cmd := "pgbackrest --stanza=db --log-level-console=info stop; " +
"pgbackrest --stanza=db --log-level-console=info --repo=%s stanza-delete --force"

for _, repo := range cr.Spec.Backups.PGBackRest.Repos {
c := fmt.Sprintf(cmd, strings.TrimPrefix(repo.Name, "repo"))
Expand Down

0 comments on commit 82ee9f1

Please sign in to comment.