You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was investigating using this instead of kubeval for a project. Scanning multi-document files I end up with errors that are not present if we split up the file into single document files.
eg:
dev.yaml - Deployment ***** failed validation: error unmarshalling resource: error converting YAML to JSON: yaml: did not find expected key
dev.yaml - Deployment ***** is invalid: kind must be one of the following: "Deployment"
dev.yaml - HorizontalPodAutoscaler ***** failed validation: error unmarshalling resource: error converting YAML to JSON: yaml: line 9: did not find expected '-' indicator
dev.yaml - Deployment ***** failed validation: error unmarshalling resource: error converting YAML to JSON: yaml: line 4: did not find expected key
dev.yaml - Deployment ***** is invalid: apiVersion must be one of the following: "apps/v1" - kind must be one of the following: "Deployment" - selector is required
dev.yaml - failed validation: error while parsing: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type struct { APIVersion string "yaml:\"apiVersion\""; Kind string "yaml:\"kind\""; Metadata struct { Name string "yaml:\"name\""; Namespace string "yaml:\"namespace\""; GenerateName string "yaml:\"generateName\"" } "yaml:\"Metadata\"" }
dev.yaml - StatefulSet ***** is invalid: apiVersion must be one of the following: "apps/v1" - kind must be one of the following: "StatefulSet" - selector is required - template is required - serviceName is required
dev.yaml - Job ***** is invalid: apiVersion must be one of the following: "batch/v1" - kind must be one of the following: "Job" - template is required
dev.yaml - Job ***** failed validation: error unmarshalling resource: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type map[string]interface {}
The text was updated successfully, but these errors were encountered:
Hi @chicocvenancio , multi-files are supported , and should also be automatically tested... do you think you could share a minimal version of a multi-resource document that causes these failures, as well as the command you use to validate? Many thanks for the bug report!
Closing for lack of infos - please reopen a new issue with the file that is failing! The acceptance tests do test a variety of Multi-document YAML files such as https://github.com/yannh/kubeconform/blob/master/fixtures/multi_valid.yaml and other multi* in the same folder - so this should work. I would be really interested in examples of files on which kubeconform fails! Thanks
I was investigating using this instead of kubeval for a project. Scanning multi-document files I end up with errors that are not present if we split up the file into single document files.
eg:
The text was updated successfully, but these errors were encountered: