From a16b2784c0fecaac4fa972ae8c076d2396a69ac3 Mon Sep 17 00:00:00 2001 From: James Sturtevant Date: Thu, 15 Feb 2024 01:37:10 +0000 Subject: [PATCH] Start of release process Signed-off-by: James Sturtevant --- .../workflows/ISSUE_TEMPLATE/new-release.md | 76 +++++++++++++++++++ RELEASE.md | 46 +++++++++-- charts/values.yaml | 4 +- hack/build_windows_container.sh | 2 +- 4 files changed, 119 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/ISSUE_TEMPLATE/new-release.md diff --git a/.github/workflows/ISSUE_TEMPLATE/new-release.md b/.github/workflows/ISSUE_TEMPLATE/new-release.md new file mode 100644 index 0000000..de1e88e --- /dev/null +++ b/.github/workflows/ISSUE_TEMPLATE/new-release.md @@ -0,0 +1,76 @@ +--- +name: Cut a release +about: Create a tracking issue for a release cut +title: Cut v0.x.y release +labels: sig/windows +--- + +## Release Checklist + +The release process is documented [HERE](../../RELEASE.md)! + +- [ ] Create a new draft [release](https://github.com/kubernetes-sigs/windows-service-proxy/releases/new) + - [ ] Create a new tag targeting `main` + - [ ] Generate release notes + - [ ] Set as pre-release (until images are promoted and helm charts updated) + - [ ] Publish the pre-release + +- [ ] Promote the `kube-proxy` image + - [ ] Manually tag desired container image in the [staging registry](https://console.cloud.google.com/gcr/images/k8s-staging-win-svc-proxy?project=k8s-staging-win-svc-proxy) + - [ ] Use `kpromo` to open a image promo PR + + ```bash + export GITHUB_TOKEN= + kpromo pr --project windows-service-proxy --tag $VERSION --reviewers "@knabben @jsturtevant @marosset @aravindhp" --fork {your github username} + + ``` + - [ ] Verify the image is available using `docker pull registry.k8s.io/windows-service-proxy/kube-proxy:$VERSION` + +### optional - only if scripts or dockerfile related sourcevip image have changed +- [ ] If required, Promote the `sourcevip` image + - [ ] Manually tag desired container image in the [staging registry](https://console.cloud.google.com/gcr/images/k8s-staging-win-svc-proxy?project=k8s-staging-win-svc-proxy) + - [ ] Use `kpromo` to open a image promo PR + + ```bash + export GITHUB_TOKEN= + kpromo pr --project windows-service-proxy --tag $VERSION --reviewers "@knabben @jsturtevant @marosset @aravindhp" --fork {your github username} + + ``` + - [ ] Verify the image is available using `docker pull registry.k8s.io/windows-service-proxy/sourcevip:$VERSION` + +- [ ] Update helm charts to use new image + - [ ] Update [Chart.yaml](../../charts/Chart.yaml) + - [ ] Update `appVersion` to match the latest published container image + - [ ] Bump the `version` as appropriate + - [ ] Update [values.yaml](../../charts/values.yaml) + - Update `image.tag` to match the latest published container image + - If required, Update `sourcevipImage.tag` to match the latest published container image + - [ ] Build a helm package + + ```bash + helm package charts/gmsa --destination ./helm/repo + ``` + + - [ ] Update the repo index + + ```bash + helm repo index helm/repo/ + ``` + +- [ ] Update the release notes by adding the following template **to the top of the release notes**: + + To deploy: + + ```bash + helm repo add windows-service-proxy https://raw.githubusercontent.com/kubernetes-sigs/windows-service-proxy/main/helm/repo + helm install windows-service-proxy --namespace kube-system --version + ``` + +- [ ] Update the release + - [ ] Unset `Set as pre-release` + - [ ] Set `Set as latest release` + - [ ] Update the release + +- [ ] Send an announce email to `kubernetes-sig-windows@googlegroups.com` with the subject `[ANNOUNCE] Kubernetes SIG-Windows Windows kube-proxy HPC image $VERSION is Released` + +- [ ] Post new release in slack \ No newline at end of file diff --git a/RELEASE.md b/RELEASE.md index 7dad12e..61e3c9c 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,9 +1,43 @@ # Release Process -The Kubernetes Template Project is released on an as-needed basis. The process is as follows: +The Kubernetes Windows GMSA project is released on an as-needed basis. The process is as follows: -1. An issue is proposing a new release with a changelog since the last release -1. All [OWNERS](OWNERS) must LGTM this release -1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION` -1. The release issue is closed -1. An announcement email is sent to `dev@kubernetes.io` with the subject `[ANNOUNCE] kubernetes-template-project $VERSION is released` +1. An issue is created proposing a new release with a changelog since the last release using the [Cut a release issue template](.github//ISSUE_TEMPLATE/new-release.md) +1. All [OWNERS](OWNERS) must LGTM this release issue +1. An OWNER runs `git tag -s $VERSION` from `main` branch and pushes the tag with `git push $VERSION` +1. If required, An OWNER runs `git tag -s $SOURCEVIPVERSION` from `main` branch and pushes the tag with `git push $VERSION` +1. An OWNER promotes the `gcr.io/gcr.io/k8s-staging-win-svc-proxy/kube-proxy` image built the tagged commit. + 1. Follow setup steps for `kpromo` from [here](https://github.com/kubernetes-sigs/promo-tools/blob/main/docs/promotion-pull-requests.md#preparing-environment) if needed + 2. Manually tag the desired container image in the [staging registry](https://console.cloud.google.com/gcr/images/k8s-staging-win-svc-proxy?project=k8s-staging-win-svc-proxy) as `$VERSION` or (`$SOURCEVIPVERSION` as required) + 3. Run `kpromo pr` to open a pull request to have tagged container image promoted from staging to release registries + + ```bash + kpromo pr --project windows-service-proxy --tag $VERSION --reviewers "@jayunit100 @jsturtevant @marosset" --fork {your github username} + ``` + + (do the same for `$SOURCEVIPVERSION` if required) + + 4. Review / merge image promotion PR + 5. Verify the image is available using `docker pull registry.k8s.io/windows-service-proxy/kube-proxy:$VERSION` and `docker pull registry.k8s.io/windows-service-proxy/kube-proxy:$SOURCEVIPVERSION` as needed. The image is pushed to the release repository via the post submit which can take an hour or two to trigger. View results at https://testgrid.k8s.io/sig-k8s-infra-k8sio#post-k8sio-image-promo + +3. An OWNER creates a release with by + 1. Navigating to [releases](https://github.com/kubernetes-sigs/windows-service-proxy/releases) and clicking on `Draft a new release` + 2. Selecting the tag for the current release version + 3. Setting the title of the release to the current release version + 4. Clicking `Auto-generate release notes` button (and editing what was generated as appropriate) + 5. Adding instructions on how to deploy the current release **to the top of the releaes notes** with the following template: + + To deploy: + + ```bash + helm repo add windows-service-proxy https://raw.githubusercontent.com/kubernetes-sigs/windows-service-proxy/main/helm/repo + helm install windows-service-proxy --namespace kube-system --version + ``` + + 6. Clicking on `Publish Release` +4. Update `image.tag` in `charts/chart.yaml` to $VERSION and create new chart package: + 1. Run `helm package charts/gmsa --destination ./helm/repo`. Make sure the resulting tgz file is in the `helm/repo` folder. + 2. Run `helm repo index helm/repo/` to update the helm index +5. The release issue is closed +6. An announcement email is sent to `kubernetes-sig-windows@googlegroups.com` with the subject `[ANNOUNCE] Kubernetes SIG-Windows Windows kube-proxy HPC image $VERSION is Released` +7. An announcement is posted in `#SIG-windows` in the Kubernetes slack. \ No newline at end of file diff --git a/charts/values.yaml b/charts/values.yaml index 808a849..3201524 100644 --- a/charts/values.yaml +++ b/charts/values.yaml @@ -17,10 +17,10 @@ securityContext: loglevel: 4 cni: - WinOverlay: true + WinOverlay: false sourcevipImage: - repository: gcr.io/k8s-staging-win-svc-proxy/kube-proxy:sourcevip-latest + repository: gcr.io/k8s-staging-win-svc-proxy/source-vip:latest pullPolicy: Always tag: "latest" provider: calico diff --git a/hack/build_windows_container.sh b/hack/build_windows_container.sh index 7140b2e..6033a9a 100755 --- a/hack/build_windows_container.sh +++ b/hack/build_windows_container.sh @@ -57,4 +57,4 @@ if [[ "$VERSION" != "latest" ]]; then fi docker buildx build --platform windows/amd64 --output=$output --build-arg=KUBEPROXY_VERSION=$VERSION -f Dockerfile $tags . -docker buildx build --platform windows/amd64 --output=$output -f Dockerfile.sourcevip -t ${REPOSITORY}/kube-proxy:sourcevip-$VERSION . +docker buildx build --platform windows/amd64 --output=$output -f Dockerfile.sourcevip -t ${REPOSITORY}/sourcevip:$VERSION .