Skip to content

Conversation

@mdzraf
Copy link
Member

@mdzraf mdzraf commented Jul 24, 2024

What type of PR is this?
/kind feature

What this PR does / why we need it:
This PR adds a flag that can be set by the user which will inject extra PVC and PV metadata as parameters when calling ModifyVolume on CSI Drivers. This will enable CSI Drivers to support StorageClass parameters that depend on the extra metadata in modification via VolumeAttributesClass as well.

See doc for more info

Which issue(s) this PR fixes:
N/A

Special notes for your reviewer:
N/A

Does this PR introduce a user-facing change?:

Adds the flag --extra-modify-metadata, which when set to true, will inject extra PVC and PV metadata as parameters when calling ModifyVolume on CSI Drivers

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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 Jul 24, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @mdzraf!

It looks like this is your first PR to kubernetes-csi/external-resizer 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-csi/external-resizer has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 24, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @mdzraf. Thanks for your PR.

I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jul 24, 2024
@ConnorJC3
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 24, 2024
@mdzraf mdzraf changed the title [WIP] Adding extra-metadata flag to external-resizer sidecar [WIP] Add extra-modify-metadata flag to external-resizer sidecar Jul 31, 2024
@mdzraf mdzraf force-pushed the resizerExtraMetadataFeature branch from d9fdd49 to 07dfe61 Compare July 31, 2024 18:12
@mdzraf mdzraf changed the title [WIP] Add extra-modify-metadata flag to external-resizer sidecar Add extra-modify-metadata flag to external-resizer sidecar Jul 31, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 31, 2024
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 16, 2024
@gnufied
Copy link
Contributor

gnufied commented Aug 28, 2024

Can you rebase this PR?

@mdzraf mdzraf force-pushed the resizerExtraMetadataFeature branch from 0f70a09 to 75c51b6 Compare August 28, 2024 19:57
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 28, 2024
@mdzraf
Copy link
Member Author

mdzraf commented Aug 28, 2024

@gnufied I have rebased the PR and all tests have passed, it is ready for review

t.Run(tc.name, func(t *testing.T) {
featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.VolumeAttributesClass, true)
client := csi.NewMockClient("foo", true, true, true, true, true)
client := csi.NewMockClient("foo", true, true, true, true, true, false)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we even using this boolean value anywhere?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also another nit (and not this PRs fault), I am beginning to dislike the endless list of true/false arguments with no idea, what they do. :(

Copy link
Member Author

Choose a reason for hiding this comment

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

That boolean value is not used in most of the tests but I had to make the necessary changes to the MockClient in order to be able to write unit tests for the flag on the TestModify, I did not think it was appropriate to make a new struct to deal with the TestModify tests only, but I could.

I do agree with you on that it is messy to have so many unlabeled booleans, do you have any suggestions?

Copy link
Member Author

Choose a reason for hiding this comment

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

@gnufied Are there any other outstanding concerns with the PR besides this?

@gnufied
Copy link
Contributor

gnufied commented Sep 5, 2024

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 5, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gnufied, mdzraf

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

The pull request process is described 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 5, 2024
@k8s-ci-robot k8s-ci-robot merged commit 7461a0d into kubernetes-csi:master Sep 5, 2024
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants