Upgrading
A Peat upgrade is two commands. The operator does the rest, one piece at a time, and stops if anything looks wrong.
# 1. The new release's install file: the new operator and object kinds.kubectl apply --server-side -f https://github.com/Zabaca/peat/releases/download/<new release>/peat.yaml
# 2. The new release's name in your Platform.kubectl patch platform peat --type merge -p '{"spec":{"release":"<new release>"}}'
peat status # or: kubectl get platform peat -wIf you keep platform.yaml in git, change release there and apply the file instead of patching.
What happens
Section titled “What happens”The pieces move in a fixed order: the storage controller, each pageserver, each safekeeper, the gateways, the control layer. Before a pageserver restarts, the databases it serves are moved to the other one, and moved back after.
The whole platform is checked before and after every step. The Platform reads Upgrading, with the step it is on, and Ready when
every piece runs the new release.
What clients see
Section titled “What clients see”Databases stay available throughout. A connection that is open when a piece on its path restarts may be dropped, so clients should reconnect and retry, as they should for any Postgres.
A database’s own compute takes the new release the next time it starts. One that stays awake takes it inside
upgrades.restartHours, if you set them.
Keeping upgrades out of busy hours
Section titled “Keeping upgrades out of busy hours”spec: upgrades: quietHours: - start: "08:00" end: "18:00" timeZone: America/New_York days: [Mon, Tue, Wed, Thu, Fri]No step starts inside quiet hours. An upgrade under way pauses at its next step and goes on afterwards; the status says so.
If it halts
Section titled “If it halts”A check that does not pass within upgrades.checkTimeout (10 minutes by default) halts the upgrade. Nothing more is changed, and the
status names the step and the reason:
peat statusThen either:
- fix the cause and go on:
peat retry, which continues from that step; or - go back: set
releaseto the earlier one. Only the pieces that had moved go back, last first, with the same checks.
A halted upgrade never resumes by itself.
A change of settings
Section titled “A change of settings”Changing a setting that restarts a piece (its memory, where it may run) goes the same careful way: one piece at a time, checked before
and after, outside quiet hours. The status reads Upgrading with “a change of settings”. Settings that restart nothing apply at once.