Skip to content

fix(ci): use local kubernetes-json-schema cache for kubeconform#132

Merged
laminair merged 1 commit into
devfrom
fix/kubeconform-local-schemas
Jul 9, 2026
Merged

fix(ci): use local kubernetes-json-schema cache for kubeconform#132
laminair merged 1 commit into
devfrom
fix/kubeconform-local-schemas

Conversation

@laminair

@laminair laminair commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

The retry loop from #130 was insufficient — raw.githubusercontent.com is persistently rate-limiting, causing all 3 retry attempts to fail (see run 28987678542).

Root cause

kubeconform downloads each resource schema individually from raw.githubusercontent.com/yannh/kubernetes-json-schema/... at validation time. With 41 rendered resources, this hits GitHub's rate limit on the raw content CDN.

Fix

Download the entire kubernetes-json-schema tarball once (a single HTTP request via github.com/.../archive/, served through a different CDN — not subject to the same rate limits), extract it locally, and use -schema-location to point kubeconform at the local files. Zero HTTP requests during validation.

Replaces the retry loop with a single curl --retry 5 for the tarball download.

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

The retry loop from #130 was insufficient — raw.githubusercontent.com
is persistently rate-limiting, causing all 3 attempts to fail.

Instead, download the kubernetes-json-schema tarball once (a single
request via github.com/.../archive/ CDN, not subject to the same
rate limits) and point kubeconform at local files with -schema-location.
This eliminates all per-resource HTTP downloads at validation time.
@laminair
laminair force-pushed the fix/kubeconform-local-schemas branch from 3170c46 to f0b5456 Compare July 9, 2026 01:53
@laminair
laminair merged commit e68ad08 into dev Jul 9, 2026
7 checks passed
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

Successfully merging this pull request may close these issues.

1 participant