Skip to content

Commit

Permalink
Start of release process
Browse files Browse the repository at this point in the history
Signed-off-by: James Sturtevant <jstur@microsoft.com>
  • Loading branch information
jsturtevant committed Feb 15, 2024
1 parent 83738f0 commit a16b278
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 9 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/ISSUE_TEMPLATE/new-release.md
Original file line number Diff line number Diff line change
@@ -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=<your 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=<your 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 <helmversion>
```

- [ ] 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
46 changes: 40 additions & 6 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -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 <helmversion>
```

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.
4 changes: 2 additions & 2 deletions charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hack/build_windows_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 .

0 comments on commit a16b278

Please sign in to comment.