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

--ignore-missing-schemas ignores all schemas #149

Closed
ian-howell opened this issue Jul 18, 2019 · 1 comment
Closed

--ignore-missing-schemas ignores all schemas #149

ian-howell opened this issue Jul 18, 2019 · 1 comment

Comments

@ian-howell
Copy link
Contributor

The expected behavior of the --ignore-missing-schemas flag should be to validate (or at least report that no action was taken) any resources whose schemas could not be found. The actual behavior is to simply ignore all schemas and report that each document is valid. This means that the only validation that kubeval actually performs is a check for a valid YAML document and valid kind and apiVersion attributes.

The following demonstrates this:

# Without the flag
$ kubeval fixtures/invalid.yaml
The document fixtures/invalid.yaml contains an invalid ReplicationController
---> spec.replicas: Invalid type. Expected: integer, given: string

# With the flag
$ kubeval fixtures/invalid.yaml --ignore-missing-schemas
Warning: Set to ignore missing schemas
The document fixtures/invalid.yaml contains a valid ReplicationController
@garethr
Copy link
Collaborator

garethr commented Jul 20, 2019

Thanks for reporting and fixing in #150.

@garethr garethr closed this as completed Jul 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants