Skip to content
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

[CSI Plugin] Make VolumeSnapshotClass label optional #5833

Closed
rnarenpujari opened this issue Feb 6, 2023 · 4 comments · Fixed by vmware-tanzu/velero-plugin-for-csi#173
Closed
Assignees
Labels
Area/CSI Related to Container Storage Interface support backlog kind/requirement
Milestone

Comments

@rnarenpujari
Copy link

Describe the problem/challenge you have
As a prerequisite to taking a backup with CSI snapshots, we are required to manually label a volume snapshot class with velero.io/csi-volumesnapshot-class: "true" for every every csi driver being used. This seems to be needed in order to disambiguate with class to use in case there are multiple for the same driver.

Describe the solution you'd like
It would be nice to have zero configuration since in the common scenario there is probably only a single snapshot class per driver. Even if there are multiple, we could have some arbitrary selection criteria (random, oldest resource, sorted on name, etc.) by default and then allow the user to use the label for more precise behavior.

Anything else you would like to add:
Relevant code

Environment:

  • Velero version (use velero version): 1.10.0
  • Kubernetes version (use kubectl version):
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

  • 👍 for "The project would be better with this feature added"
  • 👎 for "This feature will not enhance the project in a meaningful way"
@reasonerjt reasonerjt added Area/CSI Related to Container Storage Interface support kind/requirement labels Feb 6, 2023
@draghuram
Copy link
Contributor

You may be interested in #5774. In general, it is better to pick volume snapshot class in a deterministic manner.

@reasonerjt
Copy link
Contributor

Likely a dup of #5750

@reasonerjt
Copy link
Contributor

This is not a dup b/c the requirement looks for zero-configuration, however, user will need to create a vsClass anyway.

Per discussion with @rnarenpujari , this is a good-to-have but not very high priority.

@reasonerjt
Copy link
Contributor

It should be do-able that we fall back to the vsClass as long as there is no ambiguity

@reasonerjt reasonerjt added this to the v1.12 milestone Apr 24, 2023
reasonerjt added a commit to reasonerjt/velero-plugin-for-csi that referenced this issue May 11, 2023
When there's only one VolumeSnaphostClass that matches the
provisoner, the plugin will choose it for snapshot disregarding whether
it has the label or not.

Fixes vmware-tanzu/velero#5833

Signed-off-by: Daniel Jiang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/CSI Related to Container Storage Interface support backlog kind/requirement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants