From e4c217768e9f000539b0d06287d7e061b3e81594 Mon Sep 17 00:00:00 2001 From: Matt Butcher Date: Tue, 27 Sep 2016 14:15:23 -0600 Subject: [PATCH] ref(*): update to Kubernetes 1.4 This starts with #1211 and does the other updates necessary for bumping us to Kubernetes 1.4. --- Makefile | 2 +- glide.lock | 247 ++++++++++++++++++++++++++++++++-------- glide.yaml | 2 +- pkg/kube/client.go | 2 +- pkg/kube/client_test.go | 2 - pkg/kube/tunnel.go | 17 +-- 6 files changed, 213 insertions(+), 59 deletions(-) diff --git a/Makefile b/Makefile index 7de4f832b..705d2dbe8 100644 --- a/Makefile +++ b/Makefile @@ -100,7 +100,7 @@ endif ifndef HAS_GIT $(error You must install Git) endif - glide install + glide install --strip-vendor go build -o bin/protoc-gen-go ./vendor/github.com/golang/protobuf/protoc-gen-go include versioning.mk diff --git a/glide.lock b/glide.lock index e30e2d481..99a057ebd 100644 --- a/glide.lock +++ b/glide.lock @@ -1,16 +1,77 @@ -hash: 45eadf6012afd2293f9e82032dba0d4bcff712bf56f8b6cb875c4bdf02d1b08c -updated: 2016-09-26T12:02:34.264796591-07:00 +hash: a017cec6c2fa7ab82b7a2747d016f2254f6d26c2e24ae48f2d34bb51d85cc0d1 +updated: 2016-09-27T14:51:17.303868688-06:00 imports: +- name: bitbucket.org/ww/goautoneg + version: 75cd24fc2f2c2a2088577d12123ddee5f54e0675 - name: github.com/aokoli/goutils version: 9c37978a95bd5c709a15883b6242714ea6709e64 - name: github.com/asaskevich/govalidator version: 7664702784775e51966f0885f5cd27435916517b +- name: github.com/Azure/go-ansiterm + version: 70b2c90b260171e829f1ebd7c17f600c11858dbe + subpackages: + - winterm - name: github.com/beorn7/perks version: 3ac7bf7a47d159a033b107610db8a1b6575507a4 subpackages: - quantile - name: github.com/blang/semver version: 31b736133b98f26d5e078ec9eb591666edfd091f +- name: github.com/coreos/etcd + version: 9efa00d1030d4bf62eb8e5ec130023aeb1b8e2d0 + subpackages: + - alarm + - auth + - auth/authpb + - client + - clientv3 + - compactor + - discovery + - error + - etcdserver + - etcdserver/api + - etcdserver/api/v2http + - etcdserver/api/v2http/httptypes + - etcdserver/api/v3rpc + - etcdserver/api/v3rpc/rpctypes + - etcdserver/auth + - etcdserver/etcdserverpb + - etcdserver/membership + - etcdserver/stats + - integration + - lease + - lease/leasehttp + - lease/leasepb + - mvcc + - mvcc/backend + - mvcc/mvccpb + - pkg/adt + - pkg/contention + - pkg/crc + - pkg/fileutil + - pkg/httputil + - pkg/idutil + - pkg/ioutil + - pkg/logutil + - pkg/netutil + - pkg/pathutil + - pkg/pbutil + - pkg/runtime + - pkg/schedule + - pkg/testutil + - pkg/tlsutil + - pkg/transport + - pkg/types + - pkg/wait + - raft + - raft/raftpb + - rafthttp + - snap + - snap/snappb + - store + - version + - wal + - wal/walpb - name: github.com/coreos/go-oidc version: 5cf2aa52da8c574d3aa4458f471ad6ae2240fe6b subpackages: @@ -29,7 +90,7 @@ imports: - unit - util - name: github.com/coreos/pkg - version: 7f080b6c11ac2d2347c3cd7521e810207ea1a041 + version: fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8 subpackages: - capnslog - dlopen @@ -46,16 +107,17 @@ imports: - digest - reference - name: github.com/docker/docker - version: 0f5c9d301b9b1cca66b3ea0f9dec3b5317d3686d + version: b9f10c951893f9a00865890a5232e85d770c1087 subpackages: + - pkg/jsonlog - pkg/jsonmessage + - pkg/longpath - pkg/mount - pkg/stdcopy - pkg/symlink + - pkg/system - pkg/term - - pkg/term/winconsole - - pkg/timeutils - - pkg/units + - pkg/term/windows - name: github.com/docker/engine-api version: dea108d3aa0c67d7162a3fd8aa65f38a430019fd subpackages: @@ -85,7 +147,7 @@ imports: subpackages: - spdy - name: github.com/emicklei/go-restful - version: 7c47e2558a0bbbaba9ecab06bc6681e73028a28a + version: 89ef8af493ab468a45a42bb0d89a06fccdd2fb22 subpackages: - log - swagger @@ -94,9 +156,10 @@ imports: - name: github.com/ghodss/yaml version: 73d445a93680fa1a78ae23a5839bad48f32ba1ee - name: github.com/gogo/protobuf - version: 82d16f734d6d871204a3feb1a73cb220cc92574c + version: e18d7aa8f8c624c915db340349aad4c49b10d173 subpackages: - gogoproto + - plugin/compare - plugin/defaultcheck - plugin/description - plugin/embedcheck @@ -104,7 +167,6 @@ imports: - plugin/equal - plugin/face - plugin/gostring - - plugin/grpc - plugin/marshalto - plugin/oneofcheck - plugin/populate @@ -116,6 +178,7 @@ imports: - proto - protoc-gen-gogo/descriptor - protoc-gen-gogo/generator + - protoc-gen-gogo/grpc - protoc-gen-gogo/plugin - sortkeys - vanity @@ -123,20 +186,22 @@ imports: - name: github.com/golang/glog version: 44145f04b68cf362d9c4df2182967c2275eaefed - name: github.com/golang/groupcache - version: 604ed5785183e59ae2789449d89e73f3a2a77987 + version: 02826c3e79038b59d737d3b1c0a1d937f71a4433 subpackages: - lru - name: github.com/golang/protobuf version: 8616e8ee5e20a1704615e6c8d7afcdac06087a67 subpackages: + - jsonpb - proto - ptypes/any - ptypes/timestamp - name: github.com/google/cadvisor - version: 404f31ff971a5d5d9595f1a7ca6a07881ac37fed + version: 0cdf4912793fac9990de3790c273342ec31817fb subpackages: - api - cache/memory + - client/v2 - collector - container - container/common @@ -182,12 +247,18 @@ imports: subpackages: - util/strutil - util/wordwrap +- name: github.com/grpc-ecosystem/grpc-gateway + version: f52d055dc48aec25854ed7d31862f78913cf17d1 + subpackages: + - runtime + - runtime/internal + - utilities - name: github.com/imdario/mergo version: 6633656539c1639d9d78127b7d47c622b5d7b6dc - name: github.com/inconshreveable/mousetrap version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 - name: github.com/jonboulle/clockwork - version: 3f831b65b61282ba6bece21b91beea2edc4c887a + version: 72f9bd7c4e0c2a40055ab3d0f09654f730cce982 - name: github.com/juju/ratelimit version: 77ed1c8a01217656d2080ad51981f6e99adaa177 - name: github.com/Masterminds/semver @@ -200,28 +271,10 @@ imports: version: fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a subpackages: - pbutil -- name: github.com/opencontainers/runc - version: 7ca2aa4873aea7cb4265b1726acb24b90d8726c6 - subpackages: - - libcontainer - - libcontainer/apparmor - - libcontainer/cgroups - - libcontainer/cgroups/fs - - libcontainer/cgroups/systemd - - libcontainer/configs - - libcontainer/configs/validate - - libcontainer/criurpc - - libcontainer/label - - libcontainer/seccomp - - libcontainer/selinux - - libcontainer/stacktrace - - libcontainer/system - - libcontainer/user - - libcontainer/utils - name: github.com/pborman/uuid version: ca53cad383cad2479bbba7f7a1a05797ec1386e4 - name: github.com/prometheus/client_golang - version: 3b78d7a77f51ccbc364d4bc170920153022cfd08 + version: e51041b3fa41cece0dca035740ba6411905be473 subpackages: - prometheus - name: github.com/prometheus/client_model @@ -229,13 +282,14 @@ imports: subpackages: - go - name: github.com/prometheus/common - version: a6ab08426bb262e2d190097751f5cfd1cfdfd17d + version: ffe929a3f4c4faeaa10f2b9535c2b1be3ad15650 subpackages: - expfmt - - internal/bitbucket.org/ww/goautoneg - model - name: github.com/prometheus/procfs - version: 490cc6eb5fa45bf8a8b7b73c8bc82a8160e8531d + version: 454a56f35412459b5e684fd5ec0f9211b94f002a +- name: github.com/Sirupsen/logrus + version: 51fe59aca108dc5680109e7b2051cbdcfa5a253c - name: github.com/spf13/cobra version: 6a8bd97bdb1fc0d08a83459940498ea49d3e8c93 - name: github.com/spf13/pflag @@ -243,12 +297,12 @@ imports: - name: github.com/technosophos/moniker version: 9f956786b91d9786ca11aa5be6104542fa911546 - name: github.com/ugorji/go - version: f4485b318aadd133842532f841dc205a8e339d74 + version: f1f1a805ed361a0e078bb537e4ea78cd37dcf065 subpackages: - codec - codec/codecgen - name: golang.org/x/crypto - version: c84e1f8e3a7e322d497cd16c0e8a13c7e127baf3 + version: 1f22c0103821b9390939b6776727195525381532 subpackages: - cast5 - openpgp @@ -309,14 +363,83 @@ imports: version: 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4 - name: gopkg.in/yaml.v2 version: a83829b6f1293c91addabc89d0571c246397bbf4 +- name: k8s.io/client-go + version: 0b62e254fe853d89b1d8d3445bbdab11bcc11bc3 + subpackages: + - 1.4/pkg/api + - 1.4/pkg/api/endpoints + - 1.4/pkg/api/errors + - 1.4/pkg/api/meta + - 1.4/pkg/api/meta/metatypes + - 1.4/pkg/api/pod + - 1.4/pkg/api/resource + - 1.4/pkg/api/service + - 1.4/pkg/api/unversioned + - 1.4/pkg/api/unversioned/validation + - 1.4/pkg/api/util + - 1.4/pkg/api/v1 + - 1.4/pkg/api/validation + - 1.4/pkg/apimachinery + - 1.4/pkg/apimachinery/registered + - 1.4/pkg/apis/autoscaling + - 1.4/pkg/apis/batch + - 1.4/pkg/apis/extensions + - 1.4/pkg/auth/user + - 1.4/pkg/capabilities + - 1.4/pkg/conversion + - 1.4/pkg/conversion/queryparams + - 1.4/pkg/fields + - 1.4/pkg/labels + - 1.4/pkg/runtime + - 1.4/pkg/runtime/serializer + - 1.4/pkg/runtime/serializer/json + - 1.4/pkg/runtime/serializer/protobuf + - 1.4/pkg/runtime/serializer/recognizer + - 1.4/pkg/runtime/serializer/streaming + - 1.4/pkg/runtime/serializer/versioning + - 1.4/pkg/security/apparmor + - 1.4/pkg/selection + - 1.4/pkg/third_party/forked/golang/reflect + - 1.4/pkg/types + - 1.4/pkg/util + - 1.4/pkg/util/clock + - 1.4/pkg/util/config + - 1.4/pkg/util/crypto + - 1.4/pkg/util/errors + - 1.4/pkg/util/flowcontrol + - 1.4/pkg/util/framer + - 1.4/pkg/util/hash + - 1.4/pkg/util/integer + - 1.4/pkg/util/intstr + - 1.4/pkg/util/json + - 1.4/pkg/util/labels + - 1.4/pkg/util/net + - 1.4/pkg/util/net/sets + - 1.4/pkg/util/parsers + - 1.4/pkg/util/rand + - 1.4/pkg/util/runtime + - 1.4/pkg/util/sets + - 1.4/pkg/util/uuid + - 1.4/pkg/util/validation + - 1.4/pkg/util/validation/field + - 1.4/pkg/util/wait + - 1.4/pkg/util/yaml + - 1.4/pkg/version + - 1.4/pkg/watch + - 1.4/pkg/watch/versioned + - 1.4/rest + - 1.4/tools/clientcmd/api + - 1.4/tools/metrics + - 1.4/transport - name: k8s.io/kubernetes - version: 17d4cf1af43a03a5997ea9142b19e5b1ac2d8747 + version: 23b426563780c64ac25df63a2d141247d02aac7a subpackages: - federation/apis/federation - federation/apis/federation/install - federation/apis/federation/v1beta1 - federation/client/clientset_generated/federation_internalclientset - federation/client/clientset_generated/federation_internalclientset/typed/core/unversioned + - federation/client/clientset_generated/federation_internalclientset/typed/extensions/unversioned - federation/client/clientset_generated/federation_internalclientset/typed/federation/unversioned - pkg/api - pkg/api/annotations @@ -341,9 +464,9 @@ imports: - pkg/apis/apps - pkg/apis/apps/install - pkg/apis/apps/v1alpha1 - - pkg/apis/authentication.k8s.io - - pkg/apis/authentication.k8s.io/install - - pkg/apis/authentication.k8s.io/v1beta1 + - pkg/apis/authentication + - pkg/apis/authentication/install + - pkg/apis/authentication/v1beta1 - pkg/apis/authorization - pkg/apis/authorization/install - pkg/apis/authorization/v1beta1 @@ -354,6 +477,9 @@ imports: - pkg/apis/batch/install - pkg/apis/batch/v1 - pkg/apis/batch/v2alpha1 + - pkg/apis/certificates + - pkg/apis/certificates/install + - pkg/apis/certificates/v1alpha1 - pkg/apis/componentconfig - pkg/apis/componentconfig/install - pkg/apis/componentconfig/v1alpha1 @@ -361,26 +487,37 @@ imports: - pkg/apis/extensions/install - pkg/apis/extensions/v1beta1 - pkg/apis/extensions/validation + - pkg/apis/imagepolicy + - pkg/apis/imagepolicy/install + - pkg/apis/imagepolicy/v1alpha1 - pkg/apis/policy - pkg/apis/policy/install - pkg/apis/policy/v1alpha1 - pkg/apis/rbac - pkg/apis/rbac/install - pkg/apis/rbac/v1alpha1 + - pkg/apis/storage + - pkg/apis/storage/install + - pkg/apis/storage/v1beta1 - pkg/auth/user - pkg/capabilities - pkg/client/cache - pkg/client/clientset_generated/internalclientset + - pkg/client/clientset_generated/internalclientset/typed/authentication/unversioned + - pkg/client/clientset_generated/internalclientset/typed/authorization/unversioned - pkg/client/clientset_generated/internalclientset/typed/autoscaling/unversioned - pkg/client/clientset_generated/internalclientset/typed/batch/unversioned + - pkg/client/clientset_generated/internalclientset/typed/certificates/unversioned - pkg/client/clientset_generated/internalclientset/typed/core/unversioned - pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned - pkg/client/clientset_generated/internalclientset/typed/rbac/unversioned + - pkg/client/clientset_generated/internalclientset/typed/storage/unversioned - pkg/client/metrics - pkg/client/record - pkg/client/restclient - pkg/client/transport - pkg/client/typed/discovery + - pkg/client/typed/dynamic - pkg/client/unversioned - pkg/client/unversioned/adapters/internalclientset - pkg/client/unversioned/auth @@ -393,6 +530,7 @@ imports: - pkg/client/unversioned/remotecommand - pkg/client/unversioned/testclient - pkg/controller + - pkg/controller/deployment/util - pkg/controller/framework - pkg/conversion - pkg/conversion/queryparams @@ -404,9 +542,9 @@ imports: - pkg/kubectl/cmd/util - pkg/kubectl/resource - pkg/kubelet/qos - - pkg/kubelet/qos/util - pkg/kubelet/server/portforward - pkg/kubelet/server/remotecommand + - pkg/kubelet/types - pkg/labels - pkg/master/ports - pkg/registry/generic @@ -418,13 +556,25 @@ imports: - pkg/runtime/serializer/recognizer - pkg/runtime/serializer/streaming - pkg/runtime/serializer/versioning + - pkg/security/apparmor - pkg/security/podsecuritypolicy/util + - pkg/selection - pkg/storage + - pkg/storage/etcd + - pkg/storage/etcd/metrics + - pkg/storage/etcd/util + - pkg/storage/etcd3 + - pkg/storage/storagebackend + - pkg/storage/storagebackend/factory - pkg/types - pkg/util + - pkg/util/cache + - pkg/util/certificates + - pkg/util/clock + - pkg/util/config - pkg/util/crypto - - pkg/util/deployment - pkg/util/errors + - pkg/util/exec - pkg/util/flag - pkg/util/flowcontrol - pkg/util/framer @@ -433,6 +583,7 @@ imports: - pkg/util/httpstream - pkg/util/httpstream/spdy - pkg/util/integer + - pkg/util/interrupt - pkg/util/intstr - pkg/util/json - pkg/util/jsonpath @@ -447,6 +598,8 @@ imports: - pkg/util/sets - pkg/util/slice - pkg/util/strategicpatch + - pkg/util/term + - pkg/util/uuid - pkg/util/validation - pkg/util/validation/field - pkg/util/wait @@ -458,8 +611,8 @@ imports: - plugin/pkg/client/auth - plugin/pkg/client/auth/gcp - plugin/pkg/client/auth/oidc - - third_party/forked/json - - third_party/forked/reflect - - third_party/golang/netutil - - third_party/golang/template + - third_party/forked/golang/json + - third_party/forked/golang/netutil + - third_party/forked/golang/reflect + - third_party/forked/golang/template testImports: [] diff --git a/glide.yaml b/glide.yaml index f0011582d..e4947bdb3 100644 --- a/glide.yaml +++ b/glide.yaml @@ -22,7 +22,7 @@ import: - package: google.golang.org/grpc version: v1.0.1-GA - package: k8s.io/kubernetes - version: ~1.3 + version: ~1.4 subpackages: - pkg/api - pkg/api/meta diff --git a/pkg/kube/client.go b/pkg/kube/client.go index 39a90aba5..5eaee1e69 100644 --- a/pkg/kube/client.go +++ b/pkg/kube/client.go @@ -117,7 +117,7 @@ func (c *Client) Get(namespace string, reader io.Reader) (string, error) { // an object type changes, so we can just rely on that. Problem is it doesn't seem to keep // track of tab widths buf := new(bytes.Buffer) - p := kubectl.NewHumanReadablePrinter(false, false, false, false, false, false, []string{}) + p := kubectl.NewHumanReadablePrinter(kubectl.PrintOptions{}) for t, ot := range objs { _, err = buf.WriteString("==> " + t + "\n") if err != nil { diff --git a/pkg/kube/client_test.go b/pkg/kube/client_test.go index bfa953481..e1b418aa8 100644 --- a/pkg/kube/client_test.go +++ b/pkg/kube/client_test.go @@ -26,7 +26,6 @@ import ( "testing" "k8s.io/kubernetes/pkg/api/meta" - "k8s.io/kubernetes/pkg/api/testapi" "k8s.io/kubernetes/pkg/api/unversioned" api "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/pkg/client/unversioned/fake" @@ -315,7 +314,6 @@ func createFakeInfo(name string, labels map[string]string) *resource.Info { }} client := &fake.RESTClient{ - Codec: testapi.Default.Codec(), Client: fake.CreateHTTPClient(func(req *http.Request) (*http.Response, error) { header := http.Header{} header.Set("Content-Type", runtime.ContentTypeJSON) diff --git a/pkg/kube/tunnel.go b/pkg/kube/tunnel.go index 66406d512..53e0b1a9a 100644 --- a/pkg/kube/tunnel.go +++ b/pkg/kube/tunnel.go @@ -28,14 +28,16 @@ import ( // Tunnel describes a ssh-like tunnel to a kubernetes pod type Tunnel struct { - Local int - Remote int - stopChan chan struct{} + Local int + Remote int + stopChan chan struct{} + readyChan chan struct{} } // Close disconnects a tunnel connection func (t *Tunnel) Close() { close(t.stopChan) + close(t.readyChan) } // ForwardPort opens a tunnel to a kubernetes pod @@ -69,15 +71,16 @@ func (c *Client) ForwardPort(namespace, podName string, remote int) (*Tunnel, er } t := &Tunnel{ - Local: local, - Remote: remote, - stopChan: make(chan struct{}, 1), + Local: local, + Remote: remote, + stopChan: make(chan struct{}, 1), + readyChan: make(chan struct{}, 1), } ports := []string{fmt.Sprintf("%d:%d", local, remote)} var b bytes.Buffer - pf, err := portforward.New(dialer, ports, t.stopChan, &b, &b) + pf, err := portforward.New(dialer, ports, t.stopChan, t.readyChan, &b, &b) if err != nil { return nil, err }