Update docs

This commit is contained in:
jregan
2019-10-18 12:12:56 -07:00
parent d1240bcc63
commit a62f1364fe
2 changed files with 28 additions and 33 deletions

View File

@@ -50,6 +50,15 @@ git checkout kustomize/v3.2.3
### Other methods ### Other methods
#### Use go get
This works poorly with existing `Go` package installations at the
moment, since kustomize switched over to Go modules but hasn't
historically followed semver with respect to its API.
This is being [fixed](versioningPolicy.md), after which
`go get` should work correctly.
#### macOS #### macOS
``` ```

View File

@@ -6,40 +6,34 @@ particular version of underlying packages (a Go
API), and reading a particular version of a API), and reading a particular version of a
[kustomization] file. [kustomization] file.
> If you're having trouble with `go get`, please
> read [Go API Versioning](#go-api-versioning)
> and be patient.
## CLI Program Versioning ## CLI Program Versioning
The command `kustomize version` prints a three The command `kustomize version` prints a three
field version tag (e.g. `v3.0.0`) that aspires to field version tag (e.g. `v3.0.0`) that aspires to
[semantic versioning]. [semantic versioning].
This notion of semver applies only to the CLI. This notion of semver applies only to the CLI;
the command names, their arguments and their flags.
The major version changes when some backward The major version changes when some backward
incompatibility appears in how the commands incompatibility appears in how the commands
behave. behave.
### Installation ### Installation
The best method to install kustomize is to See the [installation docs](INSTALL.md).
download a binary from the [release page].
If you want to try minor and patch upgrades in
dependencies via `go get -u` (see `help go
get`), try something like this:
```
GO111MODULE=on go get -u sigs.k8s.io/kustomize/kustomize/v3@v3.2.1
```
## Go API Versioning ## Go API Versioning
The public methods in the public packages The public methods in the public packages
of module `sigs.k8s.io/kusomize` constitue of module `sigs.k8s.io/kusomize` constitute
the _kustomize Go API_. the _kustomize Go API_.
#### Version v3 and earlier #### Version sigs.k8s.io/kustomize/v3 and earlier
[import path]: https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher [import path]: https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher
@@ -63,8 +57,7 @@ directory named `internal`). Even a minor
refactor changing a method name or argument type refactor changing a method name or argument type
in some deeply buried (but still public) method is in some deeply buried (but still public) method is
a backward incompatible change. As a result, Go a backward incompatible change. As a result, Go
API semver hasn't been followed (or we'd be at a much API semver hasn't been followed. This was a mistake.
higher version number by now).
Some options are Some options are
@@ -88,22 +81,15 @@ Some options are
The last option seems the most appealing. The last option seems the most appealing.
Projects using the Go API directly only use about #### The first stable API version is coming
a dozen public methods in ~ten packages. These
methods could likely be combined to one or two
public packages intentionally designed for general
use, analogous to, say,
[regexp](https://golang.org/pkg/regexp) or
[go-yaml](https://github.com/go-yaml/yaml),
reducing the API surface.
#### Version v4 The first stable API version will launch at
With `v4` (i.e. the module dependency path ```
`sigs.k8s.io/kustomize/v4`) sigs.k8s.io/kustomize/api/v1
two things will happen. ```
First, the _kustomize_ program itself (`main.go` The _kustomize_ program itself (`main.go`
and CLI specific code) will have moved out of and CLI specific code) will have moved out of
`sigs.k8s.io/kustomize` and into the new module `sigs.k8s.io/kustomize` and into the new module
`sigs.k8s.io/kustomize/kustomize`. This is a `sigs.k8s.io/kustomize/kustomize`. This is a
@@ -114,12 +100,12 @@ trigger a major version bump). This module will
not export packages; it's just home to a `main` not export packages; it's just home to a `main`
package. package.
Second, `sigs.k8s.io/kustomize/v4` will start to The `sigs.k8s.io/kustomize/api` module will
obey semver with a substantially reduced public obey semver with a sustainable public
surface, informed by current usage. Clients surface, informed by current usage. Clients
should import packages from this module, i.e. should import packages from this module, i.e.
from import paths prefixed by from import paths prefixed by
`sigs.k8s.io/kustomize/v4`. The kustomize binary `sigs.k8s.io/kustomize/api/v1`. The kustomize binary
itself is an API client requiring this module. itself is an API client requiring this module.
The clients and API will evolve independently. The clients and API will evolve independently.