Skip to content

S3CSI-227: Move volumeID from Labels to Annotations and add cache volume context#327

Draft
anurag4DSB wants to merge 1 commit intomainfrom
improvement/S3CSI-227-volumeid-annotations-cache
Draft

S3CSI-227: Move volumeID from Labels to Annotations and add cache volume context#327
anurag4DSB wants to merge 1 commit intomainfrom
improvement/S3CSI-227-volumeid-annotations-cache

Conversation

@anurag4DSB
Copy link
Copy Markdown
Collaborator

@anurag4DSB anurag4DSB commented Feb 16, 2026

Summary

  • Move VolumeID/PV name from Labels to Annotations to fix 63-character label overflow
  • Add cache volume context constants for upstream parity
  • Keep deprecated label constants for backward compatibility

Changes

  • pkg/podmounter/mppod/mppod.go: Add annotation constants, deprecate old labels
  • pkg/podmounter/mppod/creator.go: Write to Annotations, keep deprecated labels
  • pkg/podmounter/mppod/creator_test.go: Assert annotations contain volume name
  • pkg/driver/node/mounter/pod_unmounter.go: Read annotations first, fall back to labels
  • pkg/driver/node/mounter/pod_unmounter_test.go: Updated for deprecated label constants
  • pkg/driver/node/volumecontext/volume_context.go: Add cache constants
  • tests/controller/controller_test.go: Updated for annotation-based assertions

Test Plan

  • Unit test: Creator puts volume name in Annotations, not Labels
  • Unit test: Unmounter reads annotations first, falls back to deprecated labels
  • Unit test: Controller tests verify annotation-based pod verification
  • GOOS=linux go vet passes
  • CI E2E: Dynamic provisioning generates PV names exercising annotation path. Cache suite validates cache constants. Unmount path tested during every E2E cleanup.

Issue: S3CSI-227

Move VolumeID/PV name from Labels to Annotations to fix 63-char
overflow. Add cache volume context constants for upstream parity.
Keep deprecated labels for backward compatibility.

Issue: S3CSI-227
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.98%. Comparing base (75ee0ef) to head (bce046c).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
pkg/driver/node/mounter/pod_unmounter.go 77.44% <100.00%> (+0.52%) ⬆️
pkg/podmounter/mppod/creator.go 96.72% <100.00%> (+0.14%) ⬆️
pkg/podmounter/mppod/mppod.go 100.00% <ø> (ø)
@@            Coverage Diff             @@
##             main     #327      +/-   ##
==========================================
+ Coverage   71.89%   71.98%   +0.08%     
==========================================
  Files          47       47              
  Lines        2669     2677       +8     
==========================================
+ Hits         1919     1927       +8     
  Misses        622      622              
  Partials      128      128              

@anurag4DSB anurag4DSB added the help wanted Extra attention is needed label Feb 16, 2026
@anurag4DSB anurag4DSB marked this pull request as draft February 16, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant