-
Notifications
You must be signed in to change notification settings - Fork 1
docs: add pvc resize runbook #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
95f3132
docs(readme): add pvc resize runbook
roderik d061756
Apply suggestion from @gemini-code-assist[bot]
roderik de6766d
Apply suggestion from @sourcery-ai[bot]
roderik f4486eb
chore(lefthook): auto-stage generated docs
roderik 3e382cb
Merge branch 'main' into feat/pvc-scale-runbook
roderik 321f58d
docs(readme): remind pvc size sync
roderik 0abadd1
docs(readme): log pvc patch failures
roderik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -112,6 +112,66 @@ rm values-external.yaml | |
|
|
||
| Summon resolves the secrets in memory, `envsubst` renders them into a transient values file, and Helm creates the ConfigMaps/Secrets required by the Besu nodes. The temporary file is removed once the release is installed. | ||
|
|
||
| ### Scale StatefulSet PVC storage (runbook) | ||
|
|
||
| Use this runbook to grow the validator and RPC data volumes without recreating the StatefulSets. | ||
|
|
||
| 1. Edit your Helm values so new pods request the larger capacity and keep the updated defaults: | ||
|
|
||
| ```yaml | ||
| network-nodes: | ||
| persistence: | ||
| enabled: true | ||
| storageClass: fast-ssd # cluster storage class that supports expansion | ||
| size: 200Gi # target size for every validator/RPC PVC | ||
| retention: | ||
| whenDeleted: Retain | ||
| whenScaled: Retain | ||
| ``` | ||
|
|
||
| 2. Roll the values into the release (reuse your existing overrides): | ||
|
|
||
| ```bash | ||
| RELEASE="besu-network" | ||
| NAMESPACE="besu" | ||
|
|
||
| helm upgrade --install "${RELEASE}" ./charts/network \ | ||
| --namespace "${NAMESPACE}" \ | ||
| --values values.yaml | ||
| ``` | ||
|
|
||
| 3. Expand the in-use PVCs with plain `kubectl` so the StatefulSets keep running while storage grows. The loop echoes success or failure for each PVC—investigate any errors (insufficient quota, permissions, driver limits) before proceeding: | ||
|
|
||
| ```bash | ||
| # IMPORTANT: Set this to the same value as `network-nodes.persistence.size` from step 1. | ||
| NEW_SIZE="200Gi" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| RELEASE="besu-network" | ||
| NAMESPACE="besu" | ||
|
|
||
| for component in validator rpc; do | ||
| kubectl get pvc -n "${NAMESPACE}" \ | ||
| -l app.kubernetes.io/instance="${RELEASE}",app.kubernetes.io/component="${component}" \ | ||
| -o name \ | ||
| | while read -r pvc; do | ||
| if kubectl patch -n "${NAMESPACE}" "${pvc}" --type merge \ | ||
| -p "{\"spec\":{\"resources\":{\"requests\":{\"storage\":\"${NEW_SIZE}\"}}}}"; then | ||
| echo "Successfully patched ${pvc}" | ||
| else | ||
| echo "ERROR: Failed to patch ${pvc}" >&2 | ||
| fi | ||
| done | ||
| done | ||
| ``` | ||
|
|
||
| 4. Confirm every claim reports the larger capacity (wait for `FileSystemResizePending` to clear if your CSI driver performs an in-pod resize): | ||
|
|
||
| > **Note:** The `FileSystemResizePending` status typically clears within a few minutes, but may take up to 10–15 minutes depending on your storage backend and cluster load. If the status persists longer than expected, check your CSI driver logs and node status for issues. For troubleshooting, see [Kubernetes PVC resizing documentation](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims). | ||
|
|
||
| ```bash | ||
| kubectl get pvc -n "${NAMESPACE}" -l app.kubernetes.io/instance="${RELEASE}" -w | ||
|
|
||
| If the StorageClass sets `allowVolumeExpansion: false`, patch it to `true` before running the loop or redeploy with a class that supports online resizing. | ||
|
|
||
| ### Local artefact generation with Docker | ||
|
|
||
| Run the bootstrapper container locally to capture all artefacts before loading them into Conjur or another secret manager. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.