ci: convert k8s charts deployment -> statefulset #3642
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates the helm charts used for testnet deployments to use a StatefulSet [0], rather than a Deployment [1], as the representation for a Penumbra fullnode/validator. The goal is to leverage the k8s API as best as possible for our workloads, which are indeed stateful in the sense that they require attached storage and cannot maintain their identity absent that storage.
We also benefit from ordered rollouts, meaning that future minor version bumps will be applied sequentially, and paused if any node fails to become ready. This will ensure more predictable behavior as we move toward chain upgrades.
When performing a chain upgrade, the manual steps taken by a human operator are now significantly simpler. In addition to the conversion to Statefulsets, the relevant charts now boast a new future called "maintenanceMode", defaulting to false, which will place nodes in a suspended state so that a human operator can run
pd migrate
. This mode encapsulates a number of finicky manual steps: override command to be "sleep infinity", for both pd and cometbft, alter securityContext to run as root user for volume permissions, and then undo all that in the reverse order.[0] https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/
[1] https://kubernetes.io/docs/concepts/workloads/controllers/deployment/