Skip to content

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

Done

Description

@dan-petty

Problem

devops k8s volume move makes <claim>-move and the claim made again with the access modes of the old claim. A claim that several pods mount on one node, such as a local-path claim of three Deployments, must become ReadWriteMany on a replicated class: a Longhorn ReadWriteOnce volume attaches to one node only, so a pod on another node cannot start, and a rolling update can deadlock. The access modes of a bound claim are immutable, so only a move can change them, and the claim must keep its name.

The owner chose ReadWriteMany on longhorn on 2026-11-27 for danielpetty-com-pixelfed/pixelfed-storage (Pixelfed web, horizon and scheduler; dan-petty/danielpetty.com#108) and devops/roadmap-service-home (the Service and its planner Jobs; dan-petty/homelab#579).

Evidence of 2026-11-27 on the homelab: a longhorn claim with ReadWriteMany mounted in two pods on two storage nodes through the Longhorn share manager; a chown 999:1000 and a chown 33:33 as root in one pod showed the same owners and modes in the other pod.

Change

  • Add --access-mode MODE to devops k8s volume move. <claim>-move and the claim made again get accessModes: [MODE]. Without it, they keep the access modes of the old claim, as now.
  • --plan prints the access modes of the old claim and the target access mode; --dry-run shows them in the manifests.

Acceptance criteria

  • A failing test first: a plan with --storage-class longhorn --access-mode ReadWriteMany makes the move claim and the claim made again with accessModes: [ReadWriteMany].
  • A live move of a test claim of two Deployments to longhorn with ReadWriteMany ends with both pods Running on storage nodes and the data the same.
  • devops ci checks pass.

Related: #7382.

Activity

  1. added
    type/feature
    scope/k8s
    source/agent
    status/new
    effort/medium
    value/high
    priority/p2-medium
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 27, 2026
  2. removed
    status/in-review
    owner/agent
    on Nov 27, 2026
  3. devops-cli-service commented on Nov 27, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-27 20:34 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/k8ssource/agenttype/featurevalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions