Copy StorageClass and AccessMode to cloneConfig on volume cloning#1168
Open
zzzanziber wants to merge 1 commit into
Open
Copy StorageClass and AccessMode to cloneConfig on volume cloning#1168zzzanziber wants to merge 1 commit into
zzzanziber wants to merge 1 commit into
Conversation
Ensure that during volume cloning, target StorageClass and AccessMode from volumeConfig are copied onto cloneConfig if they are specified, so that the metadata in the TridentVolume CR remains in sync with the Kubernetes PV state. Fixes NetApp#1162
Changelog label requiredThis PR must have exactly one changelog label before it can merge:
PR author or collaborator: comment on this PR with one of:
Maintainers may also set Merge is blocked only until one of these labels is set — release note or rationale text in the PR description is encouraged but not required to merge. |
Contributor
|
If you wish to contribute to Trident please complete the necessary steps outlined in the CONTRIBUTING.md file, including the signed CCLA. Sign and submit NetApp's Contributor License Agreement. You must sign and submit the Corporate Contributor License Agreement (CCLA) in order to contribute. |
Author
|
Done. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change description
Copy StorageClass and AccessMode to cloneConfig on volume cloning
Ensure that during volume cloning, target StorageClass and AccessMode from volumeConfig are copied onto cloneConfig if they are specified, so that the metadata in the TridentVolume CR remains in sync with the Kubernetes PV state.
Fixes Issue #1162
Project tracking
This is an upstream open-source contribution to the NetApp Trident repository and does not track against internal JIRA.
Do any added TODOs have an issue in the backlog?
No.
Did you add unit tests? Why not?
Yes, added
TestCloneVolume_CrossStorageClassAndAccessModeincore/orchestrator_core_test.goto assert that bothStorageClassandAccessModeare correctly inherited by the clone configuration when cloning a volume.Does this code need functional testing?
No. The logic is fully validated by the added unit tests in the orchestrator core.
Is a code review walkthrough needed? why or why not?
No. The change is simple and localized, only copying two string fields from
volumeConfigontocloneConfigduring the clone configuration build stage.Should additional test coverage be executed in addition to pre-merge?
No.
Does this code need a note in the changelog?
Changelog
Fixed volume cloning to ensure the clone inherits the target
StorageClassandAccessModewhen specified.Does this code require documentation changes?
No. This fixes a bug where metadata became out-of-sync; the expected behavior remains the same.
Additional Information