Skip to content

Commit ea06f6d

Browse files
committed
Link to common versioning
This adds a versioning file that links to the common kubebuilder versioning guidelines in kubebuilder-release-tools, and notes the kubebuilder-specific bits. Some of this got shuffled around from CONTRIBUTING.md, since it's thematically versioning. This also removes a confusion unused cloudbuild file.
1 parent cfc1715 commit ea06f6d

File tree

4 files changed

+113
-70
lines changed

4 files changed

+113
-70
lines changed

CONTRIBUTING.md

Lines changed: 13 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ Following the targets that can be used to test your changes locally.
6161

6262
## PR Process
6363

64+
See [VERSIONING.md](VERSIONING.md) for a full description. TL;DR:
65+
6466
Every PR should be annotated with an icon indicating whether it's
6567
a:
6668

@@ -91,56 +93,23 @@ separately.
9193

9294
## How to contribute to docs
9395

94-
We currently have 2 production branches, `book-v2` and `book-v1`. `book-v2` maps
95-
to `book.kubebuilder.io` which contains our latest released features, while
96-
`book-v1` maps to `book-v1.book.kubebuilder.io`, which contains our legacy docs
97-
for kubebuilder V1.
96+
The docs are published off of three branches:
9897

99-
Docs for unreleased features live in the `master` branch. We merge the `master`
100-
branch into the `book-v2` branch when doing the releases.
98+
- `book-v2`: [book.kubebuilder.io](https://book.kubebuilder.io) -- current
99+
docs
100+
- `book-v2`:
101+
[book-v1.book.kubebuilder.io](https://book-v2.book.kubebuilder.io) --
102+
legacy docs
103+
- `master`:
104+
[master.book.kubebuilder.io](https://master.book.kubebuilder.io) --
105+
"nightly" docs
101106

102-
If adding doc for an unreleased feature, the PR should target `master` branch.
103-
If updating existing docs, the PR should target `master` branch and then
104-
cherry-picked into `book-v2` branch.
107+
See [VERSIONING.md](VERSIONING.md#book-releases) for more information.
105108

106109
### How to preview the changes performed in the docs
107110

108111
Check the CI job after to do the Pull Request and then, click on in the `Details` of `netlify/kubebuilder/deploy-preview`
109112

110-
## Understanding the versions
111-
112-
| Name | Example | Description |
113-
|--- |--- |--- |
114-
| PROJECT version | `v1`,`v2`,`v3` | As of the introduction of [Extensible CLI and Scaffolding Plugins](https://github.com/kubernetes-sigs/kubebuilder/blob/master/designs/extensible-cli-and-scaffolding-plugins-phase-1.md), PROJECT version represents the layout of PROJECT file itself. For `v1` and `v2` projects, there's extra meaning -- see below. |
115-
| Release 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](https://github.com/kubernetes-sigs/kubebuilder/releases) page. |
116-
| Plugin Versions | `go.kubebuilder.io/v2.0.0` | Represents the version of an individual plugin, as well as the corresponding scaffolding that it generates. |
117-
118-
Note that PROJECT version should only be bumped if a breaking change is introduced in the PROJECT file format itself. Changes to the Go scaffolding or the KubeBuilder CLI *do not* affect the PROJECT version.
119-
120-
Similarly, the introduction of a new major version (`(x+1).0.0`) of the Go plugin might only lead to a new minor (`x.(y+1).0`) 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 version of the plugin.
121-
122-
For more information on how the release and plugin versions work, see the the [semver](https://semver.org/) documentation.
123-
124-
**NOTE:** In the case of the `v1` and `v2` PROJECT version, a corresponding Plugin version is implied and constant -- `v1` implies the `go.kubebuilder.io/v1` Plugin, and similarly for `v2`. This is for legacy purposes -- no such implication is made with the `v3` PROJECT version.
125-
126-
## Introducing changes in the scaffold files
127-
128-
Changes in the scaffolded files require a new Plugin version. If we delete or update a file that is scaffolded by default, it's a breaking change and requires a `MAJOR` Plugin version. If we add a new file, it may not be a breaking change.
129-
130-
**More simply:** any change that will break the expected behaviour of a project built with the previous `MINOR` Plugin versions is a breaking change to that plugin.
131-
132-
**EXAMPLE:**
133-
134-
KubeBuilder Release version (`5.3.1`) scaffolds projects with the plugin version `3.2.1` by default.
135-
136-
The changes introduced in our PR will not work well with the projects which were built with the plugin versions `3.0.0...3.5.1` without users taking manual steps to update their projects. Thus, our changes introduce a breaking change to the Go plugin, and require a `MAJOR` Plugin version bump.
137-
138-
In the PR, we should add a migration guide to the [Migrations](https://book.kubebuilder.io/migrations.html) section of the KubeBuilder book. It should detail the required steps that users should take to upgrade their projects from `go.kubebuilder.io/3.X.X` to the new `MAJOR` Plugin version `go.kubebuilder.io/4.0.0`.
139-
140-
This also means we should introduce a new KubeBuilder minor version `5.4.0` when the project is released: since we've only added a new plugin version without removing the old one, this is considered a new feature to KubeBuilder, and not a breaking change.
141-
142-
**IMPORTANT** Breaking changes cannot be made to PROJECT versions v1 and v2, and consequently plugin versions `go.kubebuilder.io/1` and `go.kubebuilder.io/2`.
143-
144113
## Community, discussion and support
145114

146115
Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/).
@@ -159,4 +128,4 @@ KubeBuilder and the related repositories. See
159128

160129
Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md).
161130

162-
[golangci]:https://github.com/golangci/golangci-lint
131+
[golangci]:https://github.com/golangci/golangci-lint

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ Provide clean library abstractions with clear and well exampled godocs.
7676
- Driven off of `//+` comments
7777
- Provide bootstrapping commands to initialize new packages
7878

79+
## Versioning and Releasing
80+
81+
See [VERSIONING.md](VERSIONING.md).
82+
7983
## Troubleshooting
8084

8185
- ### Bugs and Feature Requests:
@@ -93,4 +97,4 @@ Before starting any work, please either comment on an existing issue, or file a
9397

9498
## Supportability
9599

96-
Currently, Kubebuilder officially supports OSX and Linux platforms. So, if you are using a Windows OS you may find issues. Contributions towards supporting Windows are welcome.
100+
Currently, Kubebuilder officially supports OSX and Linux platforms. So, if you are using a Windows OS you may find issues. Contributions towards supporting Windows are welcome.

VERSIONING.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Versioning and Releasing for KubeBuilder
2+
3+
We (mostly) follow the [common KubeBuilder versioning
4+
guidelines][guidelines], and use the corresponding tooling and PR process
5+
described there.
6+
7+
For the purposes of the aforementioned guidelines, KubeBuilder counts as
8+
a "CLI project".
9+
10+
[guidelines]: https://sigs.k8s.io/kubebuilder-release-tools/VERSIONING.md
11+
12+
## Compability
13+
14+
Note that we generally do not support older release branches, except in
15+
extreme circumstances.
16+
17+
Bear in mind that changes to scaffolding generally constitute breaking
18+
changes -- see [below](#understanding-the-versions) for more details.
19+
20+
## Releasing
21+
22+
When releasing, you'll need to:
23+
24+
- to update references in [the build directory](build/) to the latest
25+
version of the [envtest tools](#tools-releases) **before tagging the
26+
release.**
27+
28+
- reset the book branch: see [below](#book-releases)
29+
30+
You may also want to check that the book is generating the marker docs off
31+
the latest controller-tools release. That info is stored in
32+
[docs/book/install-and-build.sh](/docs/book/install-and-build.sh).
33+
34+
## Book Releases
35+
36+
The book's main version (https://book.kubebuilder.io) is published off of
37+
the [book-v2][book-branch] (a version built off the main branch can be
38+
found at https://master.book.kubebuilder.io).
39+
40+
Docs changes that aren't specific to a new feature should be
41+
cherry-picked to the aforementioned branch to get them to be published.
42+
The cherry-picks will automatically be published to the book once their PR
43+
merges.
44+
45+
**When you publish a KubeBuilder release**, be sure to also submit a PR
46+
that merges the main branch into [book-v2][book-branch], so that it
47+
describes the latest changes in the new release.
48+
49+
[book-branch]: https://github.com/kubernetes-sigs/kubebuilder/tree/tools-releases
50+
51+
## Tools Releases
52+
53+
In order to update the [envtest tools][envtest-ref], you'll need to do an
54+
update to the [tools-releases branch][tools-branch]. Simply submit a PR
55+
against that branch that changes all references to the current version to
56+
the desired next version. Once the PR is merged, Google Cloud Build will
57+
take care of building and publishing the artifacts.
58+
59+
[envtest-ref]: https://book.kubebuilder.io/reference/artifacts.html
60+
[tools-branch]: https://github.com/kubernetes-sigs/kubebuilder/tree/tools-releases)
61+
62+
## Understanding the versions
63+
64+
| Name | Example | Description |
65+
|--- |--- |--- |
66+
| PROJECT version | `v1`,`v2`,`v3` | As of the introduction of [Extensible CLI and Scaffolding Plugins](https://github.com/kubernetes-sigs/kubebuilder/blob/master/designs/extensible-cli-and-scaffolding-plugins-phase-1.md), PROJECT version represents the layout of PROJECT file itself. For `v1` and `v2` projects, there's extra meaning -- see below. |
67+
| Release 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](https://github.com/kubernetes-sigs/kubebuilder/releases) page. |
68+
| Plugin Versions | `go.kubebuilder.io/v2.0.0` | Represents the version of an individual plugin, as well as the corresponding scaffolding that it generates. |
69+
70+
Note that PROJECT version should only be bumped if a breaking change is introduced in the PROJECT file format itself. Changes to the Go scaffolding or the KubeBuilder CLI *do not* affect the PROJECT version.
71+
72+
Similarly, the introduction of a new major version (`(x+1).0.0`) of the Go plugin might only lead to a new minor (`x.(y+1).0`) 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 version of the plugin.
73+
74+
For more information on how the release and plugin versions work, see the the [semver](https://semver.org/) documentation.
75+
76+
**NOTE:** In the case of the `v1` and `v2` PROJECT version, a corresponding Plugin version is implied and constant -- `v1` implies the `go.kubebuilder.io/v1` Plugin, and similarly for `v2`. This is for legacy purposes -- no such implication is made with the `v3` PROJECT version.
77+
78+
## Introducing changes in the scaffold files
79+
80+
Changes in the scaffolded files require a new Plugin version. If we delete or update a file that is scaffolded by default, it's a breaking change and requires a `MAJOR` Plugin version. If we add a new file, it may not be a breaking change.
81+
82+
**More simply:** any change that will break the expected behaviour of a project built with the previous `MINOR` Plugin versions is a breaking change to that plugin.
83+
84+
**EXAMPLE:**
85+
86+
KubeBuilder Release version (`5.3.1`) scaffolds projects with the plugin version `3.2.1` by default.
87+
88+
The changes introduced in our PR will not work well with the projects which were built with the plugin versions `3.0.0...3.5.1` without users taking manual steps to update their projects. Thus, our changes introduce a breaking change to the Go plugin, and require a `MAJOR` Plugin version bump.
89+
90+
In the PR, we should add a migration guide to the [Migrations](https://book.kubebuilder.io/migrations.html) section of the KubeBuilder book. It should detail the required steps that users should take to upgrade their projects from `go.kubebuilder.io/3.X.X` to the new `MAJOR` Plugin version `go.kubebuilder.io/4.0.0`.
91+
92+
This also means we should introduce a new KubeBuilder minor version `5.4.0` when the project is released: since we've only added a new plugin version without removing the old one, this is considered a new feature to KubeBuilder, and not a breaking change.
93+
94+
**IMPORTANT** Breaking changes cannot be made to PROJECT versions v1 and v2, and consequently plugin versions `go.kubebuilder.io/1` and `go.kubebuilder.io/2`.
95+

build/cloudbuild_tools.yaml

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)