diff --git a/kubernetes/kubernetes/centos/files/fix_http2_erringroundtripper_handling.patch b/kubernetes/kubernetes/centos/files/fix_http2_erringroundtripper_handling.patch new file mode 100644 index 00000000..921378c2 --- /dev/null +++ b/kubernetes/kubernetes/centos/files/fix_http2_erringroundtripper_handling.patch @@ -0,0 +1,12 @@ +diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go +index aeac7d8..ec18648 100644 +--- a/vendor/golang.org/x/net/http2/transport.go ++++ b/vendor/golang.org/x/net/http2/transport.go +@@ -2404,6 +2404,7 @@ func strSliceContains(ss []string, s string) bool { + + type erringRoundTripper struct{ err error } + ++func (rt erringRoundTripper) IsHTTP2ErringRoundtripper() {} + func (rt erringRoundTripper) RoundTrip(*http.Request) (*http.Response, error) { return nil, rt.err } + + // gzipReader wraps a response body so it can lazily diff --git a/kubernetes/kubernetes/centos/kubernetes.spec b/kubernetes/kubernetes/centos/kubernetes.spec index dd91b17e..2f66ccec 100644 --- a/kubernetes/kubernetes/centos/kubernetes.spec +++ b/kubernetes/kubernetes/centos/kubernetes.spec @@ -57,6 +57,7 @@ Source33: genmanpages.sh Patch1: 0001-Fix-pagesize-check-to-allow-for-options-already-endi.patch Patch2: kubelet-service-remove-docker-dependency.patch +Patch3: fix_http2_erringroundtripper_handling.patch # It obsoletes cadvisor but needs its source code (literally integrated) Obsoletes: cadvisor @@ -838,6 +839,7 @@ Kubernetes client tools like kubectl %setup -q -n %{con_repo}-%{con_commit} -T -b 1 %setup -q -n %{repo}-%{commit} %patch1 -p1 +%patch3 -p1 # copy contrib folder mkdir contrib @@ -873,6 +875,10 @@ export KUBE_EXTRA_GOPATH=$(pwd)/Godeps/_workspace %ifarch ppc64le export GOLDFLAGS='-linkmode=external' %endif + +# uncomment these two lines to build unoptimized binaries for debugging. +# export GOLDFLAGS="" +# export GOGCFLAGS="-N -l" make WHAT="cmd/kube-proxy cmd/kube-apiserver cmd/kube-controller-manager cmd/kubelet cmd/kubeadm cmd/kube-scheduler cmd/kubectl" # convert md to man