Recently we have started to get failures running kubeconform in our automated builds. We get errors like:
error while downloading schema at https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.30.11-standalone-strict/sealedsecret-bitnami-v1alpha1.json - received HTTP status 429
Perhaps github added some new rate limiting logic, I'm not sure why this started failing after it worked for many months.
I tried turning on the cache feature using -cache but it seems like kubeconform might be hitting the server anyway even if we have a file in the cache (maybe validating the cache using ETag / Last-Modified ?).
We actually have all that schemas in a local folder so we don't even need or want to download them from github. It looks like I am able to workaround this by changing the order of the -schema-location arguments to pass default after the local repo.
I do wonder, though, if kubeconform should handle 429 gracefully. I suspect that it is handling status 404/403 for these files by falling back on the additional -schema-location we provide, but with 429 it is hard failing. It could try to use a cached version if found, or wait and retry (although I'm not sure how long it would have to wait for these not found rate limited responses).
Related - could/should the cache remember the 404 response from prior attempts and not try to download for a period of time? That might also help.
Recently we have started to get failures running kubeconform in our automated builds. We get errors like:
Perhaps github added some new rate limiting logic, I'm not sure why this started failing after it worked for many months.
I tried turning on the cache feature using
-cachebut it seems likekubeconformmight be hitting the server anyway even if we have a file in the cache (maybe validating the cache using ETag / Last-Modified ?).We actually have all that schemas in a local folder so we don't even need or want to download them from github. It looks like I am able to workaround this by changing the order of the
-schema-locationarguments to passdefaultafter the local repo.I do wonder, though, if
kubeconformshould handle 429 gracefully. I suspect that it is handling status 404/403 for these files by falling back on the additional-schema-locationwe provide, but with 429 it is hard failing. It could try to use a cached version if found, or wait and retry (although I'm not sure how long it would have to wait for these not found rate limited responses).Related - could/should the cache remember the 404 response from prior attempts and not try to download for a period of time? That might also help.