Skip to content

feat: Add VolumeID to Mount request #1755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

micahhausler
Copy link
Member

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR adds the VolumeID to the request so providers can make smarter caching decisions once requiresRepublish is implemented.

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #1754

Special notes for your reviewer:

I opted to name the key with the DNS namespace for this project as there isn't a corresponding CSI key I could find in the Kubernetes codebase (the volume ID is just an attribute of the request, not an encoded key). Let me know if there is a better key name to use

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 17, 2025
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 17, 2025
@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 36.61%. Comparing base (87f51ec) to head (3449397).
Report is 131 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1755      +/-   ##
==========================================
+ Coverage   35.83%   36.61%   +0.77%     
==========================================
  Files          63       63              
  Lines        3759     4534     +775     
==========================================
+ Hits         1347     1660     +313     
- Misses       2268     2731     +463     
+ Partials      144      143       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@benjaminapetersen benjaminapetersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me.
@aramase or @enj for 👀.

@enj
Copy link
Contributor

enj commented Feb 20, 2025

/assign aramase

Rationale in linked issue seems reasonable but will defer to Anish since he is more familiar with CSI.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: micahhausler
Once this PR has been reviewed and has the lgtm label, please ask for approval from aramase. For more information see the Code Review Process.

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

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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 8, 2025
@micahhausler micahhausler force-pushed the volume-id-attr branch 2 times, most recently from 8957259 to 5c3eaa6 Compare April 8, 2025 19:25
Signed-off-by: Micah Hausler <mhausler@amazon.com>
@micahhausler
Copy link
Member Author

/retry

@k8s-ci-robot
Copy link
Contributor

@micahhausler: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-secrets-store-csi-driver-e2e-provider-k8s-1-29-4 5428978 link true /test pull-secrets-store-csi-driver-e2e-provider-k8s-1-29-4
pull-secrets-store-csi-driver-e2e-provider-k8s-1-30-2 5428978 link true /test pull-secrets-store-csi-driver-e2e-provider-k8s-1-30-2
pull-secrets-store-csi-driver-e2e-provider-k8s-1-28-9 5428978 link true /test pull-secrets-store-csi-driver-e2e-provider-k8s-1-28-9
pull-secrets-store-csi-driver-e2e-windows 3449397 link true /test pull-secrets-store-csi-driver-e2e-windows

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Member

@aramase aramase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look fine!

This can only be merged after we support RequiresRepublish because the rotation controller doesn't have access to the volumeID.

/hold

token could differ between volume mounts (ex: pod1/mount1 uses token1 for credentials in cloud region us-east-1, pod1/mount2 uses the same token1 for credentials in cloud region us-west-2. The AWS provider allows such a configuration)

Isn't it easier for the provider to use the region in this case or other provider specific information another dimension of cache key? The pod uid will be the first dimension.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 16, 2025
@aramase
Copy link
Member

aramase commented Apr 17, 2025

/retitle feat: Add VolumeID to Mount request

@k8s-ci-robot k8s-ci-robot changed the title Add VolumeID to Mount request feat: Add VolumeID to Mount request Apr 17, 2025
@enj enj added this to SIG Auth Apr 29, 2025
@enj enj moved this to Subprojects - Needs Triage in SIG Auth Apr 29, 2025
@aramase aramase moved this from Subprojects - Needs Triage to In Review in SIG Auth Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Supply VolumeID in Mount request attributes
6 participants