Skip to content

Add --validate-config so the image can check its own config - #68

Merged
nresare merged 1 commit into
mainfrom
validate-config-flag
Aug 26, 2026
Merged

nresare merged 1 commit into
mainfrom
validate-config-flag

Conversation

@ps-pufferfish

Copy link
Copy Markdown

manifest-validator is growing a check that runs an application's own image over the ConfigMap a manifest tree carries, on the grounds that the application is the only thing that can say whether its config means anything. idcat already had the deciding code — Config::load then validate, both pure and offline — with no way to reach it but starting the service.

--validate-config loads the config, validates it and exits: 0 if valid, non-zero with the reason otherwise. No socket is bound, KMS is not reached and GitHub is not contacted. The early return sits ahead of the TLS setup, so nothing is initialised either.

--disable-auth composes with it rather than being ignored under it, because a config that is only valid with auth disabled must not pass a check run without it. That is one of the four tests.

Two things worth a reviewer's eye:

  • Logging is JSON now, so the flag emits a JSON line rather than a plain message. Fine for manifest-validator, which captures stdout and stderr wholesale, but awkward to read when run by hand.
  • The tests do not cover the newly required permissions table on [[installation-policy]], nor [[owner-policy]]. Config::validate enforces both; these tests just don't exercise them.

cargo test --workspace (85 tests), cargo fmt --check and cargo clippy --workspace --all-targets all pass locally.

manifest-validator is growing a check that runs an application's own image over
the ConfigMap a manifest tree carries, because the application is the only thing
that can say whether its config means anything. idcat already had the deciding
code — Config::load then validate, both pure and offline — with no way to reach
it but starting the service.

--disable-auth composes with the flag rather than being ignored under it: a
config that only validates with auth disabled must not pass a check run without.
@ps-pufferfish
ps-pufferfish requested a review from nresare August 26, 2026 12:59
@nresare
nresare merged commit 38c3b90 into main Aug 26, 2026
2 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.

3 participants