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

Not returning an error in case of non limited custom resource #564

Closed
prometherion opened this issue May 16, 2022 · 0 comments · Fixed by #565
Closed

Not returning an error in case of non limited custom resource #564

prometherion opened this issue May 16, 2022 · 0 comments · Fixed by #565
Assignees
Labels
bug Something isn't working
Milestone

Comments

@prometherion
Copy link
Member

Actually, we're not discriminating upon the error of parsing the limit for custom resources.

https://github.com/clastix/capsule/blob/8c0c8c653d473ae946b46c1b10c3a1fee10f65ae/pkg/webhook/tenant/custom_resource_quota.go#L79-L81

The function capsulev1beta1.GetLimitResourceFromTenant can return an error due to parsing, or because the resource is not limited, and we should do proper error validation.

https://github.com/clastix/capsule/blob/8c0c8c653d473ae946b46c1b10c3a1fee10f65ae/api/v1beta1/custom_resource_quota.go#L36-L39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant