Bump postgres chart to latest release #391

Merged
pat-s merged 23 commits from bump-postgres-chart into main 2023-03-27 17:12:30 +00:00
Member

See discussion in #387

Upgrade notes to Chart v11.x and Postgres 14.x: https://docs.bitnami.com/kubernetes/infrastructure/postgresql/administration/upgrade/

The current version in Gitea is using 11.11.0-debian-10-r62 from 2021-04.

Bumping the chart to the latest (v12.x) would use the image 15.2.0-debian-11-r14 which would be a jump from postgres 11 to postgres 15. There are no specific notes for the v12.x chart release, hence we might be able to just go to 12.x directly.

There have been some param renamings which I've reflected in the README.

⚠️ BREAKING

Users have to migrate their Postgres DB by e.g. restoring a previously created database dump into a clean installation.

See discussion in #387 Upgrade notes to Chart v11.x and Postgres 14.x: https://docs.bitnami.com/kubernetes/infrastructure/postgresql/administration/upgrade/ The current version in Gitea is using `11.11.0-debian-10-r62` from 2021-04. Bumping the chart to the latest (v12.x) would use the image `15.2.0-debian-11-r14` which would be a jump from postgres 11 to postgres 15. There are no specific notes for the v12.x chart release, hence we might be able to just go to 12.x directly. There have been some param renamings which I've reflected in the README. **⚠️ BREAKING** Users have to migrate their Postgres DB by e.g. restoring a previously created database dump into a clean installation.
pat-s added 2 commits 2023-01-05 09:09:36 +00:00
bump postgres to latest 11.x
Some checks failed
continuous-integration/drone/push Build is failing
ef098700cf
try changing chart repo
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
a945f7a1b6
pat-s added 1 commit 2023-02-24 10:22:34 +00:00
use 12.2.1
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
01ce2e19f0
pat-s changed title from WIP: Bump postgres to latest 11.x to Bump postgres to latest 11.x 2023-02-24 10:22:36 +00:00
pat-s added 1 commit 2023-02-24 10:22:52 +00:00
Merge branch 'main' into bump-postgres-chart
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
d610fa26e2
pat-s added 1 commit 2023-02-25 09:12:35 +00:00
use oci registry
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
10fa148c48
pat-s changed title from Bump postgres to latest 11.x to Bump postgres chart to latest release 2023-02-25 09:12:45 +00:00
pat-s added 1 commit 2023-02-25 09:17:53 +00:00
update values.yml with renamed params
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
64ee3467fe
pat-s added 1 commit 2023-02-25 09:22:43 +00:00
add upgrade notes to README
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
06177b18e0
pat-s added 1 commit 2023-02-25 09:26:20 +00:00
update README
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
4764f34b1f
pat-s force-pushed bump-postgres-chart from c484f9cc6e to 99671dc065 2023-02-25 09:30:30 +00:00 Compare
pat-s force-pushed bump-postgres-chart from db0b659a05 to 7d638853a9 2023-02-25 09:42:43 +00:00 Compare
pat-s force-pushed bump-postgres-chart from 7d638853a9 to 34ccce3d10 2023-02-25 09:48:30 +00:00 Compare
pat-s force-pushed bump-postgres-chart from 34ccce3d10 to 5351cc68a8 2023-02-25 09:52:41 +00:00 Compare
pat-s force-pushed bump-postgres-chart from 5351cc68a8 to 3e9c9b449a 2023-02-25 09:56:55 +00:00 Compare
pat-s force-pushed bump-postgres-chart from 3e9c9b449a to 17dda3d9ab 2023-02-25 10:10:32 +00:00 Compare
pat-s force-pushed bump-postgres-chart from 17dda3d9ab to dcc8ce1c3c 2023-02-25 10:20:41 +00:00 Compare
pat-s requested review from techknowlogick 2023-02-25 10:25:11 +00:00
pat-s requested review from justusbunsi 2023-02-25 10:25:12 +00:00
techknowlogick approved these changes 2023-02-26 06:12:20 +00:00
justusbunsi requested changes 2023-02-26 13:07:48 +00:00
justusbunsi left a comment
Member

Chart.lock must be updated, too. And we should mention that there is a proper way of updating PGSQL databases.

