Files
Simon Law 8327e27bfa util/def: add functions that provide defaults for envvars
This patch adds def.Getenv and def.GetenvBool to provide defaults for
environment variables that are unset or blank or invalid. This
replaces the implementations of defaultEnv and defaultBool in
cmd/containerboot and cmd/k8s-operator.

However, the implementation of defaultBool in cmd/k8s-operator was
actually buggy and wouldn’t fall back to the default if the
environment contained a non-boolean value. This patch fixes this.

Updates #20018

Signed-off-by: Simon Law <[email protected]>
2026-06-16 16:56:39 -07:00
..