-
Notifications
You must be signed in to change notification settings - Fork 342
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
Explain why and how to isolate the cert-manager workloads #1331
Explain why and how to isolate the cert-manager workloads #1331
Conversation
✅ Deploy Preview for cert-manager-website ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Signed-off-by: Richard Wall <richard.wall@venafi.com>
1f0abd9
to
faeaf0e
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.
Thanks for working on this, @wallrj!
We simply use https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector to schedule cert-manager workloads to dedicated platform nodes. I think that should be included as the simplest way of achieving the desired goal. The examples you have put up are simpler to express with nodeselector
, I think?
Signed-off-by: Richard Wall <richard.wall@venafi.com>
…ages Signed-off-by: Richard Wall <richard.wall@venafi.com>
Done. I agree that nodeSelector is much simpler and works the same as nodeAffinity so I've changed it. |
Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com> Signed-off-by: Richard Wall <wallrj@users.noreply.github.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.
I am not an expert in this area, but why do we need tolerations in addition to the nodeSelector? Looks like a duplication to me, and according to https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector, just the nodeSelector should be sufficient. And this setup works well for us.
Signed-off-by: Richard Wall <richard.wall@venafi.com>
I'm not an expert either, but I guess one reason is:
How do you prevent this happening in your cluster?
I will make it clearer that there are various solutions to this problem and that this is only one suggestion. |
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.
A really useful addition. Had a quick read and looks good to me and seems better to have this live now and correct anything later if needed.
Great contribution, @wallrj! The documentation sounds correct. A minor remark, I do not recognise |
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.
/lgtm
Very nice addition to the docs, @wallrj
@erikgb: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this:
Instructions 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/test-infra repository. |
No idea, but I can check. 😉 We run on Openshift, and it's usually pretty "secure by default". |
I think this is handled by some Openshift "magic" described here. When a normal user, without write access to namespace resources, schedules a workload, the pod will always get a "worker" label added to the pod nodeSelector. Since none of our nodes matches worker + something else, it means that all end-user workloads will be scheduled on worker nodes. Or not scheduled at all - if a user tries to set |
Signed-off-by: Richard Wall <richard.wall@venafi.com>
Thanks @schelv for the suggestion. 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.
/lgtm
/approve
/hold
There's a reasonable looking comment just been added, so I've added a hold if you want to incorporate that suggestion. Ping me for a re-review if needed!
/hold cancel |
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: erikgb, hawksight, SgtCoDFish 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 |
Thanks for all your documentation reviews Peter, for example: * cert-manager#1344 * cert-manager#1338 * cert-manager#1331 We'd like you to be able to `lgtm` future PRs, so we're adding you to the reviewers list. Signed-off-by: Richard Wall <richard.wall@venafi.com>
Thanks for all your documentation reviews Peter, for example: * cert-manager#1344 * cert-manager#1338 * cert-manager#1331 We'd like you to be able to `lgtm` future PRs, so we're adding you to the reviewers list. Signed-off-by: Richard Wall <richard.wall@venafi.com>
Preview: https://deploy-preview-1331--cert-manager-website.netlify.app/docs/installation/best-practice/#isolate-cert-manager-on-dedicated-node-pools
Followup to #1330
Fixes: cert-manager/cert-manager#5211
In this PR I want to give an example of how to use the affinity and toleration Helm values
and I propose running the cert-manager Pods on dedicated "platform" nodes,
for security reasons, but there may be other good use cases.
@erikgb Please take a look