Skip to content

[VMOwnedVolumes][Draft] CVI Lifecycle#4057

Open
deepakkinni wants to merge 2 commits into
kubernetes-sigs:masterfrom
deepakkinni:topic/dk016388/vmown-csi-phase1
Open

[VMOwnedVolumes][Draft] CVI Lifecycle#4057
deepakkinni wants to merge 2 commits into
kubernetes-sigs:masterfrom
deepakkinni:topic/dk016388/vmown-csi-phase1

Conversation

@deepakkinni
Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:
Phase 1 — CVI Lifecycle (Section 6)
CVI Creation at Provisioning (Section 6.1.1) — In CreateVolume (WCP controller path), after CnsCreateVolume succeeds and the FSS is enabled, read FCD backing metadata (diskUUID, diskPath) and create a CsiVolumeInfo CR in the PVC namespace with ownershipState=CSI_MANAGED and PV ownerReference.

CVI Lazy Creation on Brownfield Detach (Section 6.1.2) — In the existing CnsDetachVolume completion path inside the single-attach or batch-attach controller, when the detach is user-initiated (not revert-induced) and the VM has no VirtualMachineSnapshot CRs, lazily create a CVI in CSI_MANAGED state.

CVI Handling on Retain-Reclaim Rebind (Section 6.1.3) — Add a PV-bind observer (in the syncer or volume controller) that detects when a Retain PV is re-bound to a PVC in a different namespace, deletes the stale CVI, and creates a fresh CVI in the new namespace; for same-namespace rebind, update spec.pvcName.

CVI GC via PV OwnerRef Cascade (Section 6.3) — Validate and test that the PV ownerReference cascade correctly garbage-collects the CVI on PV deletion (Delete reclaim) and that CVI correctly persists when only the PVC is deleted (Retain reclaim).

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Testing done:
A PR must be marked "[WIP]", if no test result is provided. A WIP PR won't be reviewed, nor merged.
The requester can determine a sufficient test, e.g. build for a cosmetic change, E2E test in a predeployed setup, etc.
For new features, new tests should be done, in addition to regression tests.
If jtest is used to trigger precheckin tests, paste the result after jtest completes and remove [WIP] in the PR subject.
The review cycle will start, only after "[WIP]" is removed from the PR subject.

Special notes for your reviewer:

Release note:

Signed-off-by: Deepak Kinni <deepak.kinni@broadcom.com>
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deepakkinni

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 30, 2026
@deepakkinni deepakkinni changed the title Topic/dk016388/vmown csi phase1 [VMOwnedVolumes][Draft] CVI Lifecycle May 30, 2026
Signed-off-by: Deepak Kinni <deepak.kinni@broadcom.com>
@deepakkinni deepakkinni force-pushed the topic/dk016388/vmown-csi-phase1 branch from 36b5977 to 98eee1b Compare May 30, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants