-
Notifications
You must be signed in to change notification settings - Fork 51
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
Only skip PVC creation if --namespace-mapping flag is not used #565
Merged
xing-yang
merged 2 commits into
vmware-tanzu:main
from
varunsrinivasan2:namespace-mapping-create-pvc
Feb 22, 2024
Merged
Only skip PVC creation if --namespace-mapping flag is not used #565
xing-yang
merged 2 commits into
vmware-tanzu:main
from
varunsrinivasan2:namespace-mapping-create-pvc
Feb 22, 2024
Conversation
This file contains 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
Signed-off-by: Varun Srinivasan <[email protected]>
The change looks right. Please add testing results and add release notes. |
deepakkinni
reviewed
Feb 20, 2024
varunsrinivasan2
changed the title
[WIP] Only skip PVC creation if --namespace-mapping flag is not used
Only skip PVC creation if --namespace-mapping flag is not used
Feb 20, 2024
…s a parameter Signed-off-by: Varun Srinivasan <[email protected]>
deepakkinni
approved these changes
Feb 22, 2024
xing-yang
approved these changes
Feb 22, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
lipingxue
pushed a commit
to lipingxue/velero-plugin-for-vsphere
that referenced
this pull request
Mar 11, 2024
…e-tanzu#565) * Only skip PVC creation if --namespace-mapping flag is not used Signed-off-by: Varun Srinivasan <[email protected]> * Refactor SkipPVCCreation function signature to add target namespace as a parameter Signed-off-by: Varun Srinivasan <[email protected]> --------- Signed-off-by: Varun Srinivasan <[email protected]>
lipingxue
pushed a commit
to lipingxue/velero-plugin-for-vsphere
that referenced
this pull request
Mar 11, 2024
…e-tanzu#565) * Only skip PVC creation if --namespace-mapping flag is not used Signed-off-by: Varun Srinivasan <[email protected]> * Refactor SkipPVCCreation function signature to add target namespace as a parameter Signed-off-by: Varun Srinivasan <[email protected]> --------- Signed-off-by: Varun Srinivasan <[email protected]> Signed-off-by: Liping Xue <[email protected]>
lipingxue
added a commit
that referenced
this pull request
Mar 11, 2024
* Update support matrix for Vanilla, WCP and GC. (#559) Signed-off-by: Liping Xue <[email protected]> * Document change to update known issue. (#560) * Document change. Signed-off-by: Liping Xue <[email protected]> * Address comment from Xing. Signed-off-by: Liping Xue <[email protected]> * Remove files that are not needed for this change. Signed-off-by: Liping Xue <[email protected]> --------- Signed-off-by: Liping Xue <[email protected]> * Bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#562) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0. - [Commits](golang/crypto@v0.14.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Liping Xue <[email protected]> * Update document. (#566) Signed-off-by: Liping Xue <[email protected]> * Modify parsing behavior of login credentials to handle Go escape characters (#564) * Signed-off-by: Varun Srinivasan <[email protected]> Create common config and new function to parse config data * Always populate "port" key of parameters map after setting default VC port if config port value is empty Signed-off-by: Varun Srinivasan <[email protected]> * Clean up test logging and unit tests Signed-off-by: Varun Srinivasan <[email protected]> * Keep only necessary config values Signed-off-by: Varun Srinivasan <[email protected]> * Refactor ParseConfig to return error for sanitized error handling Signed-off-by: Varun Srinivasan <[email protected]> --------- Signed-off-by: Varun Srinivasan <[email protected]> Signed-off-by: Liping Xue <[email protected]> * Only skip PVC creation if --namespace-mapping flag is not used (#565) * Only skip PVC creation if --namespace-mapping flag is not used Signed-off-by: Varun Srinivasan <[email protected]> * Refactor SkipPVCCreation function signature to add target namespace as a parameter Signed-off-by: Varun Srinivasan <[email protected]> --------- Signed-off-by: Varun Srinivasan <[email protected]> Signed-off-by: Liping Xue <[email protected]> * Add doc that wffc is not supported (#567) Signed-off-by: xing-yang <[email protected]> Signed-off-by: Liping Xue <[email protected]> * Fail the Restore if the StorageClass is associated with WaitForFirstConsumer volumeBindingMode (#568) Signed-off-by: Deepak Kinni <[email protected]> Co-authored-by: Deepak Kinni <[email protected]> Signed-off-by: Liping Xue <[email protected]> --------- Signed-off-by: Liping Xue <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Varun Srinivasan <[email protected]> Signed-off-by: xing-yang <[email protected]> Signed-off-by: Deepak Kinni <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Varun Srinivasan <[email protected]> Co-authored-by: Xing Yang <[email protected]> Co-authored-by: Deepak Kinni <[email protected]> Co-authored-by: Deepak Kinni <[email protected]>
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.
What this PR does / why we need it:
When a Velero user uses the
--namespace-mapping
flag, PVC's should be recreated in the target namespace. Velero vSphere Plugin currently skips PVC creation if the PVC already exists in the cluster. The intended behavior of Velero restore is to recreate the PVC in the target namespace even if the PVC already exists in the cluster. This PR will check the Restore CRD and will only skip PVC creation if the user does not restore with the--namespace-mapping
flag.Testing:
Case 1: Logs when namespace mapping flag is used:
Case 2: Logs when namespace mapping flag is not used and backed-up namespace & PVC are deleted:
Case 3: Logs when namespace mapping flag is not used and namespace & PVC exists in cluster:
Which issue(s) this PR fixes:
Fixes #410
vmware-tanzu/velero#7318
Special notes for your reviewer:
Does this PR introduce a user-facing change?: