Skip to content

Environment Variables

Every variable below sets the default for a CLI flag; an explicit flag always overrides the environment. HASTEWARD_-prefixed variables are HASteward's own; unprefixed ones (e.g. KUBECONFIG) are standard tools' variables it honors.

Environment Variable Flag Type Default Description
HASTEWARD_ENGINE --engine, -e string Database engine: cnpg or galera
HASTEWARD_CLUSTER --cluster, -c string Database cluster CR name
HASTEWARD_NAMESPACE --namespace, -n string Kubernetes namespace
HASTEWARD_FORCE --force, -f bool false Override automatic safety refusal for targeted repair. In ambiguous Galera recovery states (divergent UUIDs, split-brain, no clear primary), --donor is required to declare the authoritative source node.
HASTEWARD_BACKUPS_PATH --backups-path string Restic repository path or URL
RESTIC_PASSWORD --restic-password string Restic repository encryption password
HASTEWARD_NO_ESCROW --no-escrow bool false Skip pre-repair escrow backup
HASTEWARD_UNWEDGE --unwedge bool false CNPG deadlock breaker: clear a disposable replica's datadir offline (escrow-gated) to un-freeze a disk-full cluster. Use --dry-run first.
HASTEWARD_WIPE_DATADIR --wipe-datadir bool false Wipe entire datadir on target instance (not just grastate). Forces full SST reseed from donor. Use when local data is irrecoverably corrupted. Requires --force and --instance.
HASTEWARD_FIX_BOOTSTRAP --fix-bootstrap bool false Reconfigure: clear grastate and remove bootstrap config on target instance. Prevents stale local bootstrap behavior during cluster restart.
HASTEWARD_BACKUP_METHOD --method, -m string dump Backup method: dump or native
HASTEWARD_SNAPSHOT --snapshot string latest Restic snapshot ID or 'latest' (for restore)
HASTEWARD_HEAL_TIMEOUT --heal-timeout int 600 Heal wait timeout in seconds
HASTEWARD_DELETE_TIMEOUT --delete-timeout int 300 Delete wait timeout in seconds
KUBECONFIG --kubeconfig string Path to kubeconfig file
HASTEWARD_VERBOSE --verbose, -v bool false Verbose output (debug logging)
HASTEWARD_OUTPUT --output string auto Output format: auto, human, json, jsonl
HASTEWARD_INSTANCE --instance, -i string Target specific instance number
HASTEWARD_DONOR --donor, -d string Explicit donor instance ordinal (declares authoritative source for repair)