fix: treat acme.sh exit 2 as success, not failure #31
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/acme-renew-skip"
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?
acme.sh exits 2 (RENEW_SKIP) when the certificate is still valid and the renewal window has not opened: "Domains not changed. Skipping. Next renewal time is: 2026-11-19". With state now persisted that is the expected outcome of almost every run, and the wrapper failed the Job on any non-zero exit.
The first correctly-skipping run therefore failed, and would have failed every week until November, firing CertRenewalJobFailing and KubeJobFailed for a certificate that was in perfect health. The bug could not exist before #30: without persisted state every run re-issued and exited 0.
0 and 2 are now success, anything else fails. --install-cert runs in both cases, so the Secret is reconciled even when nothing was renewed — which also means a Secret deleted by hand comes back on the next weekly run rather than at the next renewal.