Skip to content

Commit 6f05c0a

Browse files
committed
Update release process
1 parent 855780c commit 6f05c0a

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,22 @@ 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+
1. 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+
13+
2. Ensure access to the storage bucket gs://kubernetes-release.
14+
715
## Preparing for a release
816

917
There are a few steps that should be taken prior to creating the actual release
1018
itself.
1119

1220
1. Collect changes since last release. This can be done by looking directly at
1321
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)).
22+
viewing the changes on GitHub (example: https://github.com/kubernetes/node-problem-detector/compare/v0.8.15...master).
1623

1724
2. Based on the changes to be included in the release, determine what the next
1825
release number should be. We strive to follow [SemVer](https://semver.org/)
@@ -23,25 +30,86 @@ itself.
2330

2431
## Create release
2532

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

3096
1. For convenience, add a link to easily view the changes since the last
3197
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)).
98+
[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)).
3399

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

38104
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`)
105+
registry.k8s.io/node-problem-detector/node-problem-detector:v0.8.17`)
106+
107+
4. Upload the tar files built from [pevious step](#build-and-push-artifacts),
108+
and include the SHA and MD5.
40109

41110
## Post release steps
42111

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).
112+
Update image version in [deployment/node-problem-detector.yaml](https://github.com/kubernetes/node-problem-detector/blob/422c088d623488be33aa697588655440c4e6a063/deployment/node-problem-detector.yaml#L32).
45113

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.
114+
Update the image version in the deployment file so anyone deploying directly
115+
from the repo deployment file will get the newest image deployed.

0 commit comments

Comments
 (0)