In order to create a new release of any chart, follow these steps:
-
Set the chart name in question
CHART_NAME="cluster"
-
Take note of the current value of the release: see
.version
incharts/$CHART_NAME/Chart.yaml
yq -r '.version' charts/$CHART_NAME/Chart.yaml
-
Decide which version to create, depending on the kind of changes and backwards compatibility, following semver semantics. For this document, let's call it
X.Y.Z
NEW_VERSION="X.Y.Z"
-
Create a branch: named
release/$CHART_NAME-vX.Y.Z
and switch to itgit checkout -b release/$CHART_NAME-v$NEW_VERSION
-
Update the
.version
in the Chart.yaml file to"X.Y.Z"
sed -i -E "s/^version: ([0-9]+.?)+/version: $NEW_VERSION/" charts/$CHART_NAME/Chart.yaml
-
Run
make docs schema
to regenerate the docs and the values schema in case it is neededmake docs schema
-
Commit and add the relevant information you wish in the commit message.
git add . git commit -S -s -m "Release $CHART_NAME-v$NEW_VERSION" --edit
-
Push the new branch
git push --set-upstream origin release/$CHART_NAME-v$NEW_VERSION
-
A PR should be automatically created
-
Wait for all the checks to pass
-
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.
-
Merge the PR squashing all commits and taking care to keep the commit message to be
Release CHART_NAME-vX.Y.Z
-
A release
CHART_NAME-vX.Y.Z
should be automatically created which will then trigger the release action. Verify they both are successful. -
Once done you should be able to run:
helm repo add cnpg-grafana https://cloudnative-pg.github.io/grafana-dashboards helm repo update helm search repo cnpg
and be able to see the new version
X.Y.Z
asCHART VERSION
forcluster
-
Update the chart on Grafana.com.