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

use CRD defaults #100

Open
mateusoliveira43 opened this issue Oct 14, 2024 · 1 comment
Open

use CRD defaults #100

mateusoliveira43 opened this issue Oct 14, 2024 · 1 comment

Comments

@mateusoliveira43
Copy link
Contributor

We should use CRD defaults to highlight what Non Admin objects default values are.

This would also fix problem around updating Non Admin object spec after velero object is created, so users can see the default values used (the fix for this is in Velero repository).

Similar issue with more details openshift/oadp-operator#1557

@mateusoliveira43
Copy link
Contributor Author

Velero repository fix would need MutatingWebhookConfiguration, as default values are not static. But that would not give NAC the solution for free, as that would not be a marker in Velero object types

Example

User can change default TTL
https://github.com/vmware-tanzu/velero/blob/f02613d2f7a7cfbf687f84d1deac7414d679569e/pkg/cmd/server/config/config.go#L37
in CLI
https://github.com/vmware-tanzu/velero/blob/f02613d2f7a7cfbf687f84d1deac7414d679569e/pkg/cmd/server/config/config.go#L241

Possible fix

Try to automate the collecting of defaults applied by Velero
https://github.com/vmware-tanzu/velero/blob/f02613d2f7a7cfbf687f84d1deac7414d679569e/pkg/controller/backup_controller.go#L324
and apply them to NAC objects though our own MutatingWebhookConfiguration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant