Skip to content

Upgrading

A Peat upgrade is two commands. The operator does the rest, one piece at a time, and stops if anything looks wrong.

Terminal window
# 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 -w

If you keep platform.yaml in git, change release there and apply the file instead of patching.

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.

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.

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.

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:

Terminal window
peat status

Then either:

  • fix the cause and go on: peat retry, which continues from that step; or
  • go back: set release to the earlier one. Only the pieces that had moved go back, last first, with the same checks.

A halted upgrade never resumes by itself.

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.