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
Copy file name to clipboardExpand all lines: VERSIONING.md
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,8 +64,8 @@ take care of building and publishing the artifacts.
64
64
| Name | Example | Description |
65
65
|--- |--- |--- |
66
66
| 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-alpha"`| 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-alpha`| 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. |
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
69
70
70
### Incrementing versions
71
71
@@ -76,32 +76,31 @@ Project versions should only be increased if a breaking change is introduced in
76
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
77
for more details on plugin versioning.
78
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-alpha"` and beyond define a `layout` key that informs the plugin system of which plugin to use.
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
80
81
81
## Introducing changes to plugins
82
82
83
83
Changes made to plugins only require a plugin version increase if and only if a change is made to a plugin
84
84
that breaks projects scaffolded with the previous plugin version. Once a plugin version `vX` is stabilized (it doesn't
85
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/plugin/vX pkg/plugin/v(X+1)` then updating
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
87
version numbers and paths. All further breaking changes to the plugin should be made in this package; the `vX`
88
88
plugin would then be frozen to breaking changes.
89
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
+
90
94
### Example
91
95
92
-
KubeBuilder scaffolds projects with plugin `go.kubebuilder.io/v2` by default. A `v3-alpha` version
93
-
was created after `v2` stabilized.
96
+
KubeBuilder scaffolds projects with plugin `go.kubebuilder.io/v3` by default.
94
97
95
98
You create a feature that adds a new marker to the file `main.go` scaffolded by `init`
96
99
that `create api` will use to update that file. The changes introduced in your feature
97
100
would cause errors if used with projects built with plugins `go.kubebuilder.io/v2`
98
101
without users manually updating their projects. Thus, your changes introduce a breaking change
99
102
to plugin `go.kubebuilder.io`, and can only be merged into plugin version `v3-alpha`.
100
-
This plugin's package should exist already, so a PR must be made against the
101
-
102
-
You must also add a migration guide to the [migrations](https://book.kubebuilder.io/migrations.html)
103
-
section of the KubeBuilder book in your PR. It should detail the steps required
104
-
for users to upgrade their projects from `v2` to `v3-alpha`.
Copy file name to clipboardExpand all lines: docs/book/src/migration/project/v2_v3.md
+7-31Lines changed: 7 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,11 +39,11 @@ layout: go.kubebuilder.io/v2
39
39
40
40
- Update the `version`
41
41
42
-
The `version` field represents the version of Project layouts. So, you ought to update this to `3-alpha`:
42
+
The `version` field represents the version of Project layouts. So, you ought to update this to `"3"`:
43
43
44
44
```
45
45
...
46
-
version: 3-alpha`
46
+
version: "3"
47
47
...
48
48
```
49
49
@@ -58,7 +58,7 @@ resources:
58
58
- group: webapp
59
59
kind: Guestbook
60
60
version: v1
61
-
version: 3-alpha
61
+
version: "3"
62
62
```
63
63
64
64
### Verification
@@ -68,47 +68,23 @@ fine.
68
68
69
69
## Migrating your projects to use v3+ plugins
70
70
71
-
<asideclass="note warning">
72
-
73
-
<h1>Note</h1>
74
-
75
-
`v3+` plugins are still in alpha phase and are not scaffolded by default. You are able to use them, try it out and get all improvements made so far by initializing projects with the arg `--plugins=go.kubebuilder.io/v3-alpha`:
Currently, the plugin `v3-alpha` has NO breaking changes. However, until it is declared stable breaking changes can be made related to K8s API deprecations of `v1beta1` versions of `CustomResourceDefinition` and `ValidatingWebhookConfiguration` and to upgrade the `cert-manager`. More info:
88
-
89
-
-[cert-manager related configuration should be migrated to cert-manager.io/v1 #1666
0 commit comments