-
Notifications
You must be signed in to change notification settings - Fork 229
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 fails for validation #18
Comments
Unfortunately in both these cases the schema doesn't contain the information required to do validation of values, or rather it's included as text in the description field: For the and for In the case of "enum": ["ExternalName", "ClusterIP", "NodePort", "LoadBalancer"] Name should validate the DNS_RECORD with the regex from the source "regex": "[a-z0-9]([-a-z0-9]*[a-z0-9])?" This might be a limitation of OpenAPI 2.0, or of the go-openapi library. I'll open an issue to track upstream. |
I am trying to use kubeval library in my project. Throws the following error :
Whats could be the reason for the failure? am I calling the validate function in the right way? the deployment file is valid: |
Posted to SIG API Machinery to check my assumptions on this https://groups.google.com/forum/#!topic/kubernetes-sig-api-machinery/Q9tGqhV4ZNA |
nice 👍 |
kubernetes/kubernetes#24562 is the upstream issue for enums and kubernetes/kubernetes#8116 is the relevant issue for regexes. Ideally this will be fixed here and then autogenerating the schemas will do the right thing. |
@garethr , if we add something like |
@surajnarwade correct. See the code in #32 and the discussion in #24. I don't think this affects the issue above however. |
@garethr yeah, thanks, this will not affect this issue though |
here is sample service file,
after running kubeval, it shows valid, but it's not
The text was updated successfully, but these errors were encountered: