Skip to content

Latest commit

 

History

History
90 lines (73 loc) · 5.57 KB

README.md

File metadata and controls

90 lines (73 loc) · 5.57 KB

Operational scripts

Go commands and Bash scripts that check this repository or operate the platform. They fall into three groups, and only the first is meant for a contributor's machine.

Checks you can run without a cluster or credentials

Run these from the repository root. Each reads only files in your checkout. You need Go (the version in go.mod); the first run may download the Go modules the commands use. All but the last take a few seconds.

Check What it catches
validate-embedded-json Broken JSON inside a ConfigMap, which schema checks read as plain text.
validate-homepage-bookmarks Homepage links without HTTPS or an icon, duplicate or colliding groups, and missing config files.
validate-feature-flags Invalid feature-flag definitions.
validate-talos-kubernetes-compatibility A Kubernetes version the pinned Talos version does not support.
guard-bash-local-initialization Bash functions that read a local variable before setting it.
guard-consumer-discovery-conservation.sh Disagreement between two views of what production deploys. Also needs kubectl, yq v4 and realpath; takes about half a minute, and its fixture test a few minutes.

Most scripts have a regression test: a Go test beside the command (go test ./scripts/<name>) or a test-*.sh file in tests/. Validation covers the manifest checks, and .github/workflows/ci.yaml shows which checks CI runs for which paths.

Tools that support other checks

Operator procedures and experiments

These read or change the running platform, or use its credentials. Do not run them as part of a contribution. They are documented for the maintainer and as a record of how a procedure works.

Consumer discovery conservation

guard-consumer-discovery-conservation.sh compares the publish-revision report's file scan with the production overlay and every Flux root it names. It renders locally with kubectl kustomize; it uses no cluster, credentials or network. Run the guard and its fixture regressions from the repository root:

bash scripts/guard-consumer-discovery-conservation.sh
bash scripts/tests/test-guard-consumer-discovery-conservation.sh

The comparison requires the KSail-generated platform artifact and its current latest reference. An omitted or empty OCI reference uses Flux's latest default; explicit semver or digest selection, and patches selecting another reference, cannot attest this checkout. Tenant sources retain their own references. The guard also refuses suspended production roots and paths that resolve outside the published k8s/ tree, including symlink escapes.

Non-empty ResourceSet resourcesTemplate strings, including step templates, are refused because their controller evaluates them after this static render. For OCI-templating kro ResourceGraphDefinitions, the guard counts instances by schema group (default kro.run), API version and kind. Unrelated resources with the same kind remain valid peers; a matching instance requires runtime consumer discovery that this check does not provide.

A passing guard proves agreement for this repository's supported static declarations. It does not prove production convergence or discover objects inside tenant artifacts, Helm charts or controller-generated templates. Unknown input fails the check; it is never treated as an empty agreeing set.

Reference semantics: Flux OCI references, Flux root paths and suspension, ResourceSet templates, and kro schema GVK.