Fix cloudflare provider failing on cleanup if no record is found

It's possible for cert-manager to get in a bad state where it thinks there's something to cleanup, but repeatedly fails to clean it up.

Not finding the record should not be an error when we're trying to delete the record anyway.

Signed-off-by: Frank Hamand <frankhamand@gmail.com>
This commit is contained in:
Frank Hamand 2018-08-21 09:53:58 +01:00
parent 972f86704d
commit 8b28b5adce

View File

@ -121,6 +121,10 @@ func (c *DNSProvider) CleanUp(domain, token, keyAuth string) error {
}
record, err := c.findTxtRecord(fqdn)
// Nothing to cleanup
if err == errNoExistingRecord {
return nil
}
if err != nil {
return err
}