-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Better user experience for BackupStorageLocation.Spec.Config #7085
Comments
@mateusoliveira43 I don't fully understand. Could you clarify what you want to validate and how your solution fixes that? |
The validation of BSL config fields happens in Velero plugin code (example https://github.com/vmware-tanzu/velero-plugin-for-aws/blob/main/velero-plugin-for-aws/object_store.go#L83). I think would be better to have this validation in yaml (creating a type for BSL CRD). The main advantage would be the ability to users to see the field options with |
I don't quite understand how this could work. |
We should say in the docs, and the doc examples (but maybe From today, sported BSL plugins are aws, gcp and azure, right? These ones should have the fields specified in So, for example: All fields from here https://github.com/vmware-tanzu/velero-plugin-for-aws/blob/main/backupstoragelocation.md should be in |
@mateusoliveira43 one problem with this approach is that it would require any changes to BSL config in a plugin to be coordinated with a core velero PR, and the whole purpose of moving these plugins out of velero main repo (where they were originally located) was to decouple this sort of thing. |
Yes, that would be a problem 😬 |
@mateusoliveira43 |
Follow above steps, can found the config's parameter. Is that still need to told user the details url in plugin repo like
|
Thanks @reasonerjt On the table you added in the steps, its already in the last column (parameters). My suggestion for this would be:
|
@reasonerjt @mateusoliveira43
|
Describe the problem/challenge you have
Today, we do not have yaml validation for
BackupStorageLocation.Spec.Config
velero/pkg/apis/velero/v1/backupstoragelocation_types.go
Lines 30 to 32 in cb5ffe2
And this is on purpose, right? Since Velero has supported and unsupported plugins (and yaml validation does not allow a map with specified and non specified fields).
But I think would be awesome to have yaml validation for the supported ones.
Describe the solution you'd like
I think one way to try to not change much code in Velero, would be adding two fields to BackupStorageLocation:
Spec.SupportedByVelero
: Boolean that indicates if the BSL plugin is supported or not by VeleroSpec.SupportedConfig
: The fields for supported BSL pluginsI searched the code, maybe only changing here
velero/pkg/persistence/object_store.go
Lines 145 to 150 in cb5ffe2
to something like this
could be enough (but this would also change the way users create BSL today).
And another good enhancement, if changing code is not possible at the moment, would be to better point those options in docs. @shubham-pampattiwar explained to me that they are specified here:
But I think this is not mentioned in Velero docs.
Anything else you would like to add:
Not at the moment.
Environment:
Not applicable.
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.
The text was updated successfully, but these errors were encountered: