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

Velero command not throwing and error when schedule hasn't been correctly defined #8214

Open
jeremyvdveen opened this issue Sep 12, 2024 · 3 comments
Labels
Area/CLI related to the command-line interface

Comments

@jeremyvdveen
Copy link

What steps did you take and what happened:

When running the command velero create backup --from-schedule= test I would suspect the command to fail, because there is a space between the = character and the name of the schedule. However, when I run this command Velero just creates a back-up with the name of the schedule as the name of the back-up. This is undesirable in my situation, because it will cause Velero to back-up items that have been excluded in my schedule.

What did you expect to happen:
I would suspect the command to fail, because there is a space between the = character and the name of the schedule.
The following information will help us better understand what's going on:

Environment:

  • Velero version (use velero version):
    Client: v1.14.1
    Server: v1.13.2

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 "I would like to see this bug fixed as soon as possible"
  • 👎 for "There are more important bugs to focus on right now"
@sseago
Copy link
Collaborator

sseago commented Sep 12, 2024

The reason it creates a backup with the name "test" is that test is the only arg given that's not connected to a flag, which is how Velero knows what you want to call the backup. I imagine the fix here would probably be to augment the from-schedule validation to error out if from-schedule is specified but the value is "". I'm not 100% sure that's possible with the cli framework we're using, though -- it might just appear to velero that from-schedule was omitted.

@jeremyvdveen
Copy link
Author

That sounds to me like a good solution, but I can't speak on if that is a supported by the framework that is being used.

@jeremyvdveen
Copy link
Author

An alternative solution might be adding a rule to the Velero server that prevents making back-ups that are not based on a schedule. This rule should than of course be configurable by the admin deploying the server.
If both solutions don't work, than the final solution I can come up with to my specific problem is to have a global list of excluded resources.

@ywk253100 ywk253100 added the Area/CLI related to the command-line interface label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/CLI related to the command-line interface
Projects
None yet
Development

No branches or pull requests

3 participants