You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| KubeBuilder version |`v2.2.0`, `v2.3.0`, `v2.3.1`| Tagged versions of the KubeBuilder project, representing changes to the source code in this repository. See the [releases][kb-releases] page for binary releases. |
67
-
| Project version |`"1"`, `"2"`, `"3"`| Project version defines the scheme of a `PROJECT` configuration file. This version is defined in a `PROJECT` file's `version`. |
68
-
| Plugin version |`v2`, `v3`| Represents the version of an individual plugin, as well as the corresponding scaffolding that it generates. This version is defined in a plugin key, ex. `go.kubebuilder.io/v2`. See the [design doc][cli-plugins-versioning] for more details. |
69
-
70
-
### Incrementing versions
71
-
72
-
For more information on how KubeBuilder release versions work, see the [semver](https://semver.org/) documentation.
73
-
74
-
Project versions should only be increased if a breaking change is introduced in the PROJECT file scheme itself. Changes to the Go scaffolding or the KubeBuilder CLI *do not* affect project version.
75
-
76
-
Similarly, the introduction of a new plugin version might only lead to a new minor version release of KubeBuilder, since no breaking change is being made to the CLI itself. It'd only be a breaking change to KubeBuilder if we remove support for an older plugin version. See the plugins design doc [versioning section][cli-plugins-versioning]
77
-
for more details on plugin versioning.
78
-
79
-
**NOTE:** the scheme for project version `"2"` was defined before the concept of plugins was introduced, so plugin `go.kubebuilder.io/v2` is implicitly used for those project types. Schema for project versions `"3"` and beyond define a `layout` key that informs the plugin system of which plugin to use.
80
-
81
-
## Introducing changes to plugins
82
-
83
-
Changes made to plugins only require a plugin version increase if and only if a change is made to a plugin
84
-
that breaks projects scaffolded with the previous plugin version. Once a plugin version `vX` is stabilized (it doesn't
85
-
have an "alpha" or "beta" suffix), a new plugin package should be created containing a new plugin with version
86
-
`v(X+1)-alpha`. Typically this is done by (semantically) `cp -r pkg/plugins/golang/vX pkg/plugins/golang/v(X+1)` then updating
87
-
version numbers and paths. All further breaking changes to the plugin should be made in this package; the `vX`
88
-
plugin would then be frozen to breaking changes.
89
-
90
-
You must also add a migration guide to the [migrations](https://book.kubebuilder.io/migrations.html)
91
-
section of the KubeBuilder book in your PR. It should detail the steps required
92
-
for users to upgrade their projects from `vX` to `v(X+1)-alpha`.
93
-
94
-
### Example
95
-
96
-
KubeBuilder scaffolds projects with plugin `go.kubebuilder.io/v3` by default.
97
-
98
-
You create a feature that adds a new marker to the file `main.go` scaffolded by `init`
99
-
that `create api` will use to update that file. The changes introduced in your feature
100
-
would cause errors if used with projects built with plugins `go.kubebuilder.io/v2`
101
-
without users manually updating their projects. Thus, your changes introduce a breaking change
102
-
to plugin `go.kubebuilder.io`, and can only be merged into plugin version `v3-alpha`.
0 commit comments