Repository navigation
Commit fcdf59a
fix(backups): clear useSystemBucket on Postgres in-place restore (#3327)
A Postgres app created with the platform-recommended backup.useSystemBucket=true
cannot be restored in place. The CNPG restore driver writes explicit backup
coordinates (destinationPath / endpointURL / s3CredentialsSecret) and flips
bootstrap.enabled=true, but it never cleared the server-side
useSystemBucket=true. The chart then fails its `bootstrap.enabled +
useSystemBucket` render guard, the HelmRelease never re-renders
bootstrap.recovery, and the RestoreJob can never converge (helm remediation
retries forever).
Clear backup.useSystemBucket in the restore patch so the chart receives a
self-consistent value set: explicit coordinates, no system-bucket flag,
recovery on. postgresapp.Backup.UseSystemBucket intentionally omits `omitempty`
so the false zero-value survives into the JSON merge patch and actually
overwrites the server value; with omitempty it would be dropped and the bug
would persist.
Signed-off-by: Andrey Kolkov <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>1 parent 61a236c commit fcdf59a
3 files changed
Lines changed: 50 additions & 2 deletions
File tree
- internal/backupcontroller
- postgresapp
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1102 | 1102 | | |
1103 | 1103 | | |
1104 | 1104 | | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
1105 | 1111 | | |
1106 | 1112 | | |
1107 | 1113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
551 | 589 | | |
552 | 590 | | |
553 | 591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| |||
0 commit comments