From af0517a86e3a69713ded3d55bc4e4db777d368ab Mon Sep 17 00:00:00 2001 From: Joe Beda Date: Wed, 1 Mar 2017 14:59:48 -0800 Subject: [PATCH] Update INSTALL.md to match reality Signed-off-by: Joe Beda --- INSTALL.md | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index d9bd12d2..0b45c390 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -2,24 +2,10 @@ ## For the casual user -If you want to write a simple script, don't care about a reproducible client -library install, don't mind getting head (which may be less stable than a -particular release) and don't share any dependencies with client-go, then -simply: - -```sh -$ go get k8s.io/client-go/... - -# Test install -$ go build k8s.io/client-go/examples/... -``` - -This will install `k8s.io/client-go` in your `$GOPATH`. `k8s.io/client-go` includes its own -dependencies in its `k8s.io/client-go/vendor` path. `go get` will not flatten -those dependencies into your `$GOPATH`, which means they will be distinct from -any dependencies you may already have there. This will be problematic if you -happen to already have a copy of, say, glog, and in that case you'll need to -look down at the next section. +Currently, there is no super easy way to use client-go. Hopefully this will +change soon. Simply running `go get k8s.io/client-go/...` will leave you with a +library that can't practically be used. It is important to synchronize your +dependencies with the ones that are required by the library. Note: the official go policy is that libraries should not vendor their dependencies. This is unworkable for us, since our dependencies change and HEAD @@ -53,10 +39,11 @@ $ go install github.com/golang/dep/cmd/dep # Make sure you have a go file in your directory which imports k8s.io/client-go # first--I suggest copying one of the examples. +$ dep init $ dep ensure k8s.io/client-go@^2.0.0 ``` -This will set up a /vendor directory in your current directory, add `k8s.io/client-go` +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.