Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug causing certficates to be re-issued endlessly in certain cases #1280

Merged
merged 3 commits into from
Feb 6, 2019

Conversation

munnerz
Copy link
Member

@munnerz munnerz commented Jan 30, 2019

What this PR does / why we need it:

In instances where the certificate returned from the issuer has a duration different to the one specified on the spec.duration, the IssuerOptions.Helper had its own implementation of the CertificateNeedsRenew function that did not take account of this.

This PR moves the calculateDurationUntilRenew from the certificate controller into the helper, and uses it universally. Previously this method was only being used to schedule renewals, meaning renewal loops could occur.

Which issue this PR fixes: fixes #1214

Release note:

Fix bug causing certficates to be re-issued endlessly in certain edge cases

@jetstack-bot jetstack-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. labels Jan 30, 2019
@jetstack-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: munnerz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jetstack-bot jetstack-bot added the area/acme Indicates a PR directly modifies the ACME Issuer code label Jan 30, 2019
@jetstack-bot jetstack-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 30, 2019
@munnerz munnerz added this to the v0.7 milestone Jan 30, 2019
@munnerz munnerz added this to In progress in v0.7 via automation Jan 30, 2019
@munnerz munnerz moved this from In progress to Needs review in v0.7 Jan 30, 2019
…efore/duration

Signed-off-by: James Munnelly <james@munnelly.eu>
Signed-off-by: James Munnelly <james@munnelly.eu>
Signed-off-by: James Munnelly <james@munnelly.eu>
@DanielMorsing
Copy link
Contributor

/lgtm

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 6, 2019
@jetstack-bot jetstack-bot merged commit 5f67368 into cert-manager:master Feb 6, 2019
v0.7 automation moved this from Needs review to Done Feb 6, 2019
@munnerz munnerz deleted the fix-renewbefore branch February 6, 2019 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/acme Indicates a PR directly modifies the ACME Issuer code dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
No open projects
v0.7
  
Done
Development

Successfully merging this pull request may close these issues.

Certificate scheduled for renewal in -922.793053ms
3 participants