Skip to content

Add offline schema support for reproducibility / hermeticity - #3

Open
aw1cks wants to merge 4 commits into
tepea-code:mainfrom
aw1cks-forks:feat/configurable-offline-schemas
Open

aw1cks wants to merge 4 commits into
tepea-code:mainfrom
aw1cks-forks:feat/configurable-offline-schemas

Conversation

@aw1cks

@aw1cks aw1cks commented Sep 11, 2026

Copy link
Copy Markdown

Hi, thanks for this project! Great idea, solves a very painful problem.

I started to incorporate it into my Nix config, where I already have all my schemas tracked as flake inputs, so I made a few changes that I thought might be useful to others - let me know what you think.

  • Make the k8s schema version configurable with --kubernetes-version
    • Bump the default to v1.36 too
  • Allow pre-populated schemas via --schema-dir
    • This also makes it easier to provide custom CRDs
  • Add an --offline flag to disable downloads and only use local schemas

Main motivation here is supporting hermetic schema inputs, and increasing flexibility without needing code changes.

Add a --kubernetes-version command-line option and pass the selected version to both built-in and CRD detectors.

Document the option and its required upstream registry format so editor configurations can target a specific Kubernetes release.
Update the built-in Kubernetes schema release to v1.36.0.

Keep the CLI help and usage examples aligned with the default, which is available in the upstream strict standalone schema registry.
Add --schema-dir for downloaded and user-provided schema files while keeping generated composite and CRD wrapper files in the platform cache.

Cover both lookup and composite generation so local schemas remain reusable without generated artifacts being written beside them.
Add --offline to prohibit schema downloads while continuing to use local schemas and generated composite cache files.

Return a distinct missing-local-schema error so Kubernetes detectors can emit explicit warnings and leave only unavailable resources unmapped. Document the expected local registry layout and warning behavior.
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