Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding instructions on how to use "dep" to get client-go v3.0.0-beta.0 in INSTALL.md #182

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ 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 (Experimental)

[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
Expand All @@ -157,12 +157,23 @@ $ go install github.com/golang/dep/cmd/dep
# 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

# If you want to use client-go v2.0.0:
$ dep ensure k8s.io/client-go@^2.0.0
# client-go v2.0.0 doesn't depend on k8s.io/apimachinery, so no extra dep commands needed.

# If you want to use client-go v3.0.0-beta.0:
$ dep ensure k8s.io/[email protected]
# Unfortunately dep doesn't interpret client-go/Godeps/Godeps.json, so you need
to manually checkout the compatible k8s.io/apimachinery version:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: prefix with "#"

$ dep ensure k8s.io/apimachinery@75b8dd260ef0469d96d578705a87cffd0e09dab8
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i checked out 72e51762028fdf72f1a20e59bedceece02a425c6.

but i see errors like

scheme.AddDefaultingFuncs undefined (type *runtime.Scheme has no field or method AddDefaultingFuncs)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also both apimachinery and master are broken.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm... it seems working now after i got every deps flattened.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like dep doesn't remove nested "vendor" directories golang/dep#120

```

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.
the v2.0.0 or
[those](https://github.com/kubernetes/client-go/tree/v3.0.0-beta.0/examples)
from v3.0.0-beta.0.

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,
Expand Down