Update k8s client-go to v6.0.0 (#1340)

* Update k8s client-go to v6.0.0

This fix updates k8s client-go to v6.0.0 as CoreDNS is supported
in 1.9 and v6.0.0 is the recommended version.

There are quite some massive changes that need to be made:
1. k8s.io/client-go/pkg/api/v1 has been changed to k8s.io/api/v1 (repo changed from `client-go` to `api`)
2. kubernetes.Clientset adds one extra layer, so that `kubernetes.Clientset.Services()` and like has been changed to `kubernetes.Clientset.CoreV1().Services()`

Also, we have to stick with specific commits of `k8s.io/apimachinery` and the newly introduced `k8s.io/api`
because go dep still could not figure out the right version to fetch.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Update vendor with `dep ensure --update` and `dep prune`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
Yong Tang
2018-01-03 19:11:28 +08:00
committed by Miek Gieben
parent bce7f5fbec
commit 7fe5b0bb1f
1278 changed files with 123970 additions and 277876 deletions

46
vendor/k8s.io/client-go/INSTALL.md generated vendored
View File

@@ -143,38 +143,20 @@ After modifying, run `glide up -v` again to re-populate your /vendor directory.
Optionally, Glide users can also use [`glide-vc`](https://github.com/sgotti/glide-vc)
after running `glide up -v` to remove unused files from /vendor.
### Dep
### Dep (Not supported yet!)
[dep](https://github.com/golang/dep) is an up-and-coming dependency management tool,
which has the goal of being accepted as part of the standard go toolchain. Its
status is currently alpha. However, it comes the closest to working easily out
of the box.
[dep](https://github.com/golang/dep) is an up-and-coming dependency management
tool, which has the goal of being accepted as part of the standard go toolchain.
However, client-go does **NOT** work well with `dep` yet. To support `dep`, we
need to fix at least two issues:
1. publish native `Gopkg.toml` in client-go and other k8s.io repos, like `k8s.io/apimachinery`;
2. find a way to express transitive constraints (see https://github.com/golang/dep/issues/1124).
```sh
$ go get github.com/golang/dep
$ go install github.com/golang/dep/cmd/dep
As a workaround, which may or may not be worthwhile, you can specify all
client-go dependencies manually as
[override](https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md#override)
in Gopkg.toml with the versions listed in [Godeps.json](./Godeps/Godeps.json),
and manually update them when you upgrade client-go version.
# Make sure you have a go file in your directory which imports a package of
# k8s.io/client-go first--I suggest copying one of the examples.
$ dep init
$ dep ensure k8s.io/client-go@^2.0.0
```
Then you can try one of the
[examples](https://github.com/kubernetes/client-go/tree/v2.0.0/examples/) from
the 2.0.0 release.
This will set up a `vendor` directory in your current directory, add `k8s.io/client-go`
to it, and flatten all of `k8s.io/client-go`'s dependencies into that vendor directory,
so that your code and `client-go` will both get the same copy of each
dependency.
After installing like this, you could either use dep for your other
dependencies, or copy everything in the `vendor` directory into your
`$GOPATH/src` directory and proceed as if you had done a fancy `go get` that
flattened dependencies sanely.
One thing to note about dep is that it will omit dependencies that aren't
actually used, and some dependencies of `client-go` are used only if you import
one of the plugins (for example, the auth plugins). So you may need to run `dep
ensure` again if you start importing a plugin that you weren't using before.
We are actively working on the two issues blocking using `dep`. For the
meantime, we recommend using `glide` or `godeps`.