Skip to content

Commit 6a9b6b6

Browse files
authored
CI: Fix Helm Chart Publish Stage - Bump Postgres Chart to 16 (#1545)
Bitnami has removed previously used PostgreSQL Helm Chart. Bumping current version to latest available major version (with Postgres 17). This also: - bumps chart testing GH action to `v2.7.0` - bumps Kubernetes version used for testing to `v1.33.3`, `v1.32.7`, `v1.31.11` - bumps kind GH action to `v1.12.0` - changes OpenTelemetry Exporter Sender from `opentelemetry-exporter-sender-jdk` to `opentelemetry-exporter-sender-okhttp` (to support gRPC) - updates postgres chart values to match new bitnami charts - adds OTEL related environment variables to Helm Chart - updates chart README.md
1 parent e9c369d commit 6a9b6b6

File tree

5 files changed

+84
-27
lines changed

5 files changed

+84
-27
lines changed

.github/workflows/bootzooka-helm-ci.yaml

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,30 @@ jobs:
2323
with:
2424
fetch-depth: 0
2525

26-
- name: Run chart-testing (lint)
27-
id: ct-lint
28-
uses: helm/[email protected]
26+
- name: Set up Helm
27+
uses: azure/[email protected]
28+
with:
29+
version: v3.17.1
30+
31+
- uses: actions/[email protected]
2932
with:
30-
command: lint
31-
config: .github/helm-ct.yml
33+
python-version: "3.x"
34+
check-latest: true
35+
36+
- name: Set up chart-testing
37+
uses: helm/[email protected]
38+
39+
- name: Run chart-testing (list-changed)
40+
id: list-changed
41+
run: |
42+
changed=$(ct list-changed --config .github/helm-ct.yml --target-branch ${{ github.event.repository.default_branch }})
43+
if [[ -n "$changed" ]]; then
44+
echo "changed=true" >> "$GITHUB_OUTPUT"
45+
fi
46+
47+
- name: Run chart-testing (lint)
48+
if: steps.list-changed.outputs.changed == 'true'
49+
run: ct lint --config .github/helm-ct.yml --target-branch ${{ github.event.repository.default_branch }}
3250

3351
install-test-chart:
3452
needs:
@@ -38,9 +56,9 @@ jobs:
3856
strategy:
3957
matrix:
4058
k8s:
41-
- v1.20.7
42-
- v1.21.2
43-
- v1.22.4
59+
- v1.33.2
60+
- v1.32.5
61+
- v1.31.9
4462
steps:
4563
- name: Check-out repository
4664
id: repo-checkout
@@ -50,17 +68,35 @@ jobs:
5068

5169
- name: Create kind ${{ matrix.k8s }} cluster
5270
id: kind-cluster-setup
53-
uses: helm/kind-action@v1.2.0
71+
uses: helm/kind-action@v1.12.0
5472
with:
5573
node_image: kindest/node:${{ matrix.k8s }}
5674
wait: "120s"
5775

58-
- name: Run chart-testing (install)
59-
id: ct-install
60-
uses: helm/[email protected]
76+
- name: Set up Helm
77+
uses: azure/[email protected]
78+
with:
79+
version: v3.17.1
80+
81+
- uses: actions/[email protected]
6182
with:
62-
command: install
63-
config: .github/helm-ct.yml
83+
python-version: "3.x"
84+
check-latest: true
85+
86+
- name: Set up chart-testing
87+
uses: helm/[email protected]
88+
89+
- name: Run chart-testing (list-changed)
90+
id: list-changed
91+
run: |
92+
changed=$(ct list-changed --config .github/helm-ct.yml --target-branch ${{ github.event.repository.default_branch }})
93+
if [[ -n "$changed" ]]; then
94+
echo "changed=true" >> "$GITHUB_OUTPUT"
95+
fi
96+
97+
- name: Run chart-testing (install)
98+
if: steps.list-changed.outputs.changed == 'true'
99+
run: ct install --config .github/helm-ct.yml --target-branch ${{ github.event.repository.default_branch }}
64100

65101
validate-chart-docs:
66102
needs:

helm/bootzooka/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ maintainers:
2121
icon: https://raw.githubusercontent.com/softwaremill/bootzooka/master/banner.png
2222
dependencies:
2323
- name: postgresql
24-
version: ^9
24+
version: ^16
2525
repository: https://charts.bitnami.com/bitnami
2626
condition: postgresql.enabled
2727
annotations:

helm/bootzooka/README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ The following table lists the configurable parameters of the chart and the defau
5151
| bootzooka.ingress.tls_enabled | bool | `false` | |
5252
| bootzooka.nameOverride | string | `""` | |
5353
| bootzooka.nodeSelector | object | `{}` | |
54+
| bootzooka.otel.enabled | bool | `false` | |
55+
| bootzooka.otel.endpoint | string | `""` | |
56+
| bootzooka.otel.metric_export_interval | string | `"60s"` | |
57+
| bootzooka.otel.protocol | string | `""` | |
58+
| bootzooka.otel.service_name | string | `"bootzooka"` | |
5459
| bootzooka.replicaCount | int | `1` | |
5560
| bootzooka.reset_password_url | string | `"https://bootzooka.example.com/password-reset?code=%s"` | |
5661
| bootzooka.resources | object | `{}` | |
@@ -65,17 +70,17 @@ The following table lists the configurable parameters of the chart and the defau
6570
| bootzooka.smtp.ssl_ver | string | `"false"` | |
6671
| bootzooka.smtp.username | string | `"server.example.com"` | |
6772
| bootzooka.sql.host | string | `"{{ .Values.postgresql.fullnameOverride }}"` | Value will be taken from 'postgresql.fullnameOverride' setting |
68-
| bootzooka.sql.name | string | `"{{ .Values.postgresql.postgresqlDatabase }}"` | Value will be taken from 'postgresql.postgresqlDatabase' setting |
69-
| bootzooka.sql.password | string | `"{{ .Values.postgresql.postgresqlPassword }}"` | Value will be taken from 'postgresql.postgresqlPassword' setting |
73+
| bootzooka.sql.name | string | `"{{ .Values.postgresql.auth.database }}"` | Value will be taken from 'postgresql.postgresqlDatabase' setting |
74+
| bootzooka.sql.password | string | `"{{ .Values.postgresql.auth.password }}"` | Value will be taken from 'postgresql.postgresqlPassword' setting |
7075
| bootzooka.sql.port | string | `"{{ .Values.postgresql.service.port }}"` | Value will be taken from 'postgresql.service.port' setting |
71-
| bootzooka.sql.username | string | `"{{ .Values.postgresql.postgresqlUsername }}"` | Value will be taken from 'postgresql.postgresqlUsername' setting |
76+
| bootzooka.sql.username | string | `"{{ .Values.postgresql.auth.username }}"` | Value will be taken from 'postgresql.postgresqlUsername' setting |
7277
| bootzooka.tolerations | list | `[]` | |
78+
| postgresql.auth.database | string | `"bootzooka"` | Database name for Bootzooka |
79+
| postgresql.auth.password | string | `"bootzooka"` | Password for PostgreSQL user |
80+
| postgresql.auth.username | string | `"postgres"` | Username for PostgreSQL user |
7381
| postgresql.connectionTest.image.pullPolicy | string | `"IfNotPresent"` | |
7482
| postgresql.connectionTest.image.repository | string | `"bitnami/postgresql"` | |
7583
| postgresql.connectionTest.image.tag | int | `11` | |
7684
| postgresql.enabled | bool | `true` | Disable if you already have PostgreSQL running in cluster where Bootzooka chart is being deployed |
7785
| postgresql.fullnameOverride | string | `"bootzooka-pgsql-postgresql"` | |
78-
| postgresql.postgresqlDatabase | string | `"bootzooka"` | |
79-
| postgresql.postgresqlPassword | string | `"bootzooka"` | |
80-
| postgresql.postgresqlUsername | string | `"postgres"` | |
8186
| postgresql.service.port | int | `5432` | |

helm/bootzooka/templates/configmap.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,8 @@ data:
1515
SQL_DBNAME: "{{ tpl .Values.bootzooka.sql.name . }}"
1616
SQL_HOST: "{{ tpl .Values.bootzooka.sql.host . }}"
1717
SQL_PORT: "{{ tpl .Values.bootzooka.sql.port . }}"
18+
OTEL_SDK_DISABLED: "{{ not .Values.bootzooka.otel.enabled }}"
19+
OTEL_EXPORTER_OTLP_ENDPOINT: "{{ .Values.bootzooka.otel.endpoint }}"
20+
OTEL_EXPORTER_OTLP_PROTOCOL: "{{ .Values.bootzooka.otel.protocol }}"
21+
OTEL_SERVICE_NAME: "{{ .Values.bootzooka.otel.service_name }}"
22+
OTEL_METRIC_EXPORT_INTERVAL: "{{ .Values.bootzooka.otel.metric_export_interval }}"

helm/bootzooka/values.yaml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ postgresql:
44
# -- Disable if you already have PostgreSQL running in cluster where Bootzooka chart is being deployed
55
enabled: true
66
fullnameOverride: "bootzooka-pgsql-postgresql"
7-
postgresqlUsername: "postgres"
8-
postgresqlPassword: "bootzooka"
9-
postgresqlDatabase: "bootzooka"
7+
auth:
8+
# -- Username for PostgreSQL user
9+
username: "postgres"
10+
# -- Password for PostgreSQL user
11+
password: "bootzooka" # Change this
12+
# -- Database name for Bootzooka
13+
database: "bootzooka"
1014
service:
1115
port: 5432
1216
connectionTest:
@@ -24,11 +28,11 @@ bootzooka:
2428
# -- Value will be taken from 'postgresql.service.port' setting
2529
port: '{{ .Values.postgresql.service.port }}'
2630
# -- Value will be taken from 'postgresql.postgresqlUsername' setting
27-
username: '{{ .Values.postgresql.postgresqlUsername }}'
31+
username: '{{ .Values.postgresql.auth.username }}'
2832
# -- Value will be taken from 'postgresql.postgresqlDatabase' setting
29-
name: '{{ .Values.postgresql.postgresqlDatabase }}'
33+
name: '{{ .Values.postgresql.auth.database }}'
3034
# -- Value will be taken from 'postgresql.postgresqlPassword' setting
31-
password: '{{ .Values.postgresql.postgresqlPassword }}'
35+
password: '{{ .Values.postgresql.auth.password }}'
3236
smtp:
3337
enabled: true
3438
host: "server.example.com"
@@ -39,6 +43,13 @@ bootzooka:
3943
4044
password: "bootzooka"
4145

46+
otel:
47+
enabled: false
48+
endpoint: ""
49+
protocol: ""
50+
service_name: "bootzooka"
51+
metric_export_interval: "60s"
52+
4253
image:
4354
repository: softwaremill/bootzooka
4455
tag: latest

0 commit comments

Comments
 (0)