Skip to content

Commit 8092065

Browse files
committed
add missing tasks in release-lead handbook
1 parent 345a14f commit 8092065

File tree

1 file changed

+172
-1
lines changed
  • docs/release/role-handbooks/release-lead

1 file changed

+172
-1
lines changed

docs/release/role-handbooks/release-lead/README.md

Lines changed: 172 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,175 @@ Prior art:
8080

8181
* 1.5 - https://github.com/kubernetes-sigs/cluster-api/pull/8430/files
8282
* 1.6 - https://github.com/kubernetes-sigs/cluster-api/pull/9097/files
83-
* 1.7 - https://github.com/kubernetes-sigs/cluster-api/pull/9799/files
83+
* 1.7 - https://github.com/kubernetes-sigs/cluster-api/pull/9799/files
84+
85+
#### Create a new GitHub milestone for the next release
86+
87+
The goal of this task is to create [a new GitHub milestone](https://github.com/kubernetes-sigs/cluster-api/milestones) for the next release, so that we can already move tasks
88+
out of the current milestone if necessary.
89+
90+
1. Create the milestone for the new release via GitHub UI.
91+
92+
#### [Track] Remove previously deprecated code
93+
94+
The goal of this task is to remove all previously deprecated code that can be now removed.
95+
96+
1. Check for deprecated code and remove it.
97+
* We can't just remove all code flagged with `Deprecated`. In some cases like e.g. in API packages
98+
we have to keep the old code.
99+
100+
Prior art: [Remove code deprecated in v1.6](https://github.com/kubernetes-sigs/cluster-api/pull/9136)
101+
102+
#### [Track] Bump dependencies
103+
104+
The goal of this task is to ensure that we have relatively up-to-date dependencies at the time of the release.
105+
This reduces the risk that CVEs are found in outdated dependencies after our release.
106+
107+
We should take a look at the following dependencies:
108+
109+
* Go dependencies in `go.mod` files.
110+
* Tools used in our Makefile (e.g. kustomize).
111+
112+
#### Set a tentative release date for the next minor release
113+
114+
1. Set a tentative release date for the next minor release and document it by creating a `release-X.Y.md` in [docs/release/releases](../../releases).
115+
<br>Prior art: https://github.com/kubernetes-sigs/cluster-api/pull/9635
116+
117+
#### Assemble next release team
118+
119+
There is currently no formalized process to assemble the release team.
120+
As of now we ask for volunteers in Slack and office hours.
121+
122+
#### Update milestone applier and GitHub Actions
123+
124+
Once release branch is created by GitHub Automation, the goal of this task would be to ensure we have the milestone
125+
applier that applies milestones accordingly and to update GitHub actions to work with new release version.
126+
From this point forward changes which should land in the release have to be cherry-picked into the release branch.
127+
128+
1. Update the [milestone applier config](https://github.com/kubernetes/test-infra/blob/0b17ef5ffd6c7aa7d8ca1372d837acfb85f7bec6/config/prow/plugins.yaml#L371) accordingly (e.g. `release-1.5: v1.5` and `main: v1.6`)
129+
<br>Prior art: [cluster-api: update milestone applier config for v1.5](https://github.com/kubernetes/test-infra/pull/30058)
130+
131+
2. Update the GitHub Actions to work with the new release version.
132+
<br>Prior art: [Update actions for v1.7](https://github.com/kubernetes-sigs/cluster-api/pull/10357)
133+
134+
#### [Continuously] Maintain the GitHub release milestone
135+
136+
The goal of this task is to keep an overview over the current release milestone and the implementation
137+
progress of issues assigned to the milestone.
138+
139+
This can be done by:
140+
141+
1. Regularly checking in with folks implementing an issue in the milestone.
142+
2. If nobody is working on an issue in the milestone, drop it from the milestone.
143+
3. Ensuring we have a plan to get `release-blocking` issues implemented in time.
144+
145+
#### [Continuously] Bump the Go version
146+
147+
The goal of this task is to ensure we are always using the latest Go version for our releases.
148+
149+
1. Keep track of new Go versions
150+
2. Bump the Go version in supported branches if necessary
151+
<br>Prior art: [Bump to Go 1.19.5](https://github.com/kubernetes-sigs/cluster-api/pull/7981)
152+
153+
Note: If the Go minor version of one of our supported branches goes out of supported, we should consider bumping
154+
to a newer Go minor version according to our [backport policy](./../../../../CONTRIBUTING.md#backporting-a-patch).
155+
156+
#### [Repeatedly] Cut a release
157+
158+
1. Ensure CI is stable before cutting the release (e.g. by checking with the CI manager)
159+
Note: special attention should be given to image scan results, so we can avoid cutting a release with CVE or document known CVEs in release notes.
160+
2. Ask the [Communications/Docs/Release Notes Manager](#communicationsdocsrelease-notes-manager) to [create a PR with the release notes](#create-pr-for-release-notes) for the new desired tag and review the PR. Once the PR merges, it will trigger a [GitHub Action](https://github.com/kubernetes-sigs/cluster-api/actions/workflows/release.yaml) to create a release branch, push release tags, and create a draft release. This will also trigger a [ProwJob](https://prow.k8s.io/?repo=kubernetes-sigs%2Fcluster-api&job=post-cluster-api-push-images) to publish images to the staging repository.
161+
3. Promote images from the staging repository to the production registry (`registry.k8s.io/cluster-api`):
162+
1. Wait until images for the tag have been built and pushed to the [staging repository](https://console.cloud.google.com/gcr/images/k8s-staging-cluster-api) by the [post push images job](https://prow.k8s.io/?repo=kubernetes-sigs%2Fcluster-api&job=post-cluster-api-push-images).
163+
2. If you don't have a GitHub token, create one by going to your GitHub settings, in [Personal access tokens](https://github.com/settings/tokens). Make sure you give the token the `repo` scope.
164+
3. Create a PR to promote the images to the production registry:
165+
166+
```bash
167+
# Export the tag of the release to be cut, e.g.:
168+
export RELEASE_TAG=v1.0.1
169+
export GITHUB_TOKEN=<your GH token>
170+
make promote-images
171+
```
172+
173+
**Notes**:
174+
* `make promote-images` target tries to figure out your Github user handle in order to find the forked [k8s.io](https://github.com/kubernetes/k8s.io) repository.
175+
If you have not forked the repo, please do it before running the Makefile target.
176+
* if `make promote-images` fails with an error like `FATAL while checking fork of kubernetes/k8s.io` you may be able to solve it by manually setting the USER_FORK variable i.e. `export USER_FORK=<personal GitHub handle>`
177+
* `kpromo` uses `[email protected]:...` as remote to push the branch for the PR. If you don't have `ssh` set up you can configure
178+
git to use `https` instead via `git config --global url."https://github.com/".insteadOf [email protected]:`.
179+
* This will automatically create a PR in [k8s.io](https://github.com/kubernetes/k8s.io) and assign the CAPI maintainers.
180+
4. Merge the PR (/lgtm + /hold cancel) and verify the images are available in the production registry:
181+
* Wait for the [promotion prow job](https://prow.k8s.io/?repo=kubernetes%2Fk8s.io&job=post-k8sio-image-promo) to complete successfully. Then test the production images are accessible:
182+
183+
```bash
184+
docker pull registry.k8s.io/cluster-api/clusterctl:${RELEASE_TAG} &&
185+
docker pull registry.k8s.io/cluster-api/cluster-api-controller:${RELEASE_TAG} &&
186+
docker pull registry.k8s.io/cluster-api/kubeadm-bootstrap-controller:${RELEASE_TAG} &&
187+
docker pull registry.k8s.io/cluster-api/kubeadm-control-plane-controller:${RELEASE_TAG}
188+
```
189+
190+
4. Publish the release in GitHub:
191+
1. Reach out to one of the maintainers over the Slack to publish the release in GitHub.
192+
* **NOTE:** clusterctl will have issues installing providers between the time the release tag is cut and the Github release is published. See [issue 7889](https://github.com/kubernetes-sigs/cluster-api/issues/7889) for more details.
193+
* The draft release should be automatically created via the [Create Release GitHub Action](https://github.com/kubernetes-sigs/cluster-api/actions/workflows/release.yaml) with release notes previously committed to the repo by the release team. Ensure by reminding the maintainer that release is flagged as `pre-release` for all `beta` and `rc` releases or `latest` for a new release in the most recent release branch.
194+
195+
5. Publish `clusterctl` to Homebrew by bumping the version in [clusterctl.rb](https://github.com/Homebrew/homebrew-core/blob/master/Formula/c/clusterctl.rb).
196+
<br>**Notes**:
197+
* This is only done for new latest stable releases, not for beta / RC releases and not for previous release branches.
198+
* Check if homebrew already has a PR to update the version (homebrew introduced automation that picks it up). Open one if no PR exists.
199+
* To open a PR, you need two things: `tag` (i.e v1.5.3 & v1.4.8 releases are being published, where release-1.5 is the latest stable release branch, so tag would be v1.5.4) and `revision` (it is a commit hash of the tag, i.e if the tag is v1.5.3, it can be found by looking for commit id in [v1.5.3 tag page](https://github.com/kubernetes-sigs/cluster-api/releases/tag/v1.5.3)).
200+
* Once the PR is open, no action should be needed. Homebrew bot should push a second commit (see an example [here](https://github.com/Homebrew/homebrew-core/pull/129986/commits/0da6edddf1143aa50033f7e8ae1ebd07ecdd0941)) to the same PR to update the binary hashes automatically.
201+
* For an example please see: [PR: clusterctl 1.5.3](https://github.com/Homebrew/homebrew-core/pull/152279).
202+
* Homebrew has [conventions for commit messages](https://docs.brew.sh/Formula-Cookbook#commit) usually
203+
the commit message for us should look like: `clusterctl 1.5.3`.
204+
6. **For minor releases** Set EOL date for previous release and update Cluster API support and guarantees in CONTRIBUTING.md (prior art: https://github.com/kubernetes-sigs/cluster-api/pull/9817/files).
205+
7. **For latest stable releases** Index the most recent CRDs in the release by navigating to `https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api@<CURRENT_RELEASE>`
206+
207+
Additional information:
208+
209+
* [Versioning documentation](./../../../../CONTRIBUTING.md#versioning) for more information.
210+
* Cutting a release as of today requires permissions to:
211+
* Create a release tag on the GitHub repository.
212+
* Create/update/publish GitHub releases.
213+
214+
#### [Optional] Public release session
215+
1. Host a release session over a public zoom meeting.
216+
2. Record the session for future reference and transparency.
217+
3. Use release process-related waiting periods as a forum for discussing issues/questions.
218+
4. Publish the recording on YouTube channel.
219+
220+
#### [Optional] [Track] Bump the Cluster API apiVersion
221+
222+
**Note** This should only be done when we have to bump the apiVersion of our APIs.
223+
224+
1. Add new version of the types:
225+
1. Create new api packages by copying existing packages.
226+
2. Make sure webhooks only exist in the latest apiVersion (same for other subpackages like `index`).
227+
3. Add conversion and conversion tests.
228+
4. Adjust generate targets in the Makefile.
229+
5. Consider dropping fields deprecated in the previous apiVersion.
230+
2. Update import aliases in `.golangci.yml`.
231+
3. Switch other code over to the new version (imports across the code base, e.g. controllers).
232+
1. Add all versions to the schema in the `main.go` files.
233+
4. Add types to the `PROJECT` files of the respective provider.
234+
5. Add test data for the new version in `test/e2e/data/{infrastructure-docker,shared}` (also update top-level `.gitignore`).
235+
6. Update `docker.yaml`, make sure all tests are successful in CI.
236+
237+
#### [Optional] [Track] Bump the Kubernetes version
238+
239+
1. Create an issue for the new Kubernetes version via: [New Issue: Kubernetes bump](https://github.com/kubernetes-sigs/cluster-api/issues/new/choose).
240+
2. Track the issue to ensure the work is completed in time.
241+
242+
#### [Optional] Track Release and Improvement tasks
243+
244+
1. Create an issue for easier tracking of all the tasks for the release cycle in question.
245+
<br>Prior art: [Tasks for v1.6 release cycle](https://github.com/kubernetes-sigs/cluster-api/issues/9094)
246+
2. Create a release improvement tasks [GitHub Project Board](https://github.com/orgs/kubernetes-sigs/projects/55) to track
247+
the current status of all improvement tasks planned for the release, their priorities, status (i.e `Done`/`In Progress`)
248+
and to distribute the work among the Release Team members.
249+
250+
**Notes**:
251+
* At the beginning of the cycle, Release Team Lead should prepare the improvement tasks board for the ongoing release cycle.
252+
The following steps can be taken:
253+
- Edit improvement tasks board name for current cycle (e.g. `CAPI vX.Y release improvement tasks`)
254+
- Add/move all individual missing issues to the board

0 commit comments

Comments
 (0)