-
Notifications
You must be signed in to change notification settings - Fork 1.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 TLS to be entirely configured on webhook server #1897
✨ Allow TLS to be entirely configured on webhook server #1897
Conversation
|
Welcome @akalenyu! |
Hi @akalenyu. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
5dd273b
to
dcba7ee
Compare
pkg/webhook/server.go
Outdated
@@ -76,6 +79,10 @@ type Server struct { | |||
// "", "1.0", "1.1", "1.2" and "1.3" only ("" is equivalent to "1.0" for backwards compatibility) | |||
TLSMinVersion string | |||
|
|||
// TLSCiphers is used to specify the cipher algorithms that are negotiated | |||
// during the TLS handshake, refer to https://pkg.go.dev/crypto/tls#CipherSuites | |||
TLSCiphers []string |
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.
Why not just make it TLSOpts []func(*tls.Config)
to avoid needing a new setting everytime someone finds something new they would like to configure about TLS?
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, that makes sense!
I have kept the previously-existing TLS fields to not break existing usages, let me know if that's OK
/ok-to-test |
dcba7ee
to
5cf5bf9
Compare
pkg/webhook/server.go
Outdated
@@ -41,6 +41,9 @@ import ( | |||
// DefaultPort is the default port that the webhook server serves. | |||
var DefaultPort = 9443 | |||
|
|||
// ExportedTLSConfig is used in unit tests to ensure propagation of tls related configurables to server. | |||
var ExportedTLSConfig *tls.Config |
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.
Lets find a way to test this without globals
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.
Done, hopefully better
Some operators might want to respect cluster-wide TLS ciphers for example, which means that these will eventually have to be passed down to the webhook server. Signed-off-by: Alex Kalenyuk <[email protected]>
5cf5bf9
to
187187e
Compare
Can't find an open issue about this, should I open one?
|
/test pull-controller-runtime-test-master |
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.
thank you!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: akalenyu, alvaroaleman 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 |
/cherrypick release-0.12 |
@akalenyu: only kubernetes-sigs org members may request cherry picks. You can still do the cherry-pick manually. 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. |
@alvaroaleman @camilamacedo86 |
sure |
@alvaroaleman: new pull request created: #1914 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. |
Should this be possible via manager's |
Should be able to pass it in controller-runtime/pkg/manager/manager.go Line 247 in e4e13b9
|
@akalenyu true but I was wondering if it was useful to control the default server created by Manager just like you can do with Host/Port/CertDir. |
I might be missing something, but, the snippet above is from the |
Right, I'm all good passing But when that is not passed, some elements of |
Upgrading controller_runtime to have it support full configuring TLS on webhooks (kubernetes-sigs/controller-runtime#1897)
Upgrading controller_runtime to have it support full configuring TLS on webhooks (kubernetes-sigs/controller-runtime#1897)
Upgrading controller_runtime to have it support full configuring TLS on webhooks (kubernetes-sigs/controller-runtime#1897)
Upgrading controller_runtime to have it support full configuring TLS on webhooks (kubernetes-sigs/controller-runtime#1897) Signed-off-by: borod108 <[email protected]>
Upgrading controller_runtime to have it support full configuring TLS on webhooks (kubernetes-sigs/controller-runtime#1897) Signed-off-by: borod108 <[email protected]>
Upgrading controller_runtime to have it support full configuring TLS on webhooks (kubernetes-sigs/controller-runtime#1897) Signed-off-by: borod108 <[email protected]>
Upgrading controller_runtime to have it support full configuring TLS on webhooks (kubernetes-sigs/controller-runtime#1897) Signed-off-by: borod108 <[email protected]>
Are there any plans to backport this fix to the 1.11.x release line? |
This field has been added in kubernetes-sigs#1548 It then turned out that people want to configure more parts of the TLSConfig and the generic TLSOpts was added in kubernetes-sigs#1897 Deprecate TLSMinVersion in favor of the more generic TLSOpts.
This field has been added in kubernetes-sigs#1548 It then turned out that people want to configure more parts of the TLSConfig and the generic TLSOpts was added in kubernetes-sigs#1897 Deprecate TLSMinVersion in favor of the more generic TLSOpts.
/cherrypick release-0.11 |
@vincepri: new pull request created: #2356 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. |
Some operators might want to respect cluster-wide TLS ciphers for example,
which means that these will eventually have to be passed down to the webhook server.
Fixes #1754