Use envsubst-compatible \${VAR} syntax in config template + re-render on stale placeholders

Fixkamo-asterisk-support
Shipped
April 27, 2026 at 5:09 AM UTC
Author
Kamo
Commit
29e2217

Pods were CrashLoopBackOff with "config errors: API_KEY is missing or too short" because the config template used literal __API_KEY__ markers that envsubst silently leaves untouched (it only substitutes \$VAR / \${VAR}). The first deploy wrote a placeholder file to **************** on the host, and the init container's "skip if config exists" branch then locked that bad render in place across every subsequent rollout. Two fixes: - configmap-{k1m1,k2m1}.yaml: use \${API_KEY}, \${PHONE_SERVER_ID}, \${AMI_PASSWORD} so envsubst actually performs the substitution. - deployment-{k1m1,k2m1}.yaml: only skip re-render when the existing config has real (non-empty, non-placeholder) values for API_KEY and PHONE_SERVER_ID. Detects the old __VAR__ form, the \${ form, and empty strings. Auto-generated AMI passwords still survive restarts as long as the rest of the file has real content.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing