Repository navigation
Description
What happened
#1634 moves every local-path volume off the control-plane node, whose 236 GB root disk is about 79% used. On 2026-10-24 an agent moved Pyroscope, Qdrant and Open WebUI with the copy procedure of k8s/README.md (Local-Path Volume Placement), and checked each copy. It could not move Grafana (monitoring/grafana), the Prometheus server (monitoring/prometheus-server) and Loki (logging/storage-loki-0): the permission system of that session refused the scale to zero of Grafana. Their old volumes are set to Retain, and CONST_K8S_CONTROL_PLANE_CLAIM_EXEMPTIONS in src/devops_cli/config/constants.py exempts them from the placement test, so the merge of #1634 does not leave their pods Pending.
What should happen
A person (or a session where scaling these workloads is allowed) moves the three volumes to worker nodes with the README procedure, one at a time (Grafana, then Prometheus, then Loki), and checks each one: Grafana dashboards load, Prometheus has samples from before the move, Loki answers a query for the day before. Then the values get the control-plane DoesNotExist affinity (affinity for Grafana, server.affinity for Prometheus, singleBinary.affinity for Loki), and the three entries leave the exemption list.
Acceptance criteria
-
kubectl get pvshows the volumes of the three claims on worker nodes, with reclaim policy Retain. -
CONST_K8S_CONTROL_PLANE_CLAIM_EXEMPTIONSis empty or gone, andtests/test_k8s_local_path_placement.pypasses with no exemption.
Source: #1634
Proposed design
Problem statement
Grafana, Prometheus server and Loki volumes are on the control-plane node. This uses 79% of the 236 GB root disk. Moving these volumes off the control-plane node improves system stability.
Acceptance criteria
- Criterion 1: kubectl get pv shows the volumes of the three claims on worker nodes, with reclaim policy Retain.
Verification: Run 'kubectl get pv' and verify that grafana, prometheus-server and storage-loki-0 volumes are on worker nodes and have reclaim policy Retain. - Criterion 2: CONST_K8S_CONTROL_PLANE_CLAIM_EXEMPTIONS is empty or gone, and tests/test_k8s_local_path_placement.py passes with no exemption.
Verification: Check that CONST_K8S_CONTROL_PLANE_CLAIM_EXEMPTIONS in src/devops_cli/config/constants.py is empty or removed. Run tests/test_k8s_local_path_placement.py to verify it passes without exemptions.
Key questions
- Which three volumes are currently on the control-plane node?: The volumes are grafana in monitoring namespace, prometheus-server in monitoring namespace, and storage-loki-0 in logging namespace. [sources: k8s/README.md]
- What is the procedure to move a volume to another node?: Use 'devops k8s volume move /' command with the README procedure. The command copies data from old volume to new volume on worker node, scales workloads to zero during copy, and checks each copy. [sources: k8s/README.md]
- What changes are needed after moving the volumes?: The affinity rules need to be added to Grafana, Prometheus server and Loki configurations. The entries must also be removed from CONST_K8S_CONTROL_PLANE_CLAIM_EXEMPTIONS in src/devops_cli/config/constants.py. (proposed) [sources: k8s/README.md]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReady
- StatusShow more project fieldsNew
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 is about Kubernetes volume placement and cluster infrastructure.Moving volumes off control-plane node improves system stability and disk usage.Improves resource utilization and avoids potential disk space issues on control-plane nodes.Requires manual steps to move each volume and update configurations, but is not overly complex.Both items relate to Loki but ask for different changes: one moves volumes, the other updates Loki chart version.fix(k8s): stateful local-path volumes bind on nodes with disk headroo…
feat(k8s): devops k8s volume move copies a local-path claim to a volu…
dan-petty commentedon Oct 26, 2026
Status set to Ready at 48c78ca (see proposed design in issue body).
13 remaining items
fix(k8s): hold the copy source until the destination ends (#3712)
dan-petty commentedon Nov 6, 2026
The three volumes moved on 2026-11-06, with
devops k8s volume moveat the merge of #3712. The runbook of the comment of 2026-11-05 ran to step 6.monitoring/grafanaRetain, a dashboard search through the Grafana API answersmonitoring/prometheus-serverprometheus_tsdb_lowest_timestamp_secondsis the same before and after (1791201600), and the kubelet series has a sample in each minute of the stoplogging/storage-loki-0sum(loki_write_dropped_entries_total)is 1 before and afterThe first live try of Grafana on 2026-11-05 failed in the copy and undid itself with no data loss. #3695 and #3712 fixed the copy: the source stream ended before the destination had the data. These moves needed no retry.
Criterion 1 holds.
kubectl get pvshows the three claims on a worker node with reclaim policyRetain. Argo CD showsbootstrap,cluster,grafana,prometheusandlokiSynced and Healthy.What stays for a person (step 9). Each old volume is
Releasedon the control-plane node and keeps its data. After you no longer need it, delete it with the command that the move printed, then read the free space of the root disk (#3654):Then
kubectl delete pv <name>for each. The saved claims are under.data/k8s/volume-move/on the workstation.The item is now released, so the repository change (the affinity of the three values and the empty exemption table) can be built.
dan-petty commentedon Nov 6, 2026
Answer from project standards, under the owner's instruction of 2026-11-05.
The volumes moved on 2026-11-06 (comment of that date), so I built groups 1 and 2 of the plan in
openspec/changes/2147-the-volumes-of-grafana-the-prometheus/. The commit is on branchfix/2147-the-volumes-of-grafana-the-prometheus. It is not pushed yet. I changed nothing in the cluster.Question 1. The issue names
CONST_K8S_CONTROL_PLANE_CLAIM_EXEMPTIONSinsrc/devops_cli/config/constants.py. Which table does criterion 2 mean?Answer. That constant does not exist. The only table is
_CONTROL_PLANE_CLAIM_EXEMPTIONSintests/core/test_k8s_local_path_placement.py. The change empties it and keeps it, with its comment, so a later pod that must stay on the node has a place for its reason. The issue allows "empty or gone", and the empty table is the smaller change. The source:git grep -n CLAIM_EXEMPTIONS -- src tests k8s, and the base specopenspec/specs/local-path-volume-placement/spec.md(the scenario "An exemption is stale"). The change touches no file undersrc/.Question 2. The plan names lines 321 to 341 and line 337 of
k8s/README.md. Is that right?Answer. No, the lines moved. I found the paragraph by the section name Local-Path Volume Placement, and I fixed the line numbers in the plan files. The paragraph now names
tests/core/test_k8s_local_path_placement.py, says that the table is empty, and keeps the rule for a pod whose volume is still on the control-plane node.Question 3. Does this change supersede the plan pull request #2857?
Answer. No. #2857 is merged (2026-10-31). It planned the item and closed nothing. This change builds on that plan, and the pull request of this change closes the issue.
Checks (read only, 2026-11-06).
kubectl get pv: the bound volumes ofmonitoring/grafana,monitoring/prometheus-serverandlogging/storage-loki-0areRetainandBoundon a worker node.kubectl get nodes -L node-role.kubernetes.io/control-planeprintstrueonly for the control-plane node. The three old volumes areReleasedon the control-plane node.helm templatewith the values of this change, againsthelm templatewith the values oforigin/main, differs only by the affinity block. Grafana chart 14.0.1: the Deploymentgrafana(and the Helm test Pod). Prometheus chart 29.35.0: the Deploymentprometheus-server; the Alertmanager StatefulSet is unchanged. Loki chart 20.0.2: the StatefulSetlokihas the node affinity and keeps itspodAntiAffinityonkubernetes.io/hostname.uv run devops ci test tests/core/test_k8s_local_path_placement.pyfails and lists exactly the three pods. With the affinity, it prints9 passed.uv run devops ci fail-to-pass --base origin/mainreports 1 failed on base (test_every_chart_pod_on_a_claim_keeps_off_the_control_plane_node) and 8 passed.uv run devops ci testfor the tests that read the three files (tests/invariants/test_k8s_manifests.py,tests/invariants/test_k8s_argocd_apps.py,tests/k8s,tests/commands/k8s,tests/prometheus,tests/grafana,tests/core/test_third_party_telemetry.py,tests/core/test_renovate_config.py, the placement test): 1385 passed.uv run devops ci docs,uv run devops openspec checkand the k8s gate pass.What stays for a person.
Releasedvolumes when you no longer need their data (step 9 of the runbook; fix(k8s): free the root disk of the control-plane node #3654 holds the disk work).devops-cli-service commentedon Nov 6, 2026
Released in v0.64.2: https://github.com/dan-petty/devops-cli/releases/tag/v0.64.2
devops-cli-service commentedon Nov 6, 2026
Live since 2026-11-06 04:26 UTC