-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Full rewrite of etcd certificates generation #12180
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
base: master
Are you sure you want to change the base?
Full rewrite of etcd certificates generation #12180
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: VannTen 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 |
c9c3902
to
a2246a0
Compare
3205a72
to
9945db9
Compare
We currently do a lock of back and forth to check if certificates are present on the nodes, whether they need refreshing, etcd. This is neither readable nor performant, and mostly bypass the Ansible control flow for little gains. It also generate all the private keys on the first etcd and then push them to each node, which undermines the security of the whole PKI and prevent usage of non-movable secret (HSM, TPM) (these are still not possible with the new flow but should be easier to add) Instead of creating all certificates on first etcd, do this: - create CA on first etcd - distribute it on every node - create key and Certificate Signing Request on each node which need one (register the CSR as variable) - delegate for each node the CSR signing to the first etcd master and register the certificate as variable for each node - put the signed certificate on each node We don't do accounting of the files per-se, instead relying on changed status to determine the set which needs to be updated.
9945db9
to
dc4d400
Compare
PR needs rebase. 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-sigs/prow repository. |
Hey @VannTen
This is by no means an exhaustive list, but should be helpful anyway Feel free to comment/give feedback/or if I can be of any assistance Thanks and keeping an eye out for this PR |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This is a (WIP) full rewrite of the certificates generation for etcd
The main guiding principles are:
This should have the following benefits:
Out of scope for this PR (but possible follow-ups):
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
This is a work in progress. Roughly :
@ant31 @tico88612
Once this is ready this should not merge before 2.28. It's a big change so I'd rather have some time in master before that.
Does this PR introduce a user-facing change?: