kubeval
kubeval copied to clipboard
Docker image points to old garethr/kubernetes-json-schema repo
Using the current-latest garethr/kubeval
Docker image (at the moment 0.14.0
) doesn't work with newer schemas from instrumenta/kubernetes-json-schema.
From what I gather from https://github.com/instrumenta/kubeval/issues/135, that is the "official" Docker image for kubeval.
Based on https://github.com/garethr/kubernetes-json-schema/issues/26, and from finding https://kubernetesjsonschema.dev/
in the source, it appears that instrumenta/kubernetes-json-schema should be the place to read schemas from.
For example, using the v1.15.7 schema doesn't currently work:
$ docker run --rm -t -v `pwd`:`pwd`:ro -w `pwd` garethr/kubeval:0.14.0 \
--strict -v 1.15.7 *.yml
1 error occurred:
* Problem loading schema from the network at
https://raw.githubusercontent.com/garethr/kubernetes-json-schema/master/v1.15.7-standalone-strict/deployment.json:
Could not read schema from HTTP, response status is 404 Not Found
From https://github.com/instrumenta/kubernetes-json-schema/issues/11#issuecomment-593599447, a workaround to this issue (and kubernetesjsonschema.dev being outdated) is to add the -s
parameter with the GitHub raw URL: 👍
$ docker run --rm -t -v `pwd`:`pwd`:ro -w `pwd` garethr/kubeval:0.14.0 \
-s https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/ \
--strict -v 1.15.7 *.yml