-
Notifications
You must be signed in to change notification settings - Fork 462
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
[GEP-18] Introduce dedicated client CA for shoot clusters #5779
Conversation
/test pull-gardener-publish-test-images |
/test ? |
@timebertt: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
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. |
/test pull-gardener-publish-test-images |
/test pull-gardener-e2e-kind |
/retest-required |
Just a small typo in the release note. I guess it should be |
Thanks @plkokanov, fixed |
/lgtm |
/assign |
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. As discussed, only nits :)
For backwards-compatibility reasons, the client CA is the same like the cluster CA for existing clusters. For new clusters, a CA certificate different from the cluster CA shall be generated right away. This is why we have to generate the client CA first and cannot simply add the certificate secret config to the `b.wantedCertificateAuthorities` map because the generation order is randomized. Otherwise, if the `ca` secret is generated before `ca-client` then the cluster CA certificate would be adopted (which is not what we want for new clusters).
KCM always uses the current client CA secret which is used to sign new client certificates.
@rfranzke: The following test failed, say
Full PR test history. Your PR dashboard. Command help for this repository. 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. I understand the commands that are listed here. |
/test pull-gardener-e2e-kind |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: timebertt 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 |
) * Introduce new client CA certificate for shoots For backwards-compatibility reasons, the client CA is the same like the cluster CA for existing clusters. For new clusters, a CA certificate different from the cluster CA shall be generated right away. This is why we have to generate the client CA first and cannot simply add the certificate secret config to the `b.wantedCertificateAuthorities` map because the generation order is randomized. Otherwise, if the `ca` secret is generated before `ca-client` then the cluster CA certificate would be adopted (which is not what we want for new clusters). * Adapt `kubeapiserver` component to use client CA * Adapt `kubecontrollermanager` component to use client CA KCM always uses the current client CA secret which is used to sign new client certificates. * Adapt `kubescheduler` component to use client CA * Sign client certificates by new client CA * Address PR review feedback
How to categorize this PR?
/area security
/kind enhancement
What this PR does / why we need it:
This PR introduces a dedicated client CA for shoot clusters as suggested in GEP-18.
For existing clusters, the new
ca-client
secret will have the same content like theca
secret for backwards-compatibility reasons.For new clusters, the
ca-client
secret will be different from theca
secret.The
kube-apiserver
always uses the client CA bundle containing the current and potential old client CA certificates. Thekube-controller-manager
always uses the current client CA certificate to ensure new client certificates are always signed with the most recent client CA certificate.Which issue(s) this PR fixes:
Part of #3292
Special notes for your reviewer:
/cc @timebertt
Release note: