-
Notifications
You must be signed in to change notification settings - Fork 40.2k
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
allow setting different certificates for kube-controller-managed CSR signers #90822
allow setting different certificates for kube-controller-managed CSR signers #90822
Conversation
|
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
77857ca to
4a889bc
Compare
|
/retest |
4a889bc to
950bedd
Compare
|
/retest |
950bedd to
d60a117
Compare
|
Maybe a dumb question, but could I use this to turn off specific signers? If I only wanted to sign node-serving-cert but not node-client cert, could I do that with this change? |
No, but you could set the |
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.
Overall LGTM.
I feel like we should add something like a --cluster-signing-explicit-signers flag which is a bool (default false) that, when set to true, prevents KCM from starting when each signer does not have an explicit key/cert specified. This would allow you to know that a new signer has been added and that you need to address that in some way. Otherwise a new signer addition would implicitly use the default cert/key file, which may not be desired.
| if ctx.ComponentConfig.CSRSigningController.ClusterSigningCertFile == "" || ctx.ComponentConfig.CSRSigningController.ClusterSigningKeyFile == "" { | ||
| hasSingleSigningFile := ctx.ComponentConfig.CSRSigningController.ClusterSigningCertFile == "" || ctx.ComponentConfig.CSRSigningController.ClusterSigningKeyFile == "" | ||
| hasKubeletServingFile := ctx.ComponentConfig.CSRSigningController.KubeletServingSignerConfiguration.CertFile == "" || ctx.ComponentConfig.CSRSigningController.KubeletServingSignerConfiguration.KeyFile == "" | ||
| hasKubeletClientFile := ctx.ComponentConfig.CSRSigningController.KubeletClientSignerConfiguration.CertFile == "" || ctx.ComponentConfig.CSRSigningController.KubeletClientSignerConfiguration.KeyFile == "" | ||
| hasKubeAPIServerClientFile := ctx.ComponentConfig.CSRSigningController.KubeAPIServerClientSignerConfiguration.CertFile == "" || ctx.ComponentConfig.CSRSigningController.KubeAPIServerClientSignerConfiguration.KeyFile == "" | ||
| hasLegacyUnknownFile := ctx.ComponentConfig.CSRSigningController.LegacyUnknownSignerConfiguration.CertFile == "" || ctx.ComponentConfig.CSRSigningController.LegacyUnknownSignerConfiguration.KeyFile == "" | ||
| if !hasSingleSigningFile && !hasKubeletServingFile && !hasKubeletClientFile && !hasKubeAPIServerClientFile && !hasLegacyUnknownFile { |
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.
Er, what happens if you specify one of the signers but not the default signing file?
Can we add some tests to exercise this wiring?
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.
Er, what happens if you specify one of the signers but not the default signing file?
You'll get an error about an unspecified file. Comes from the code doing the initial load. What is your preferred behavior?
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.
Can we add some tests to exercise this wiring?
Do you have an example of flag wiring behavior tests you like? I don't object, I just haven't seen many.
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.
You'll get an error about an unspecified file. Comes from the code doing the initial load. What is your preferred behavior?
That seems fine to me.
Do you have an example of flag wiring behavior tests you like?
There are some tests in kube-controller-manager/app/options/options_test.go that test the input flags to CSRSigningControllerOptions bits. Maybe combine that with startCSRSigningController and some permutations of the flags?
5fa1580 to
e89bd83
Compare
e89bd83 to
94f2ac5
Compare
|
/retest |
|
/retest Review the full test history for this PR. Silence the bot with an |
|
/retest |
|
/retest Review the full test history for this PR. Silence the bot with an |
8 similar comments
|
/retest Review the full test history for this PR. Silence the bot with an |
|
/retest Review the full test history for this PR. Silence the bot with an |
|
/retest Review the full test history for this PR. Silence the bot with an |
|
/retest Review the full test history for this PR. Silence the bot with an |
|
/retest Review the full test history for this PR. Silence the bot with an |
|
/retest Review the full test history for this PR. Silence the bot with an |
|
/retest Review the full test history for this PR. Silence the bot with an |
|
/retest Review the full test history for this PR. Silence the bot with an |
|
/retest |
1 similar comment
|
/retest |
|
/retest Review the full test history for this PR. Silence the bot with an |
3 similar comments
|
/retest Review the full test history for this PR. Silence the bot with an |
|
/retest Review the full test history for this PR. Silence the bot with an |
|
/retest Review the full test history for this PR. Silence the bot with an |
|
/retest |
|
/retest Review the full test history for this PR. Silence the bot with an |
3 similar comments
|
/retest Review the full test history for this PR. Silence the bot with an |
|
/retest Review the full test history for this PR. Silence the bot with an |
|
/retest Review the full test history for this PR. Silence the bot with an |
|
/retest |
|
/retest Review the full test history for this PR. Silence the bot with an |
|
@deads2k: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. |
|
/retest Review the full test history for this PR. Silence the bot with an |


builds on #90731
The kube-controller-manager managed signers can now have distinct signing certificates and keys. See the help about
--cluster-signing-[signer-name]-{cert,key}-file.--cluster-signing-{cert,key}-fileis still the default./kind feature
/priority important-soon
@kubernetes/sig-auth-pr-reviews