mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 01:50:55 +00:00
Introduce API module.
This commit is contained in:
@@ -305,8 +305,8 @@ A Go plugin for kustomize looks like this:
|
||||
> package main
|
||||
>
|
||||
> import (
|
||||
> "sigs.k8s.io/kustomize/v3/pkg/ifc"
|
||||
> "sigs.k8s.io/kustomize/v3/pkg/resmap"
|
||||
> "sigs.k8s.io/kustomize/api/ifc"
|
||||
> "sigs.k8s.io/kustomize/api/resmap"
|
||||
> ...
|
||||
> )
|
||||
>
|
||||
|
||||
@@ -52,7 +52,8 @@ kustomize and the plugin_.
|
||||
|
||||
This means a one-time run of
|
||||
```
|
||||
GOPATH=${whatever} GO111MODULE=on go get sigs.k8s.io/kustomize/kustomize/v3
|
||||
# Or whatever is appropriate at time of reading
|
||||
GOPATH=${whatever} GO111MODULE=on go get sigs.k8s.io/kustomize/api
|
||||
```
|
||||
|
||||
and then a normal development cycle using
|
||||
|
||||
@@ -46,7 +46,7 @@ Need v3.0.0 for what follows, and you must _compile_
|
||||
it (not download the binary from the release page):
|
||||
|
||||
```shell
|
||||
GOPATH=$tmpGoPath go install sigs.k8s.io/kustomize/v3/cmd/kustomize
|
||||
GOPATH=$tmpGoPath go install sigs.k8s.io/kustomize/kustomize
|
||||
```
|
||||
|
||||
## Make a home for plugins
|
||||
|
||||
@@ -30,14 +30,14 @@ See the [installation docs](INSTALL.md).
|
||||
## Go API Versioning
|
||||
|
||||
The public methods in the public packages
|
||||
of module `sigs.k8s.io/kusomize` constitute
|
||||
of module `sigs.k8s.io/kustomize/api` constitute
|
||||
the _kustomize Go API_.
|
||||
|
||||
#### Version sigs.k8s.io/kustomize/v3 and earlier
|
||||
|
||||
[import path]: https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher
|
||||
|
||||
In `v3` (and preceeding major versions), the
|
||||
In `kustomize/v3` (and preceeding major versions), the
|
||||
kustomize program and the API live the same Go
|
||||
module at `sigs.k8s.io/kustomize`, at [import path]
|
||||
`sigs.k8s.io/kustomize/v3`.
|
||||
@@ -83,10 +83,11 @@ The last option seems the most appealing.
|
||||
|
||||
#### The first stable API version is coming
|
||||
|
||||
The first stable API version will launch at
|
||||
The first stable API version will launch
|
||||
as the Go module
|
||||
|
||||
```
|
||||
sigs.k8s.io/kustomize/api/v1
|
||||
sigs.k8s.io/kustomize/api
|
||||
```
|
||||
|
||||
The _kustomize_ program itself (`main.go`
|
||||
@@ -105,7 +106,9 @@ obey semver with a sustainable public
|
||||
surface, informed by current usage. Clients
|
||||
should import packages from this module, i.e.
|
||||
from import paths prefixed by
|
||||
`sigs.k8s.io/kustomize/api/v1`. The kustomize binary
|
||||
`sigs.k8s.io/kustomize/api/` at first,
|
||||
and later by `sigs.k8s.io/kustomize/api/v2/`.
|
||||
The kustomize binary
|
||||
itself is an API client requiring this module.
|
||||
|
||||
The clients and API will evolve independently.
|
||||
|
||||
@@ -35,5 +35,5 @@ chmod u+x kustomize
|
||||
|
||||
<!-- @installkustomize @testAgainstLatestRelease -->
|
||||
```
|
||||
go install sigs.k8s.io/kustomize/v3/cmd/kustomize
|
||||
go install sigs.k8s.io/kustomize/kustomize
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user