feat(acm): add ACM certificate management feature#4554
Open
the-technat wants to merge 30 commits intokubernetes-sigs:mainfrom
Open
feat(acm): add ACM certificate management feature#4554the-technat wants to merge 30 commits intokubernetes-sigs:mainfrom
the-technat wants to merge 30 commits intokubernetes-sigs:mainfrom
Conversation
Contributor
|
Hi @the-technat. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
1fbc015 to
8fd5564
Compare
…r certificate references
…certificate tags cache expiry
…or certificate manager
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Closes #2509
Description
This PR adds support for automatically provisioning ACM certificates based on ingress annotations.
An initial design idea is described in the issue: #2509 (comment).
How it works: see the prepared user-docs for a description of the feature.
I focused on ingress objects in this feature to keep the change "small". But I think most of the Synthesizer / Manager could be reused for implementing the same thing for Gateway API. Maybe as an alternative approach for #4494 (skipping cert-manager and directly manage the cert).
Internals
Some internals not mentioned in the user-facing docs:
Tests
I added unit tests where possible and feasible.
All cases have been manually tested multiple times in a real environment using EKS, PCA, ACM and an intermediate build of the AWS Load Balancer Controller
API rate limiting
To visualize the impact of this feature on API requests I tried collecting the number of API requests that occur per reconciliation attempt of one ingress object.
I took the rates from here: API rate quotas and identified the following ones as used by my feature:
RequestCertificate,ListTagsForCertificate,ListCertificates,DeleteCertificateandDescribeCertificate. All of those operations have a rate-limit of either 5 or 10 queries per second.Here's how often they are called:
ListTagsForCertificate&ListCertificates: one request every minute to rebuild the in-memory cache in the Certificate Discovery part & ACM Tagging ManagerRequestCertificate: at most once per reconciliation. If an existing matching certificate is found we'll use this and rather wait for it's issuance than request another certificate.DescribeCertificate: is used at 3 different places:30stimeout -> at most 6 requested with a5sdelay in-between5mand a minDelay between requests of60sincreasing exponentially up a maxDelay of120sDeleteCertificate: has a retry-mechanism that tries to delete the certificate if one request fails with a retry wait interval of5sand a total timeout of30s-> per certificate there's at most 6 requests with a5sdelay in-betweenIn addition to the ACM API rate quotas the ones for Route53 might also be relevant.
These rates are taken from here: Route53 API request limits.
Here's how often they are called:
ListHostedZones: one request every 5 minutes to rebuild the in-memory cache in the Route53 serviceChangeResourceRecordSets: one request per certificate issue request and one request per certificate deletion attemptChecklist
README.md, or thedocsdirectory)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