Skip to content

Commit

Permalink
Release cloudnative-pg-v0.23.0-rc1
Browse files Browse the repository at this point in the history
Signed-off-by: Itay Grudev <[email protected]>
  • Loading branch information
itay-grudev committed Dec 17, 2024
1 parent 68b5b94 commit a80caf7
Show file tree
Hide file tree
Showing 8 changed files with 922 additions and 37 deletions.
41 changes: 24 additions & 17 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ In order to create a new release of the `cloudnative-pg` chart, follow these ste

1. Take note of the current value of the release: see `.version` in `charts/cloudnative-pg/Chart.yaml`
```bash
yq -r '.version' charts/cloudnative-pg/Chart.yaml
OLD_VERSION=$(yq -r '.version' charts/cloudnative-pg/Chart.yaml)
OLD_CNPG_VERSION=$(yq -r '.appVersion' charts/cloudnative-pg/Chart.yaml)
echo $OLD_VERSION
```
2. Decide which version to create, depending on the kind of jump of the CloudNativePG release, following semver
semantics. For this document, let's call it `X.Y.Z`
Expand All @@ -39,36 +41,41 @@ In order to create a new release of the `cloudnative-pg` chart, follow these ste
sed -i -E "s/^version: \"([0-9]+.?)+\"/version: \"$NEW_VERSION\"/" charts/cloudnative-pg/Chart.yaml
```
5. 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/cloudnative-pg/Chart.yaml) file
2. [crds.yaml](./charts/cloudnative-pg/templates/crds/crds.yaml), which can be built using
want to:
1. Find the latest `cloudnative-pg` version by running:
```bash
NEW_CNPG_VERSION=$(curl "https://api.github.com/repos/cloudnative-pg/cloudnative-pg/tags" | jq -r '.[0].name | ltrimstr("v")')
echo $NEW_CNPG_VERSION
```
2. Update `.appVersion` in the [Chart.yaml](./charts/cloudnative-pg/Chart.yaml) file
```bash
sed -i -E "s/^appVersion: \"([0-9]+.?)+\"/appVersion: \"$NEW_CNPG_VERSION\"/" charts/cloudnative-pg/Chart.yaml
```
3. Update [crds.yaml](./charts/cloudnative-pg/templates/crds/crds.yaml), which 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:
Verify the version is correct. Edit it if incorrect, then run:
```bash
VERSION=v1.16.0
kustomize build https://github.com/cloudnative-pg/cloudnative-pg/tree/release-1.16/config/helm/\?ref=v1.16.0
echo '{{- if .Values.crds.create }}' > ./charts/cloudnative-pg/templates/crds/crds.yaml
kustomize build https://github.com/cloudnative-pg/cloudnative-pg/config/helm/\?ref\=v$NEW_CNPG_VERSION >> ./charts/cloudnative-pg/templates/crds/crds.yaml
echo '{{- end }}' >> ./charts/cloudnative-pg/templates/crds/crds.yaml
```
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/cloudnative-pg/templates/crds/crds.yaml`.
3. 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`.
4. To update the files in the [templates](./charts/cloudnative-pg/templates) directory, you can diff the previous
CNPG release yaml against the new one, to find what should be updated (e.g.
```bash
OLD_VERSION=1.15.0
NEW_VERSION=1.15.1
vimdiff \
"https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/main/releases/cnpg-${OLD_VERSION}.yaml" \
"https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/main/releases/cnpg-${NEW_VERSION}.yaml"
"https://github.com/cloudnative-pg/cloudnative-pg/releases/download/v${OLD_CNPG_VERSION}/cnpg-${OLD_CNPG_VERSION}.yaml" \
"https://github.com/cloudnative-pg/cloudnative-pg/releases/download/v${NEW_CNPG_VERSION}/cnpg-${NEW_CNPG_VERSION}.yaml"
```
Or from the `cloudnative-pg` repo, with the desired release branch checked out:
```bash
vimdiff releases/cnpg-1.15.0.yaml releases/cnpg-1.15.1.yaml
```
5. Update [values.yaml](./charts/cloudnative-pg/values.yaml) if needed
6. NOTE: updating `values.yaml` just for the CNPG version may not be necessary, as the value should default to the
`appVersion` in `Chart.yaml`
5. Update [values.yaml](./charts/cloudnative-pg/values.yaml) if needed
6. NOTE: updating `values.yaml` just for the CNPG version may not be necessary, as the value should default to the
`appVersion` in `Chart.yaml`
6. Run `make docs schema` to regenerate the docs and the values schema in case it is needed
```bash
make docs schema
Expand Down
4 changes: 2 additions & 2 deletions charts/cloudnative-pg/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ name: cloudnative-pg
description: CloudNativePG Operator Helm Chart
icon: https://raw.githubusercontent.com/cloudnative-pg/artwork/main/cloudnativepg-logo.svg
type: application
version: "0.22.1"
version: "0.23.0-rc1"
# 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.
# It is recommended to use it with quotes.
appVersion: "1.24.1"
appVersion: "1.25.0-rc1"
sources:
- https://github.com/cloudnative-pg/charts
keywords:
Expand Down
4 changes: 2 additions & 2 deletions charts/cloudnative-pg/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cloudnative-pg

![Version: 0.22.1](https://img.shields.io/badge/Version-0.22.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.24.1](https://img.shields.io/badge/AppVersion-1.24.1-informational?style=flat-square)
![Version: 0.23.0-rc1](https://img.shields.io/badge/Version-0.23.0--rc1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.25.0-rc1](https://img.shields.io/badge/AppVersion-1.25.0--rc1-informational?style=flat-square)

CloudNativePG Operator Helm Chart

Expand Down Expand Up @@ -30,10 +30,10 @@ CloudNativePG Operator Helm Chart
| additionalEnv | list | `[]` | Array containing extra environment variables which can be templated. For example: - name: RELEASE_NAME value: "{{ .Release.Name }}" - name: MY_VAR value: "mySpecialKey" |
| affinity | object | `{}` | Affinity for the operator to be installed. |
| commonAnnotations | object | `{}` | Annotations to be added to all other resources. |
| config | object | `{"clusterWide":true,"create":true,"data":{},"name":"cnpg-controller-manager-config","secret":false}` | Operator configuration. |
| config.clusterWide | bool | `true` | This option determines if the operator is responsible for observing events across the entire Kubernetes cluster or if its focus should be narrowed down to the specific namespace within which it has been deployed. |
| config.create | bool | `true` | Specifies whether the secret should be created. |
| config.data | object | `{}` | The content of the configmap/secret, see https://cloudnative-pg.io/documentation/current/operator_conf/#available-options for all the available options. |
| config.maxConcurrentReconciles | int | `10` | The maximum number of concurrent reconciles. Defaults to 10. |
| config.name | string | `"cnpg-controller-manager-config"` | The name of the configmap/secret to use. |
| config.secret | bool | `false` | Specifies whether it should be stored in a secret, instead of a configmap. |
| containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsGroup":10001,"runAsUser":10001,"seccompProfile":{"type":"RuntimeDefault"}}` | Container Security Context. |
Expand Down
Loading

0 comments on commit a80caf7

Please sign in to comment.