-
Notifications
You must be signed in to change notification settings - Fork 226
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
kubeval doesn't stop if job restartPolicy is wrong #259
Comments
Hi @icy , I would point to my answer here #257 - Kubeval only validates Kubernetes manifests following the Swagger file released by the k8s project. This is not the same validation that kubectl, or the Kubernetes server, would do. In this case it doesnt seem like the list of supported values is a constraint in the swagger file. |
I see. The swagger doesn't provide rich information (e.g, normal Pod can have Always but job doesn't have that value.) Do you think there is any plug-gable way that allows us to have some kustomization checks other than default kubeval checks? |
Not sure if that is what you re looking for, but from the same author as kubeval: https://github.com/open-policy-agent/conftest |
Thanks for the link. We haven't had a chance to implement any OPA-related thing yet, though OPA can help to solve many problems. That's said, implementing our own validations/tests for k8s-server constraints looks like a reinvent-the-wheel job doesn't it? |
it does... I don't know exactly how the Kubernetes Swagger file is generated, but I guess that would be a good place to fix this :) |
I have opened kubernetes/kube-openapi#218 ! I m playing with it but it's not the easiest thing in the world ;) |
Thanks a lot for your time. I totally agree that's not the easiest thing ;) I see that
I don't now how that ends up; you're right the openApi is quite confusing. |
We have some Job configuration and we expect
kubeval
to stop us if developers provide wrong settings. However, kubeval (0.15.0) simply ignored and at the final step we got an error withhelm upgrade
The text was updated successfully, but these errors were encountered: