Skip to content

Commit

Permalink
chore: update release template (#257)
Browse files Browse the repository at this point in the history
Co-authored-by: Mattia Lavacca <[email protected]>
  • Loading branch information
pmalek and mlavacca authored May 14, 2024
1 parent 395c874 commit 9fe5596
Showing 1 changed file with 26 additions and 15 deletions.
41 changes: 26 additions & 15 deletions .github/ISSUE_TEMPLATE/---release.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,35 @@ If the troubleshooting section does not contain the answer to the problem you en
- [ ] Check the `CHANGELOG.md` and update it with the new version number. Make sure the log is up to date.
- [ ] Ensure that all generators have run properly (e.g. `make generate manifests`) so that updates to things like CRDs are handled for the release, double check that all manifests from `config/samples/` still work as intended.
- [ ] Ensure GitHub PAT is still valid (see [GitHub PAT](#github-pat) below).
- [ ] From [GitHub release action][release-action], start a new workflow run with the `release` input set to the release tag (e.g. `v0.1.0`).
- [ ] If the new release is a new major/minor then branch off of `main` and create a branch `release/N.M.x`, e.g.
- [ ] From [GitHub release action][release-action], start a new workflow run:
- Set the `Use workflow from` to the release branch: e.g. `release/1.2.x`
- Set the `release` input set to the target version (e.g. `v1.2.0`).
- [ ] Wait for the workflow to complete.
- [ ] The CI should create a PR in the [Gateway Operator][kgo-prs] repo that syncs the release branch to the `main` branch. Merge it.
- [ ] The CI should create a PR in the [Gateway Operator][kgo-prs] repo that syncs the release branch to the base branch (either `main` or `release/N.M.x`, e.g. `release/1.2.x`) branch. Merge it.
- [ ] After the PR is merged, a new release should be created automatically. Check the [releases][releases] page. The release has to be marked manually as `latest` if this is the case.
- [ ] Update the official documentation at [github.com/Kong/docs.konghq.com][docs_repo]
- [ ] Run post processing script for `docs/api-reference.md`, providing a tagged version of CRD reference from docs repo as an argument, e.g. `app/_src/gateway-operator/reference/custom-resources/1.2.x.md`. This will add the necessary skaffolding so that the reference is rendered correctly on docs.konghq.com.
Example: `${GATEWAY_OPERATOR_REPO}/scripts/apidocs-gen/post-process-for-konghq.sh ~/docs.konghq.com/app/_src/gateway-operator/reference/custom-resources/1.2.x.md`
- NOTE: [CLI configuration options docs][cli_ref_docs] should be updated when releasing KGO EE as that's the source of trutgh for those.
- [ ] Run post processing script for `docs/api-reference.md`, providing a tagged version of CRD reference from docs repo as an argument, e.g. `app/_src/gateway-operator/reference/custom-resources/1.2.x.md`.
This will add the necessary skaffolding so that the reference is rendered correctly on docs.konghq.com.

Example:
```
${GATEWAY_OPERATOR_REPO}/scripts/apidocs-gen/post-process-for-konghq.sh ~/docs.konghq.com/app/_src/gateway-operator/reference/custom-resources/1.2.x.md
```

- NOTE: [CLI configuration options docs][cli_ref_docs] should be updated when releasing KGO EE as that's the source of truth for those.
The reason for this is that KGO EE configuration flags are a superset of OSS flags.

- [ ] Proceed to release KGO EE as it relies on OSS releases.

**Only for major and minor releases**:

- [ ] When the release tag is created add a test case in [upgrade E2E test][helm_upgrade_test] with just published tag so that an upgrade path from previous major/minor version is tested.
- [ ] When the release contains breaking changes which precludes an automated upgrade make sure to add a comment to this test for future readers.

[docs_repo]: https://github.com/Kong/docs.konghq.com/
[cli_ref_docs]: https://docs.konghq.com/gateway-operator/latest/reference/cli-arguments/
[helm_upgrade_test]: https://github.com/Kong/gateway-operator/blob/9f33d27ab875b91e50d7e750b45a293c1395da2d/test/e2e/test_upgrade.go

## Verify default hardcoded versions

Expand All @@ -43,16 +59,13 @@ The package [internal/consts][consts-pkg] contains a list of default versions fo

**Next expiration date**: 2024-10-02

The release workflow uses @team-k8s-bot's GitHub PAT to create a GitHub release and PRs related to it (in [KGO docs][operator-docs],
[OperatorHub][community-operators], etc.). It's named `Kong Gateway operator release pipeline` and is stored in `PAT_GITHUB`
The release workflow uses @team-k8s-bot's GitHub PAT to create a GitHub release and PRs related to it.
It's named `Kong Gateway operator release pipeline` and is stored in `PAT_GITHUB`
GitHub repository secret to give workflows access to it. It's always generated with 1-year expiration date.

If you find it's expired, make sure to generate a new one and update the `PAT_GITHUB` secret as well as its 1Pass item
`Github team k8s bot - PAT - Kong Gateway operator release token` for redundancy.

[operator-docs]: https://github.com/Kong/gateway-operator-docs
[community-operators]: https://github.com/Kong/k8s-operatorhub-community-operators

## Troubleshooting

### The release needs to be started again with the same tag
Expand All @@ -69,13 +82,11 @@ Otherwise, if the above conditions are not meet, the release cannot be restarted

Steps:

1. Delete the `release/v<version>` branch.
2. Delete the PR created by a release workflow.
3. Update the repository with the correct changes.
4. Start a new release workflow run.
1. Delete the PR created by a release workflow.
1. Update the repository with the correct changes.
1. Start a new release workflow run.

[releases]: https://github.com/Kong/gateway-operator/releases
[release-action]: https://github.com/Kong/gateway-operator/actions/workflows/release.yaml
[consts-pkg]: https://github.com/Kong/gateway-operator/blob/main/internal/consts/consts.go
[operator-hub-community]: https://github.com/k8s-operatorhub/community-operators
[kgo-prs]: https://github.com/Kong/gateway-operator/pulls

0 comments on commit 9fe5596

Please sign in to comment.