- Ya
- 27 Aprili 2026, 05:09 UTC
- Mwandishi
- Kamo
- Ahadi ya
- 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.