-
Notifications
You must be signed in to change notification settings - Fork 40k
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
don't mutate original master->kubelet TLS config #33141
don't mutate original master->kubelet TLS config #33141
Conversation
Consider adding a test to prevent this regression from recurring. |
e6e247f
to
dfff9f4
Compare
dfff9f4
to
9e604ce
Compare
Updated to copy the struct field-by-field (which makes me cringe, but is what golang also ended up doing in net/http/cloneTLSClientConfig when copying tls.Config structs for client use). In go1.8, we can use Added dial tests to make sure insecure, secured, and pinned name dials all work as expected, and don't mutate the transport's tls.Config |
9e604ce
to
6c49a16
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.
One minor comment
@@ -108,6 +108,33 @@ func Dialer(transport http.RoundTripper) (DialFunc, error) { | |||
} | |||
} | |||
|
|||
// CloneTLSConfig returns a tls.Config with all exported fields except SessionTicketsDisabled and SessionTicketKey copied. | |||
// This makes it safe to call CloneTLSConfig on a config in active use by a server. |
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.
Todo about replacing with Clone() in Go 1.8
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
6c49a16
to
f3c8004
Compare
comment addressed |
LGTM |
@k8s-bot gce e2e test this |
@k8s-bot kubemark e2e test this |
@k8s-bot gce e2e test this |
unrelated flake (passed in the cherry pick PR run, and isn't making a TLS Upgrade request, which is the only thing this PR would affect):
from the master log, showing the DialURL function wasn't in the error path:
|
What is the cherrypick PR? |
|
Jenkins GCE e2e failed for commit f3c8004. The magic incantation to run this job again is |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue |
Commit found in the "release-1.4" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
…k-of-#33141-upstream-release-1.4 Automatic merge from submit-queue Automated cherry pick of kubernetes#33141 Cherry pick of kubernetes#33141 on release-1.4. ```release-note Resolves x509 verification issue with masters dialing nodes when started with --kubelet-certificate-authority ```
fixes #33140
This change is