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

Reuse acme clients to limit use of nonce/directory/accounts endpoints #1265

Merged
merged 2 commits into from
Jan 25, 2019

Conversation

DanielMorsing
Copy link
Contributor

What this PR does / why we need it:
Our controllers would previously generate a new acme client on each sync invocation. This would mean throwing away the anti-replay nonce and directory structure information. Use a very simple cache of acme clients to reduce the number of API calls needed.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged):
fixes #1242

Release note:

Decrease ACME API usage

Daniel Morsing added 2 commits January 24, 2019 14:00
In its current state, this will leak acme clients if issuers are
being changed a lot

Signed-off-by: Daniel Morsing <dmo@jetstack.io>
This is a very in-elegant solution to the problem, but it avoids
having to look at other extant issuers and having background processes.

Signed-off-by: Daniel Morsing <dmo@jetstack.io>
@jetstack-bot jetstack-bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jan 24, 2019
@jetstack-bot jetstack-bot added the area/acme Indicates a PR directly modifies the ACME Issuer code label Jan 24, 2019
@jetstack-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: DanielMorsing

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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 24, 2019
@munnerz
Copy link
Member

munnerz commented Jan 25, 2019

/lgtm

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 25, 2019
@jetstack-bot jetstack-bot merged commit 14431c7 into cert-manager:master Jan 25, 2019
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Caching ACME clients between Sync invocations
3 participants