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

Add preliminary go module instructions to client-go #75595

Merged
merged 1 commit into from Apr 1, 2019

Conversation

@liggitt
Copy link
Member

commented Mar 22, 2019

What type of PR is this?
/kind documentation

What this PR does / why we need it:
Document how to get reference client-go dependencies using go modules.

Which issue(s) this PR fixes:
Fixes kubernetes/client-go#569

Special notes for your reviewer:
This is the initial set of instructions for depending on our current versions that do not declare go.mod dependencies.

This will get updated in #74877 to provide a single go get ... command when using versions of client-go that publish go.mod dependencies.

Does this PR introduce a user-facing change?:

NONE

/cc @sttts

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Mar 22, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

go get k8s.io/client-go@v10.0.0 # replace v10.0.0 with the required version (or use kubernetes-1.x.y tags if desired)
go get k8s.io/api@kubernetes-1.13.4 # replace kubernetes-1.13.4 with the required version
go get k8s.io/apimachinery@kubernetes-1.13.4 # replace kubernetes-1.13.4 with the required version
```

This comment has been minimized.

Copy link
@sttts

sttts Mar 22, 2019

Contributor

potentially more, right? gomod will not read Godeps.json.

`k8s.io/client-go` and its dependencies will be downloaded (if needed),
and detailed dependency version info will be added to your `go.mod` file.
You can also run `go mod tidy` to do this directly.

### Dep (Not supported yet!)

This comment has been minimized.

Copy link
@BenWUKFast

BenWUKFast Mar 26, 2019

Perhaps this would be a good time to remove or update the Dep section? The long term golang plan is to completely replace Dep with go modules, so adding dep support would be silly, but a footnote may be of use?

This comment has been minimized.

Copy link
@liggitt

liggitt Mar 26, 2019

Author Member

that will be removed in the go modules PR (#74877)

Indicate the matching versions of `k8s.io/client-go`, `k8s.io/api`, and `k8s.io/apimachinery` your project requires:

```sh
go get k8s.io/client-go@v10.0.0 # replace v10.0.0 with the required version (or use kubernetes-1.x.y tags if desired)

This comment has been minimized.

Copy link
@jpeeler

jpeeler Mar 28, 2019

Contributor

All the module examples I've seen show this method of pulling client-go in, which I assume is due to the way client-go has mixed tagging. As far as I can tell there's no way to do otherwise - am I correct about this? If so, future compatibility with other dependencies is not guaranteed.

Would love to be wrong about this, but I could not get any kuberetes-1.x.y tags to work for client-go.

This comment has been minimized.

Copy link
@liggitt

liggitt Mar 28, 2019

Author Member

this tells go what version of client-go to fetch

which I assume is due to the way client-go has mixed tagging

not sure what you mean by "mixed tagging"

If so, future compatibility with other dependencies is not guaranteed

The major versions indicate each release of client-go typically makes changes someone integrating with the go API has to react to. Not sure if that is what you meant.

This comment has been minimized.

Copy link
@jpeeler

jpeeler Mar 28, 2019

Contributor

By mixed tagging, I mean both vx.0.0 and kubernetes-1.x.y. But I was wrong, sorry for the noise.

@sttts

This comment has been minimized.

Copy link
Contributor

commented Apr 1, 2019

Let's get this in. We can iterate. Users need guidance.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Apr 1, 2019

@k8s-ci-robot k8s-ci-robot merged commit b75e28f into kubernetes:master Apr 1, 2019

17 checks passed

cla/linuxfoundation liggitt authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-cross Skipped.
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-godeps Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped.
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped.
tide In merge pool.
Details

@liggitt liggitt deleted the liggitt:client-go-instructions branch Apr 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.