-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Explain how to optimise cert-manager for scale #1458
Explain how to optimise cert-manager for scale #1458
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Deploy Preview for cert-manager-website ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
716fcff
to
131a9ad
Compare
e70bd00
to
6697ab9
Compare
6697ab9
to
f76b760
Compare
f8e361f
to
2617f1c
Compare
```yaml | ||
config: | ||
apiVersion: controller.config.cert-manager.io/v1alpha1 | ||
kind: ControllerConfiguration | ||
kubernetesAPIQPS: 10000 | ||
kubernetesAPIBurst: 10000 | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this YAML supposed to be configured? Is that in the Helm chart?
Ah, this is a "ControllerConfiguration" file. I didn't know cert-manager had a file-based configuration format 😅
Signed-off-by: Richard Wall <richard.wall@venafi.com>
Signed-off-by: Richard Wall <richard.wall@venafi.com>
849e187
to
e859aeb
Compare
@maelvls @hawksight I've simplified the content and removed all the distracting evidence files. |
a99a938
to
6592015
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I enjoyed reading the document. To the point, sticks to the facts, and well sourced, and very well written. Thank you!
It is so good that I'll share this guide on Twitter to talk about cert-manager good practices!
Co-authored-by: Maël Valais <mael@vls.dev> Signed-off-by: Richard Wall <wallrj@users.noreply.github.com>
> 📖 Learn [how to set Certificate defaults automatically](../tutorials/certificate-defaults/README.md), using tools like Kyverno. | ||
|
||
|
||
## Set `revisionHistoryLimit: 1` on all Certificate resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> | ||
> 📖 Learn [how to set `revisionHistoryLimit` when using Annotated Ingress resources](../usage/ingress.md#supported-annotations). | ||
> | ||
> 🔗 Read [`cert-manager#3773`: Certificate revision history limit](https://github.com/cert-manager/cert-manager/pull/3773), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wallrj It is quite hard to find a "why" in that pull request, didn't we discuss in one of our standups that we should update the cert-manager code and set a sane default value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I've replaced that link with cert-manager/cert-manager#3958 so that users can go and vote for that change.
apiVersion: controller.config.cert-manager.io/v1alpha1 | ||
kind: ControllerConfiguration | ||
featureGates: | ||
AllBeta: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this the default? Do we have to specifically enable AllBeta
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, but I cannot find the exact place in the code that says as such.
It can be good to be explicit in whats enable with helm values, but it's a preference choice.
@wallrj - assuming this is default, I'd drop that flag.. OR just add a comment that this is the default for reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Dropped. I think I assumed it necessary, because I saw it in the E2E setup scripts:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easy to read and better docs that what we currently have :)
Left a minor syntax comment.
Also a possible change or clarification on waht @inteon spotted too.
But otherwise I appreciate the links for futher reading / justification. Especially since some of those are to the defaults tutorial 🎉
## Enable Server-Side Apply | ||
|
||
By default, cert-manager [uses Update requests](https://kubernetes.io/docs/reference/using-api/api-concepts/#update-mechanism-update) | ||
to create and modify resources like CertificateRequest and Secret, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to create and modify resources like CertificateRequest and Secret, | |
to create and modify resources like `CertificateRequest` and `Secret`, |
apiVersion: controller.config.cert-manager.io/v1alpha1 | ||
kind: ControllerConfiguration | ||
featureGates: | ||
AllBeta: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, but I cannot find the exact place in the code that says as such.
It can be good to be explicit in whats enable with helm values, but it's a preference choice.
@wallrj - assuming this is default, I'd drop that flag.. OR just add a comment that this is the default for reference.
Signed-off-by: Richard Wall <richard.wall@venafi.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @wallrj, great article.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hawksight, inteon, maelvls 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 |
Preview: https://deploy-preview-1458--cert-manager-website.netlify.app/docs/devops-tips/scaling-cert-manager/
Fixes: #551
Fixes: cert-manager/cert-manager#3971
@maelvls I've written some general guidance for right sizing cert-manager for both large and small clusters.