...

Text file src/github.com/openshift/client-go/README.md

Documentation: github.com/openshift/client-go

     1OpenShift Client in Go
     2==============================
     3
     4
     5Go clients for speaking to an OpenShift cluster.
     6
     7Versions track OpenShift releases.
     8
     9See [INSTALL.md](/INSTALL.md) for detailed installation instructions.
    10
    11
    12## Table of Contents
    13
    14- [Updating Dependencies and Code Generation](#updating-dependencies-and-code-generation)
    15- [How to use it](#how-to-use-it)
    16- [Compatibility](#compatibility)
    17
    18### Updating Dependencies and Code Generation
    19
    20To pull in updates from openshift/api, run the following:
    21
    22```
    23$ go get github.com/openshift/api@<commit or branch>
    24$ go mod tidy
    25$ go mod vendor
    26$ go mod verify
    27```
    28
    29To update the code generation, run the following:
    30Note: `GOFLAGS=-mod=vendor` needs to be set in the environment.
    31
    32```
    33$ make generate
    34```
    35
    36### How to use it
    37
    38See [examples](/examples).
    39
    40### Compatibility
    41
    42openshift/client-go is backwards compatible with prior server versions back to
    43v3.6 when we switched to API groups.  It is not compatible before that.
    44
    45Keep in mind that using a newer client is generally safe, but the server will
    46strip newer fields it doesn't understand from objects.  That means that if you're
    47trying to use a new feature on an old server, the server will do the best it can,
    48but you still won't have the new feature.
    49
    50Using an older client can be risky if you issue updates (not patches) to existing
    51resources.  The older client will remove newer fields on updates.  You will not have
    52this problem if you issue patches instead of updates.

View as plain text