Closed emcniece closed 7 years ago
Resolved race conditions, streamlined template/check/notify flow.
source
and dest
template variables can now be omitted, and the script will simply execute check-cmd
and notify-cmd
accordingly. This is useful in multi-template cases where other scripts need to be called but it is redundant to re-update the destination file. Part of the inspiration for this change is being forced to write to /dev/null
as a destination, while Rancher-Gen attempts to compare this location against the existing source
.
In addition to separating the source/dest templating functions, various other functions were abstracted to allow for independent operation. check-cmd
now properly fails for a given check/notify pair when iterating over containers, and still moves on to the next set in the event of a failure. This change resolves two problems: only running a single notify-cmd
per metadata change, and incessantly repeating notify-cmd
when check-cmd
failed.
This resolves the major issues surrounding checking for certs and requesting new certs from acmetool
.
Minor version bump to 0.5.0
Not ready for merge yet, need to figure out why
notify-cmd
only runs once per metadata update. Safe to use however.