cloudflare / certmgr

Automated certificate management using a CFSSL CA.
BSD 2-Clause "Simplified" License
218 stars 40 forks source link

ensure should refresh the certificate if it removes them #23

Closed dqminh closed 7 years ago

dqminh commented 7 years ago

Currently when the spec is updated, ensure removes the certificate, but because the provider is loaded before that with a valid certificate still, ensure will not reissue the cert so we have missing certs and have to run ensure again to reissue the cert.

This patch changes it so that whenever we remove any certificate, spec.Ready will return false so we can add the cert into the queue.

dqminh commented 7 years ago

cc @kisom @lziest

There isnt any test :cry: Maybe we should add one, but probably not here.

Bug can be reproduced as: