Skip to content

Commit

Permalink
Release v1.18.1 (#97)
Browse files Browse the repository at this point in the history
Signed-off-by: Jaime Silvela <[email protected]>
Co-authored-by: Jaime Silvela <[email protected]>
  • Loading branch information
github-actions[bot] and jsilvela authored Apr 28, 2023
1 parent a98e5a9 commit eca243f
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
name: Temporarily disable "include administrators" branch protection
if: ${{ always() && github.ref == 'refs/heads/main' }}
id: disable_include_admins
uses: benjefferies/[email protected].7
uses: benjefferies/[email protected].8
with:
access_token: ${{ secrets.REPO_GHA_PAT }}
branch: main
Expand All @@ -36,7 +36,7 @@ jobs:
dry_run: false
-
name: Enable "include administrators" branch protection
uses: benjefferies/[email protected].7
uses: benjefferies/[email protected].8
if: ${{ always() && github.ref == 'refs/heads/main' }}
with:
access_token: ${{ secrets.REPO_GHA_PAT }}
Expand Down
91 changes: 62 additions & 29 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,62 @@
# EDB Postgres for Kubernetes Operator release procedure

## Required tools:

- [helm-schemagen](https://github.com/karuppiah7890/helm-schema-gen): to generate the JSON schema for the chart's values
- [helm-docs](https://github.com/norwoodj/helm-docs): to generate the chart's README.md

## Release Checklist:

- [] Update the documentation: `make docs`
- [] Update the schema: `make schema`

## Steps:

The following steps assume version 0.2.0 as the one to be released. Alter the
instructions accordingly.

1. Create branch `release/v0.2.0`
1. Approve the PR that is automatically generated.
1. The tag 0.2.0 will be created when the PR is merged.
1. The helm chart will be automatically added to the chart index.

To check the chart was updated correctly, run:
```bash
helm repo add edb-pg4k https://enterprisedb.github.io/edb-postgres-for-kubernetes-charts/
# or "helm repo update" if already added
helm search repo edb-pg4k
```
and you should see the latest version available.
# How To Release

**IMPORTANT** we should run the below procedures against the latest point
release of the EDB Postgres for Kubernetes operator. I.e. even if we have several release branches, we will only target the most advanced point
release (e.g. 1.17.1)

## How to release the edb-postgres-for-kubernetes chart

In order to create a new release of the `edb-postgres-for-kubernetes` chart,
follow these steps:

1. take note of the current value of the release: see `.version`
in `charts/edb-postgres-for-kubernetes/Chart.yaml`
1. decide which version to create, depending on the kind of jump of the
EDB Postgres for Kubernetes (EPK) release, following semver semantics.
For this document, let's call it `X.Y.Z`
1. create a branch named `release/vX.Y.Z` and switch to it
1. update the `.version` in the [Chart.yaml](./charts/edb-postgres-for-kubernetes/Chart.yaml) file to `"X.Y.Z"`
1. update everything else as required, e.g. if releasing due to a new
cloudnative-pg version being released, you might want to update the
following:
1. `.appVersion` in the [Chart.yaml](./charts/edb-postgres-for-kubernetes/Chart.yaml) file
1. [crds.yaml](./charts/edb-postgres-for-kubernetes/templates/crds/crds.yaml), whose
content can be built using [kustomize](https://kustomize.io/) from the
cloudnative-pg repo using kustomize
[remoteBuild](https://github.com/kubernetes-sigs/kustomize/blob/master/examples/remoteBuild.md)
running: `kustomize build
https://github.com/EnterpriseDB/cloud-native-postgres/tree/release-1.20/config/helm/\?ref=v1.20.0`,
**take care to set the correct release branch and version as ref**
(v1.20.0 in the example
command). \
It might be easier to run `kustomize build config/helm` from the
`cloudnative-pg` repo, with the desired release branch checked out, and
copy the result to `./charts/edb-postgres-for-kubernetes/templates/crds/crds.yaml`.
1. NOTE: please keep the guards for `.Values.crds.create`, i.e.
`{{- if .Values.crds.create }}` and `{{- end }}` after you copy the CRD
into `templates/crds/crds.yaml`.
1. to update the files in the
[templates](./charts/edb-postgres-for-kubernetes/templates) directory, you can diff
the previous EPK release yaml against the new one, to find what
should be updated (e.g. `vimdiff
https://raw.githubusercontent.com/EnterpriseDB/cloud-native-postgres/main/releases/postgresql-operator-1.15.0.yaml
https://raw.githubusercontent.com/EnterpriseDB/cloud-native-postgres/main/releases/postgresql-operator-1.15.1.yaml`) \
Or, from the `cloudnative-pg` repo, with the desired release branch checked out,
`vimdiff releases/postgresql-operator-1.15.0.yaml releases/postgresql-operator-1.15.1.yaml`
1. update [values.yaml](./charts/edb-postgres-for-kubernetes/values.yaml) if needed
1. NOTE: updating `values.yaml` just for the EPK verision may not be
necessary, as the value should default to the `appVersion` in `Chart.yaml`
1. run `make docs schema` to regenerate the docs and the values schema in case it is needed
1. `git commit -S -s -m "Release vX.Y.Z" --edit` and add all
the informations you wish below the commit message.
1. `git push --set-upstream origin release/vX.Y.Z`
1. a PR named `Release vX.Y.Z` will be automatically created
1. wait for all the checks to pass
1. two approvals are required in order to merge the PR, if you are a
maintainer approve the PR yourself and ask for another approval, otherwise
ask for two approvals directly.
1. merge the pr squashing all commits and **taking care to keep the commit
message to be `Release vX.Y.Z`**
1. a tag `vX.Y.Z` will be automatically created by an action,
which will ten trigger the release action, check they both are successful.
1. once done you should be able to run helm repo `helm repo add edb-pg4k https://enterprisedb.github.io/edb-postgres-for-kubernetes-charts/; helm repo update; helm search repo edb-pg4k` and be able to see the new version `vX.Y.Z` as `CHART VERSION`
2 changes: 1 addition & 1 deletion charts/edb-postgres-for-kubernetes/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ name: edb-postgres-for-kubernetes
description: EDB Postgres for Kubernetes Helm Chart
icon: https://www.enterprisedb.com/themes/custom/edb_bootstrap_sass/edb-logo-disc-dark-2.svg
type: application
version: "0.18.0"
version: "0.18.1"
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning, they should reflect the version the application is using.
Expand Down
2 changes: 1 addition & 1 deletion charts/edb-postgres-for-kubernetes/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# edb-postgres-for-kubernetes

![Version: 0.18.0](https://img.shields.io/badge/Version-0.18.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.20.0](https://img.shields.io/badge/AppVersion-1.20.0-informational?style=flat-square)
![Version: 0.18.1](https://img.shields.io/badge/Version-0.18.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.20.0](https://img.shields.io/badge/AppVersion-1.20.0-informational?style=flat-square)

EDB Postgres for Kubernetes Helm Chart

Expand Down

0 comments on commit eca243f

Please sign in to comment.