`Chart.lock` must be updated, too. And we should mention that there is a proper way of updating PGSQL databases.
pat-s added 2 commits 2023-02-26 15:00:24 +00:00
chart lock
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
e83fdfc063
justusbunsi reviewed 2023-02-26 15:20:11 +00:00
README.md Outdated
@ -818,0 +822,4 @@
Please read the [Postgres Release Notes](https://www.postgresql.org/docs/release/) for version-specific changes.
With respect to `values.yml`, parameters `username`, `database` and `postgresPassword` have been regrouped under `auth` and slightly renamed.
`persistence` has also been regrouped under the `primary` key.
Please adjust your `values.yml` accordingly.
Member

Two occurrences.

- values.yml
+ values.yaml
Two occurrences. ```diff - values.yml + values.yaml ```
justusbunsi marked this conversation as resolved
@ -93,3 +93,3 @@
{{- define "postgresql.dns" -}}
{{- printf "%s-postgresql.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.postgresql.global.postgresql.servicePort -}}
{{- printf "%s-postgresql.%s.svc.%s:%g" .Release.Name .Release.Namespace .Values.clusterDomain .Values.postgresql.global.postgresql.auth.servicePort -}}
Member

I know it's a PR for bumping the postgres version and nothing more. Do you fancy adding some simple unittests that ensure the mapping in our values.yaml works with the one the dependent chart expects? It should help with future updates, detecting changes.

I know it's a PR for bumping the postgres version and nothing more. Do you fancy adding some simple unittests that ensure the mapping in our `values.yaml` works with the one the dependent chart expects? It should help with future updates, detecting changes.
Author
Member

We could/should but then probably for all chart deps? This might take a bit of work. Let's track it in #409. I think this should not block this PR for now.

We could/should but then probably for all chart deps? This might take a bit of work. Let's track it in #409. I think this should not block this PR for now.
justusbunsi marked this conversation as resolved
values.yaml Outdated
@ -140,3 +139,3 @@
# className: nginx
className:
annotations: {}
annotations:
Member

We should keep the empty array/object consistent with the other definitions. It's easier to read. (related to several changes)

We should keep the empty array/object consistent with the other definitions. It's easier to read. (related to several changes)
Author
Member

Yeah sorry for this, hitting the auto-format one time and then continueing brings trouble 😆

Yeah sorry for this, hitting the auto-format one time and then continueing brings trouble 😆️
pat-s marked this conversation as resolved
pat-s added 2 commits 2023-02-27 09:10:54 +00:00
more indentation
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
f4a3671e4f
pat-s added 1 commit 2023-02-27 09:12:32 +00:00
last ones
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
c9073ff7ca
pat-s requested review from justusbunsi 2023-02-27 09:16:21 +00:00
justusbunsi added the
kind
breaking
label 2023-03-07 16:11:45 +00:00
Member

Adding "breaking" label as it is a major bump for the database chart.

Adding "breaking" label as it is a major bump for the database chart.
justusbunsi requested changes 2023-03-22 17:24:16 +00:00
justusbunsi left a comment
Member

Please see my comments below.

Please see my comments below.
Chart.lock Outdated
@ -9,2 +9,2 @@
repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
version: 10.3.17
repository: oci://registry-1.docker.io/bitnamicharts
version: 12.2.1
Member

Apologies for not testing it earlier. In the meantime the latest version is 12.2.6. I think we can update to that version - I've already used that newer version during my tests. 😉

Apologies for not testing it earlier. In the meantime the latest version is 12.2.6. I think we can update to that version - I've already used that newer version during my tests. 😉
justusbunsi marked this conversation as resolved
README.md Outdated
@ -814,7 +814,15 @@ See [CONTRIBUTORS GUIDE](CONTRIBUTING.md) for details.
This section lists major and breaking changes of each Helm Chart version.
Please read them carefully to upgrade successfully.
### To 7.0.0
Member

I think this removal is a mistake. It must be kept, since Chart version 7.0.0 got released and had the breaking change of bumping Gitea to 1.18.1 and gpg key setup. See https://gitea.com/gitea/helm-chart/src/tag/v7.0.0#to-7-0-0

I think this removal is a mistake. It must be kept, since Chart version 7.0.0 got released and had the breaking change of bumping Gitea to 1.18.1 and gpg key setup. See https://gitea.com/gitea/helm-chart/src/tag/v7.0.0#to-7-0-0
justusbunsi marked this conversation as resolved
README.md Outdated
@ -769,4 +767,0 @@
| `postgresql.enabled` | Enable PostgreSQL | `true` |
| `postgresql.global.postgresql.postgresqlDatabase` | PostgreSQL database (overrides postgresqlDatabase) | `gitea` |
| `postgresql.global.postgresql.postgresqlUsername` | PostgreSQL username (overrides postgresqlUsername) | `gitea` |
| `postgresql.global.postgresql.postgresqlPassword` | PostgreSQL admin password (overrides postgresqlPassword) | `gitea` |
Member

I just realized: Our description for postgresqlPassword is wrong. It is not the admin password. Based on the previously used Chart version 10.3.17 this would've been postgresqlPostgresPassword. What we configure instead is the actual additional user that is not the super-global admin of that instance. IMO, that's the desired state.

On the other hand: With Chart version 12.2.1 the key postgresql.global.postgresql.auth.postgresPassword is the password of that super-global admin and we have to use postgresql.global.postgresql.auth.password instead.

I just realized: Our description for `postgresqlPassword` is wrong. It is _not_ the admin password. Based on the previously used Chart version 10.3.17 this would've been `postgresqlPostgresPassword`. What we configure instead is the actual additional user that is not the super-global admin of that instance. IMO, that's the desired state. On the other hand: With Chart version 12.2.1 the key `postgresql.global.postgresql.auth.postgresPassword` is the password of that super-global admin and we have to use `postgresql.global.postgresql.auth.password` instead.
justusbunsi marked this conversation as resolved
pat-s reviewed 2023-03-27 08:14:03 +00:00
README.md Outdated
@ -814,7 +814,15 @@ See [CONTRIBUTORS GUIDE](CONTRIBUTING.md) for details.
This section lists major and breaking changes of each Helm Chart version.
Please read them carefully to upgrade successfully.
### To 7.0.0
Author
Member

The confusion came up as someone assumed we need to always issue a major release for every gitea minor update, even if there are not breaking changes for the chart.

To clear the confusion, it might help to remove the statement of "this update bumps gitea to 1.18.1" as this somehow covers the underlying breaking change of the GPG key feature.

In other README changelog notes we never mentioned the Gitea minor release, hence I guess we should keep it at chart-related breaking changes to avoid confusion?

I've went ahead and did so, let me know what you thinK!

The confusion came up as someone assumed we need to always issue a major release for every gitea minor update, even if there are not breaking changes for the chart. To clear the confusion, it might help to remove the statement of "this update bumps gitea to 1.18.1" as this somehow covers the underlying breaking change of the GPG key feature. In other README changelog notes we never mentioned the Gitea minor release, hence I guess we should keep it at chart-related breaking changes to avoid confusion? I've went ahead and did so, let me know what you thinK!
README.md Outdated
@ -769,4 +767,0 @@
| `postgresql.enabled` | Enable PostgreSQL | `true` |
| `postgresql.global.postgresql.postgresqlDatabase` | PostgreSQL database (overrides postgresqlDatabase) | `gitea` |
| `postgresql.global.postgresql.postgresqlUsername` | PostgreSQL username (overrides postgresqlUsername) | `gitea` |
| `postgresql.global.postgresql.postgresqlPassword` | PostgreSQL admin password (overrides postgresqlPassword) | `gitea` |
Author
Member

Good catch!

Good catch!
justusbunsi marked this conversation as resolved
pat-s added 4 commits 2023-03-27 08:15:42 +00:00
pat-s added 1 commit 2023-03-27 08:17:31 +00:00
more postgresPassword -> password
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
542e3cfa44
pat-s added 1 commit 2023-03-27 08:20:41 +00:00
remove blank line
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
454ebea038
pat-s requested review from justusbunsi 2023-03-27 08:24:38 +00:00
justusbunsi added 1 commit 2023-03-27 15:14:58 +00:00
Fix port templating
Signed-off-by: justusbunsi <sk.bunsenbrenner@gmail.com>
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
b9f313b115
justusbunsi approved these changes 2023-03-27 15:43:24 +00:00
justusbunsi left a comment
Member

LGTM. I've fixed a similar port templating issue as I mentioned in #412 (comment) for MySQL.

LGTM. I've fixed a similar port templating issue as I mentioned in https://gitea.com/gitea/helm-chart/pulls/412#issuecomment-733779 for MySQL.
README.md Outdated
Member

Works for me how you proposed. 👍

Works for me how you proposed. 👍
justusbunsi reviewed 2023-03-27 15:44:52 +00:00
README.md Outdated
Member

This comment is related to #391 (comment).

This comment is related to https://gitea.com/gitea/helm-chart/pulls/391#issuecomment-734001.
justusbunsi added 1 commit 2023-03-27 16:08:44 +00:00
Fixup b9f313b115
Based on the Bitnami Chart values.yaml[^1], the global service object
must be within `postgresql`.

[^1]: https://github.com/bitnami/charts/blob/main/bitnami/postgresql/values.yaml#L37

Signed-off-by: justusbunsi <sk.bunsenbrenner@gmail.com>
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
9b1dd798f6
Author
Member

Great, merging and moving onwards!

Great, merging and moving onwards!
pat-s merged commit 5cb0802b7b into main 2023-03-27 17:12:30 +00:00
pat-s deleted branch bump-postgres-chart 2023-03-27 17:12:30 +00:00
Sign in to join this conversation.
No description provided.