-
Notifications
You must be signed in to change notification settings - Fork 123
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
kubeconform fails validation on null/empty fields #124
Comments
The above file you added is failing for my schemas, you can see schema in the repo below Before using change $ref field on line 27,31,35 in service-v1.json |
So the OpenShift schema defines that |
@eyarz if that defines, it should not have failed. isn't it? |
@hanzala1234 I forget to add "is not allowed" 🤦♂️. I updated my comment. |
thanks @eyarz . its quite common scenario though that optional field will have null values. is that something where we can have some workaround? |
Service and Deployments are most basic kinds, we cant ignore/skip them because almost all applications contain services & deployments. We arent using it locally, we intend to use it inside a pipeline as a task (extract schema from <cluster_ip>:442/openshift/openapi/v2 endpoint and validate manifests against it). manually fixing doesnt seem right to me Point is these manifests with null / empty fields are created successfully in openshift, so kubeconform shouldnt give an error either. |
Closing as duplicate of #123 |
Problem Description:
We are using a kubeconform to validate manifests generated as a Helm chart in our pipelines. We are using mongodb helm chart that generated a few empty / null fields in a Deployment and Service as below
When I run kubeconform validation
It fails with following error:
This seems weird because while making resources in openshift/kubernetes empty/fields are replaced by defaults and resources are created successfully. We intended to use this in our pipelines for validation, but this makes it unusable since nulls/ empty fields can occur quite frequently.
The text was updated successfully, but these errors were encountered: