Repository navigation
Description
Friction
k8s/README.md (Local-Path Volume Placement, "Move a volume to another node") gives ten hand-run steps to move a local-path claim's data to a volume on another node: pause Argo CD from the top down, make a claim on the target node, scale the workload to zero, copy through the API server with GNU tar, compare digests, rebind the claim to the new volume with claimRef and volumeName, restore the last-applied-configuration annotation, start the workload, resume Argo CD. On 2026-10-24 three moves (#1634) went through that procedure, with two surprises (a dropped exec stream, and an annotation that made Argo CD refuse the sync), and the owner's own run of the steps failed at the first line, because one placeholder broke the shell paste and every later command ran with empty values. #2147 still needs three moves (Grafana, the Prometheus server, Loki). The owner (2026-10-24): "most of this should be managed with infra code and devops cli functionality".
What should happen
devops k8s volume move <namespace>/<claim> (in the existing devops k8s volume group) does the procedure as one command:
- It finds the workload that mounts the claim and the Argo CD Application that owns it, and picks the worker node with the most free disk unless
--to-nodenames one. It refuses a claim that is notBound, a target on the control-plane node, a claim whose StatefulSet deletes claims on scale-down, and leftovers of an earlier run. --planreads only and prints each step with the real names;--dry-runmakes no request.- It pauses Argo CD (
bootstrap,cluster, the Application), copies with the existing API server path, compares file count, byte total, a metadata digest and a content digest, and stops on any difference. - Before the old claim is deleted, any failure undoes the command's own steps (copy pods, the temporary claim, the replica count, the Argo CD pause). After that point a failure leaves Argo CD paused and prints the state and the saved claim, so no self-heal makes an empty claim.
- After the move it checks that the claim is Bound to the new volume and that the workload's pod runs on the target node, sets both volumes to Retain, resumes Argo CD, and prints the old volume to delete later.
Existing tool considered
pv-migrate (utkuozdemir/pv-migrate) moves claim data between nodes. #1634 rejected it for this cluster: it is a new binary on the workstation, it pulls its own rsync images, and its cross-node strategy needs pod-to-pod NetworkPolicy openings. Record the decision again with the current pv-migrate release, and the build cost if the command is built.
Acceptance criteria
- Tests on the shared process fake (no cluster, no real kubectl) cover: a full move, a refusal for each precondition, a digest difference that undoes the steps, and a failure after the point of no return that leaves Argo CD paused.
-
k8s/README.mdreplaces the ten steps with the command, and fix(k8s): the volumes of grafana, the prometheus server and loki move off the control-plane node, and their placement exemptions go #2147 uses it.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsIn Review
Activity
dan-petty commentedon Oct 24, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.
The candidate proposes adding a new feature command to automate volume movement.This change addresses a high-friction manual process and reduces risk of errors during volume moves.This change automates a complex and error-prone manual procedure used for critical monitoring services.The implementation requires handling multiple steps, error recovery, and integration with Argo CD and Kubernetes APIs.Both items relate to moving volumes off the control-plane node, but this item adds a command to automate the process while #2147 describes the need for moving specific volumes.feat(k8s): devops k8s volume move copies a local-path claim to a volu…
chore(main): release 0.5.0 (#2211)