Skip to content

feat(k8s): change the access mode of a claim with volume move - #7461

Merged
dan-petty merged 3 commits into
mainfrom
feat/7459-volume-move-access-mode
Nov 27, 2026
Merged

dan-petty merged 3 commits into
mainfrom
feat/7459-volume-move-access-mode

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

devops k8s volume move NAMESPACE/CLAIM --access-mode MODE gives the temporary claim and the claim made again the access mode MODE, such as ReadWriteMany. The access modes of a bound claim cannot change, so a claim that several pods mount must move to change them. On longhorn, a ReadWriteOnce volume attaches to one node only, so a claim of several pods that local-path held on one node becomes ReadWriteMany, which Longhorn serves from a share manager.

The plan refuses a mode that Kubernetes does not name, keeps the modes when the option names the current one, and --plan prints the modes before and after the move.

Closes #7459

Change: openspec/changes/archive/2026-11-27-7459-volume-move-access-mode/

@dan-petty dan-petty added type/feature Type feature: a new function scope/k8s Kubernetes commands, Helm charts, pods, services, and policies labels Nov 27, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Live checks on the homelab, 2026-11-27, with the branch build.

Check Result
A longhorn claim with ReadWriteMany, two pods on two storage nodes both mount it through the Longhorn share manager; chown 999:1000 and chown 33:33 as root in one pod show the same owners and modes in the other
--plan --storage-class longhorn --access-mode ReadWriteMany of a local-path claim that two Deployments mount Access modes: ReadWriteOnce now, ReadWriteMany after the move.; both Deployments and both pods named
The move The two sides are equal: 203 entries, 202 files, 21171320 bytes; 62 s; claim longhorn, ["ReadWriteMany"], Bound
After the pod of Deployment a Running on one storage node and the pod of b (preferred anti-affinity to a) on another; sha256sum of all files the same as before; owner 999:1000 kept

The test namespaces and their volumes are deleted.

@dan-petty
dan-petty marked this pull request as ready for review November 27, 2026 19:39
@dan-petty
dan-petty merged commit 3dec5b1 into main Nov 27, 2026
28 checks passed
@dan-petty
dan-petty deleted the feat/7459-volume-move-access-mode branch November 27, 2026 19:40
dan-petty-release Bot added a commit that referenced this pull request Nov 27, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.229.0](v0.228.3...v0.229.0)
(2026-11-27)


### Features

* **k8s:** change the access mode of a claim with volume move
([#7461](#7461))
([3dec5b1](3dec5b1))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/k8s Kubernetes commands, Helm charts, pods, services, and policies type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(k8s): change the access mode of a claim with volume move

1 participant