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 Kubernetes validation instead of writing logic #80

Open
mateusoliveira43 opened this issue Sep 11, 2024 · 0 comments
Open

Use Kubernetes validation instead of writing logic #80

mateusoliveira43 opened this issue Sep 11, 2024 · 0 comments
Assignees

Comments

@mateusoliveira43
Copy link
Contributor

We currently check for nil NAB backupSpec in code

if nonAdminBackup.Spec.BackupSpec == nil {
return nil, fmt.Errorf("BackupSpec is not defined")
}

instead of using Kubernetes API validation. To achieve this, we just need to remove omitempty here

BackupSpec *velerov1api.BackupSpec `json:"backupSpec,omitempty"`

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

No branches or pull requests

2 participants