feat: add help, init, completion and conf-file URL resolution #6
Reference in New Issue
Block a user
Delete Branch "benvin/encapic-init-help"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
encapic only reads
ENCAPI_URLfrom the environment or the shim, so operators have no per-user config, help or completion, and a set-testing host stays intestinguntil the next terragrunt-enc apply.help,init(writes the user conf, defaulting tohttps://encapi.k8s.syd1.au.unkin.net, offers completion) andcompletion bash|zsh [--install]unset-testing <certname>restoring the pre-testing environment~/.config/encapi>/etc/encapi>/etc/encapicconf > compiled default/etc/encapic/encapic.conf(config|noreplace); ship completion scriptsunset-testing requires unkin/encapi#11 deployed.
/etc/encapi/encapic.conf(packaged default), and it outranks the puppet-managed/etc/encapic/encapic.confin both the shim (sourced last) and the binary (checked first). The hiera URL gets silently ignored on every upgraded host, so the legacy fallback never takes effect → drop the conf move from this PR, or give the legacy path precedence until puppet manages the new path.config|noreplacedst orphans the old file on upgrade: rpm renames a modified/etc/encapic/encapic.confto.rpmsave, or deletes it if unmodified, so masters fall back to the packaged default until puppet runs again → keep dst/etc/encapic/encapic.conf, or move it in its own PR after the puppet change lands.--help/unknown-flag rejection (the stated why)encapic initencapic completion+ RPM completion files/etc/encapic→/etc/encapipath move (not in the why; needs puppet coordination)initDefaultURL = "https://encapi"differs from the packagedhttps://encapi.k8s.syd1.au.unkin.net→ use the packaged URL.initDefaultURL = "https://encapi"fails TLS (curl: (60) no alternative certificate subject name matches target hostname 'encapi'), so accepting theinitdefault writes a broken conf → default tohttps://encapi.k8s.syd1.au.unkin.net(update config_test.go:74,97)ENCAPI_URL→ reword to describe what the shim actually doesNo findings.