Skip to content

Commit cc9b71f

Browse files
committed
Update release process
1 parent 855780c commit cc9b71f

File tree

1 file changed

+79
-11
lines changed

1 file changed

+79
-11
lines changed

docs/release_process.md

Lines changed: 79 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,20 @@ These are notes to help follow a consistent release process. See something
44
important missing? Please submit a pull request to add anything else that would
55
be useful!
66

7+
## Prerequisites
8+
9+
Ensure access to the container image [staging registry](https://console.cloud.google.com/gcr/images/k8s-staging-npd/global/node-problem-detector).
10+
Add email to `k8s-infra-staging-npd` group in sig-node [groups.yaml](https://github.com/kubernetes/k8s.io/blob/main/groups/sig-node/groups.yaml).
11+
See example https://github.com/kubernetes/k8s.io/pull/1599.
12+
713
## Preparing for a release
814

915
There are a few steps that should be taken prior to creating the actual release
1016
itself.
1117

1218
1. Collect changes since last release. This can be done by looking directly at
1319
merged commit messages (``git log [last_release_tag]...HEAD``), or by
14-
viewing the changes on GitHub ([example:
15-
https://github.com/kubernetes/node-problem-detector/compare/v0.8.6...master](https://github.com/kubernetes/node-problem-detector/compare/v0.8.6...master)).
20+
viewing the changes on GitHub (example: https://github.com/kubernetes/node-problem-detector/compare/v0.8.15...master).
1621

1722
2. Based on the changes to be included in the release, determine what the next
1823
release number should be. We strive to follow [SemVer](https://semver.org/)
@@ -23,25 +28,88 @@ itself.
2328

2429
## Create release
2530

26-
Once changes have been merged to the CHANGELOG, perform the actual release via
27-
GitHub. When creating the release, make sure to include the following in the
28-
body of the release:
31+
### Create the new version tag
32+
33+
#### Option 1
34+
```
35+
# Use v0.8.17 as an example.
36+
git clone [email protected]:kubernetes/node-problem-detector.git
37+
cd node-problem-detector/
38+
git tag v0.8.17
39+
git push origin v0.8.17
40+
```
41+
42+
#### Option 2
43+
Update [version.txt](https://github.com/kubernetes/node-problem-detector/blob/master/version.txt)
44+
(example https://github.com/kubernetes/node-problem-detector/pull/869).
45+
46+
### Build and push artifacts
47+
This step builds the NPD into container files and tar files.
48+
- The container file is pushed to the [staging registry](https://console.cloud.google.com/gcr/images/k8s-staging-npd/global/node-problem-detector).
49+
You will promote the new image to registry.k8s.io later.
50+
- The tar files are generated locally. You will upload those to github in the
51+
release note later.
52+
53+
**Note: You need the access mentioned in the [prerequisites](#prerequisites)
54+
section to perform steps in this section.**
55+
56+
```
57+
# One-time setup
58+
sudo apt-get install libsystemd-dev gcc-aarch64-linux-gnu
59+
60+
cd node-problem-detector
61+
make push
62+
63+
# Get SHA256 of the tar files. For example
64+
sha256sum node-problem-detector-v0.8.17-linux_amd64.tar.gz
65+
sha256sum node-problem-detector-v0.8.17-linux_arm64.tar.gz
66+
sha256sum node-problem-detector-v0.8.17-windows_amd64.tar.gz
67+
68+
# Get MD5 of the tar files. For example
69+
md5sum node-problem-detector-v0.8.17-linux_amd64.tar.gz
70+
md5sum node-problem-detector-v0.8.17-linux_arm64.tar.gz
71+
md5sum node-problem-detector-v0.8.17-windows_amd64.tar.gz
72+
73+
# Verify container image in staging registry and get SHA256.
74+
docker pull gcr.io/k8s-staging-npd/node-problem-detector:v0.8.17
75+
docker image ls gcr.io/k8s-staging-npd/node-problem-detector --digests
76+
```
77+
78+
### Promote new NPD image to registry.k8s.io
79+
1. Get the SHA256 from the new NPD image from the [staging registry](https://console.cloud.google.com/gcr/images/k8s-staging-npd/global/node-problem-detector)
80+
or previous step.
81+
2. Promote the NPD image to registry.k8s.io ([images.yaml](https://github.com/kubernetes/k8s.io/blob/main/registry.k8s.io/images/k8s-staging-npd/images.yaml), example https://github.com/kubernetes/k8s.io/pull/6523).
82+
3. Verify the container image.
83+
```
84+
docker pull registry.k8s.io/node-problem-detector/node-problem-detector:v0.8.17
85+
docker image ls registry.k8s.io/node-problem-detector/node-problem-detector:v0.8.17
86+
```
87+
88+
### Create the release note
89+
90+
Go to https://github.com/kubernetes/node-problem-detector/releases, draft a new
91+
release note and publish. Make sure to include the following in the body of the
92+
release note:
2993

3094
1. For convenience, add a link to easily view the changes since the last
3195
release (e.g.
32-
[https://github.com/kubernetes/node-problem-detector/compare/v0.8.5...v0.8.6](https://github.com/kubernetes/node-problem-detector/compare/v0.8.5...v0.8.6)).
96+
[https://github.com/kubernetes/node-problem-detector/compare/v0.8.15...v0.8.17](https://github.com/kubernetes/node-problem-detector/compare/v0.8.15...v0.8.17)).
3397

3498
2. There is no need to duplicate everything from the CHANGELOG, but include the
3599
most significant things so someone just viewing the release entry will have
36100
an idea of what it includes.
37101

38102
3. Provide a link to the new image release (e.g. `Image:
39-
registry.k8s.io/node-problem-detector/node-problem-detector:v0.8.6`)
103+
registry.k8s.io/node-problem-detector/node-problem-detector:v0.8.17`)
104+
105+
4. Upload the tar files built from [pevious step](#build-and-push-artifacts),
106+
and include the SHA and MD5.
40107

41108
## Post release steps
42109

43-
1. Update image version in
44-
[deployment/node-problem-detector.yaml](https://github.com/kubernetes/node-problem-detector/blob/422c088d623488be33aa697588655440c4e6a063/deployment/node-problem-detector.yaml#L32).
110+
1. Update image version in [deployment/node-problem-detector.yaml](https://github.com/kubernetes/node-problem-detector/blob/422c088d623488be33aa697588655440c4e6a063/deployment/node-problem-detector.yaml#L32), so anyone deploying
111+
directly from the repo deployment file will get the newest image deployed.
45112

46-
Update the image version in the deployment file so anyone deploying directly
47-
from the repo deployment file will get the newest image deployed.
113+
2. Update the NPD version in [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes)
114+
repo, so that kubernetes clusters use the new NPD version. Example
115+
https://github.com/kubernetes/kubernetes/pull/123740.

0 commit comments

Comments
 (0)