Open dombisza opened 3 years ago
Not isolated to ingress: Failed initializing schema https://kubernetesjsonschema.dev/master-standalone/certificate-cert-manager-v1.json: Could not read schema from HTTP, response status is 404 Not Found
Likewise. I can use versions that appear on main page https://kubernetesjsonschema.dev
But for example I can't specify various 1.20.x patches (or anything 1.20 for that matter) or 1.19 or the like
Will there be a patch soon? Or is there a workaround?
For newer versions of Kubernetes, try using kubeval with my fork of the json schema repos: https://github.com/yannh/kubernetes-json-schema See README for how to use those with kubeval. It contains schemas for all versions of Kubernetes post 1.15.
This should solve the errors related to Kubernetes versions.
Things such as certificate-cert-manager-v1.json I believe are CRDs from https://github.com/jetstack/cert-manager , and a different problem?
For newer versions of Kubernetes, try using kubeval with my fork of the json schema repos: https://github.com/yannh/kubernetes-json-schema See README for how to use those with kubeval. It contains schemas for all versions of Kubernetes post 1.15.
This should solve the errors related to Kubernetes versions.
Things such as certificate-cert-manager-v1.json I believe are CRDs from https://github.com/jetstack/cert-manager , and a different problem?
@yannh Nice work! Wondering if you tried getting your changes merged to this repo. It would be nice to have only one place to refer. That being said I don't know what's the process of merging PRs here, as I can see lots of them still unmerged.
As noted above to use newer schemas use command like below
kubeval --schema-location https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master -d mydirectory
Thank you @jeremybusk and @yannh 🚀
For a long lasting fix, I applied an alias:
alias kubeval="kubeval --schema-location https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master "
I've tried applying the fix:
for file in $(find ./output -type f -iname '*.y*ml'); do
kubeval --schema-location https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master $file --strict
done
I'm getting:
1 error occurred:
* Failed initalizing schema https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone-strict/ingress-networking-v1.json: Get https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone-strict/ingress-networking-v1.json: EOF
1 error occurred:
* Failed initalizing schema https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone-strict/service-v1.json: Get https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone-strict/service-v1.json: EOF
1 error occurred:
* Failed initalizing schema https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone-strict/deployment-apps-v1.json: Get https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone-strict/deployment-apps-v1.json: EOF
1 error occurred:
* Failed initalizing schema https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone-strict/cronjob-batch-v1.json: Get https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone-strict/cronjob-batch-v1.json: EOF
Am I doing anything wrong?
For newer versions of Kubernetes, try using kubeval with my fork of the json schema repos: https://github.com/yannh/kubernetes-json-schema See README for how to use those with kubeval. It contains schemas for all versions of Kubernetes post 1.15.
This should solve the errors related to Kubernetes versions.
Things such as certificate-cert-manager-v1.json I believe are CRDs from https://github.com/jetstack/cert-manager , and a different problem?
thanks! this is very helpful
For anyone stumbling upon this: Since october 2022, the readme states that this project is unmaintained and recommends kubeconform
instead.
hello there, i was trying to validate ingresses, but I cannot do so because the schema URL gives me 404.
Am i doing something wrong here? Thanks for the help in advance.