checkconfig

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Command checkconfig validates Backyard server configuration files exactly the way `backyard serve` loads them (strict YAML with ${ENV} expansion, environment overrides, defaults and validation, see internal/config), but without needing the real secrets. It keeps the sample configurations shipped under deploy/ in sync with the schema (CI runs it, and its tests cover the samples).

go run ./scripts/checkconfig deploy/systemd/backyard.yaml
go run ./scripts/checkconfig -env BACKYARD_DOMAIN=acme.dev deploy/docker-compose/backyard.yaml
helm template backyard deploy/helm/backyard | go run ./scripts/checkconfig -configmap -

Environment variables referenced as ${VAR} (without a ":-default") that are unset get a placeholder of the right shape for the duration of the check: a domain for *_DOMAIN, a URL for *_URL, a DSN for *_DSN / DATABASE_URL, an rsync target ending in ":" for *RSYNC_TARGET, a name with YAML-special characters for *_NAME (so unquoted references fail) and a 64-character hex string for everything else. BACKYARD_SECRET, which the server reads from the environment directly, gets one too when the file sets no server.secret. Real values passed with -env or present in the environment always win.

With -configmap, the input is a stream of Kubernetes manifests (for example `helm template` output) and the "backyard.yaml" key of every ConfigMap is checked; "-" reads standard input.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL