-
Notifications
You must be signed in to change notification settings - Fork 134
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
Exclude manifests for deprecated object versions #20
Comments
Similar issue in kubeval repo: instrumenta/kubeval#189 |
@garethr do you have an opinion on this one? |
I would be interested in some way to tell deprecated manifests apart from normal ones for a certain Kubernetes version - it would be great to have some input here :) |
I came here for the exact same use-case. Have been suggesting some ideas in the kubeval repo. Having an explicit keyword the schema would help. Rather than having to look for the word 'deprecated' in the description string. And the other solution is to have separate folders. But I think deprecation is orthogonal to the type of schema (local, standalone, strict). Having a keyword would prevent doubling the amount of directories for with/without deprecated schema's. Also, not all deprecations have full-caps |
@nicorikken |
Hi there,
We're using
kubeval
to validate manifests, as well as to catch deprecation warnings (before upgrading to the new version of k8s).Unfortunately, as far as I can see, this repository includes deprecated manifests alongside with normal ones, and fires a false negative in case an object is passing a validation but the schema is marked as deprecated.
Example:
when running
kubeval manifest.yml -v1.16.0
I would expect the following manifest to fail thekubeval
checking:since
extensions.v1beta1.Deployment
is not supported in k8s 1.16.0 anymore (it's been moved toapps.v1.Deployment
)However, it passes, since the manifests for all old API groups for Deployment are still present in the repo, e.g.:
Not sure how this can be solved (as it seems coming from actual manifests for 1.16.0 that do have the manifests present), but one obvious solution could be creating a new set of manifest groups (e.g.
v1.16.0-no-deprecated
,v1.17.0-no-deprecated
etc.) with manifests that have aDEPRECATED
string in their description excluded from it:https://github.com/instrumenta/kubernetes-json-schema/blob/master/v1.16.0/deployment-extensions-v1beta1.json#L2
The text was updated successfully, but these errors were encountered: