Code change:
package net import ( <ins> "crypto/tls" </ins> "net" "net/http" "net/url" "os" "reflect" "testing" <ins> "k8s.io/kubernetes/pkg/util/sets" </ins> ) <ins> func TestCloneTLSConfig(t *testing.T) { expected := sets.NewString( // These fields are copied in CloneTLSConfig "Rand", "Time", "Certificates", "RootCAs", "NextProtos", "ServerName", "InsecureSkipVerify", "CipherSuites", "PreferServerCipherSuites", "MinVersion", "MaxVersion", "CurvePreferences", "NameToCertificate", "GetCertificate", "ClientAuth", "ClientCAs", "ClientSessionCache", // These fields are not copied "SessionTicketsDisabled", "SessionTicketKey", // These fields are unexported "serverInitOnce", "mutex", "sessionTicketKeys", ) fields := sets.NewString() structType := reflect.TypeOf(tls.Config{}) for i := 0; i < structType.NumField(); i++ { fields.Insert(structType.Field(i).Name) } if missing := expected.Difference(fields); len(missing) > 0 { t.Errorf("Expected fields that were not seen in http.Transport: %v", missing.List()) } if extra := fields.Difference(expected); len(extra) > 0 { t.Errorf("New fields seen in http.Transport: %vnAdd to CopyClientTLSConfig if client-relevant, then add to expected list in TestCopyClientTLSConfig", extra.List()) } } </ins> func TestGetClientIP(t *testing.T) { ipString := "10.0.0.1" ip := net.ParseIP(ipString)

Related discussion:
text: When the master dials nodes, it is mutating the tlsConfig held by the master kubelet client, to add a server name. That means if two different nodes are dialed from a master started with , x509 verification will fail for the second one. Introduced in
this is a regression from 1.3 and breaks pod logs/exec/attach and node proxying on installations that use
We probably need to review that PR and look to see if any other deliberate copies were flagged incorrectly by govet.
Installations that depend on secure trust from externally provided kubelet server certs are the highest security rings. If we don't fix this we need to tell anyone using this flag not to upgrade until we release 1.4.1.
the rest of the changes in the govet cleanup PR looked fine to me. fix for this issue is in
Since we are telling folks they have to upgrade to kubectl 1.4.0 for rollingupdate to work it would definitely be a confusing message to say other folks should not upgrade to 1.4.0 at all.
If the fix is merged into master by this afternoon, lets discuss whether or not we should cherrypick it - e.g. risks involved, how we can manually qa to verify nothing else was broken, etc.
Risk involved: If you are using a secure cluster (defined as ensuring no one can MITM your nodes and masters) and you upgrade to 1.4.0 and it does not include this fix - you are broken.
What is the likelihood of interactions with other code? Is it possible this fix could introduce a breaking change to something else? Has the fix been manually verified? Are we confident that this will fully fixes the issue (vs other edge cases exist for secure clusters that this doesn't catch). Ideally I would like to see this cherrypicked into 1.4 this evening and then cut a new beta that includes it.
None. The single line that is currently broken was changed. The rest is a new function (with no side effects), and tests. No, it restores the original intent of the TLS config copy, and tests cover the cases we are using this with (secure, insecure, custom dialer) Yes. I swept for the same issue elsewhere and didn't find any issues. We test with a fully secured master-kubelet setup in Openshift and got a clean test run with this fix applied.
SGTM. Thanks for fixing this.