Skip to content

Commit 964ec24

Browse files
committed
feat(airbroke)!: bump chart for better auth
1 parent e0c60b3 commit 964ec24

File tree

12 files changed

+94
-21
lines changed

12 files changed

+94
-21
lines changed

charts/airbroke/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ apiVersion: v2
22
name: airbroke
33
description: Airbroke Helm chart for Kubernetes
44
type: application
5-
version: 1.3.14
6-
appVersion: "1.1.102"
5+
version: 2.0.0
6+
appVersion: "1.2.0"
77
keywords:
88
- open
99
- source
@@ -27,7 +27,7 @@ annotations:
2727
url: https://icoretech.github.io/helm/pgp-public-key.asc
2828
artifacthub.io/images: |
2929
- name: airbroke
30-
image: ghcr.io/icoretech/airbroke:1.1.102
30+
image: ghcr.io/icoretech/airbroke:1.2.0
3131
artifacthub.io/recommendations: |
3232
- url: https://artifacthub.io/packages/helm/icoretech/pgbouncer
3333
artifacthub.io/screenshots: |

charts/airbroke/README.md.gotmpl

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ helm install my-airbroke icoretech/airbroke
2828

2929
Please remember to set at least the `database.url` and `database.migrations_url` values. Continue reading for further details.
3030

31+
## Breaking changes in 2.0.0
32+
33+
- `web.image` was removed; use `web.imageRepository` and optional `web.imageTag`
34+
- Airbroke auth examples now use Better Auth env names: `BETTER_AUTH_SECRET` and `BETTER_AUTH_URL`
35+
- Releases still passing `NEXTAUTH_SECRET` or `NEXTAUTH_URL` via `web.extraEnvs` now fail template rendering on purpose
36+
3137
## Database
3238

3339
The `database.url` and `database.migrations_url` values must be set to the connection string of your PostgreSQL database.
@@ -70,7 +76,7 @@ spec:
7076
chart:
7177
spec:
7278
chart: airbroke
73-
version: ">= 1.1.3"
79+
version: ">= 2.0.0"
7480
sourceRef:
7581
kind: HelmRepository
7682
name: icoretech
@@ -88,7 +94,7 @@ spec:
8894
migrations_url: 'postgresql://xxxx:xxxx@postgres-postgresql.postgres.svc.cluster.local:5432/airbroke_production?schema=public'
8995
web:
9096
imageRepository: ghcr.io/icoretech/airbroke
91-
imageTag: "1.1.22" # {"$imagepolicy": "flux-system:airbroke:tag"}
97+
imageTag: "1.2.0" # {"$imagepolicy": "flux-system:airbroke:tag"}
9298
replicaCount: 2
9399
cachePersistentVolume:
94100
enabled: true
@@ -114,9 +120,9 @@ spec:
114120
value: "xxxxx"
115121
- name: AIRBROKE_GITHUB_ORGS
116122
value: "xxxxx"
117-
- name: NEXTAUTH_SECRET
123+
- name: BETTER_AUTH_SECRET
118124
value: "xxxxxxx"
119-
- name: NEXTAUTH_URL
125+
- name: BETTER_AUTH_URL
120126
value: "https://xxxxxx"
121127
- name: AIRBROKE_OPENAI_API_KEY
122128
value: "sk-xxxxxxx"
@@ -161,7 +167,7 @@ spec:
161167
name: airbroke
162168
policy:
163169
semver:
164-
range: '>=1.1.22 <2.0.0'
170+
range: '>=1.2.0 <2.0.0'
165171
```
166172

167173
```yaml

charts/airbroke/Readme.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ helm install my-airbroke icoretech/airbroke
2828

2929
Please remember to set at least the `database.url` and `database.migrations_url` values. Continue reading for further details.
3030

31+
## Breaking changes in 2.0.0
32+
33+
- `web.image` was removed; use `web.imageRepository` and optional `web.imageTag`
34+
- Airbroke auth examples now use Better Auth env names: `BETTER_AUTH_SECRET` and `BETTER_AUTH_URL`
35+
- Releases still passing `NEXTAUTH_SECRET` or `NEXTAUTH_URL` via `web.extraEnvs` now fail template rendering on purpose
36+
3137
## Database
3238

3339
The `database.url` and `database.migrations_url` values must be set to the connection string of your PostgreSQL database.
@@ -76,7 +82,6 @@ The following table lists the configurable parameters of the Airbroke chart and
7682
| web.hpa.maxReplicas | int | `10` | |
7783
| web.hpa.memory | string | `nil` | |
7884
| web.hpa.requests | string | `nil` | |
79-
| web.image | string | `""` | |
8085
| web.imagePullPolicy | string | `"IfNotPresent"` | |
8186
| web.imagePullSecrets | string | `""` | |
8287
| web.imageRepository | string | `"ghcr.io/icoretech/airbroke"` | |
@@ -151,7 +156,7 @@ spec:
151156
chart:
152157
spec:
153158
chart: airbroke
154-
version: ">= 1.1.3"
159+
version: ">= 2.0.0"
155160
sourceRef:
156161
kind: HelmRepository
157162
name: icoretech
@@ -169,7 +174,7 @@ spec:
169174
migrations_url: 'postgresql://xxxx:xxxx@postgres-postgresql.postgres.svc.cluster.local:5432/airbroke_production?schema=public'
170175
web:
171176
imageRepository: ghcr.io/icoretech/airbroke
172-
imageTag: "1.1.22" # {"$imagepolicy": "flux-system:airbroke:tag"}
177+
imageTag: "1.2.0" # {"$imagepolicy": "flux-system:airbroke:tag"}
173178
replicaCount: 2
174179
cachePersistentVolume:
175180
enabled: true
@@ -195,9 +200,9 @@ spec:
195200
value: "xxxxx"
196201
- name: AIRBROKE_GITHUB_ORGS
197202
value: "xxxxx"
198-
- name: NEXTAUTH_SECRET
203+
- name: BETTER_AUTH_SECRET
199204
value: "xxxxxxx"
200-
- name: NEXTAUTH_URL
205+
- name: BETTER_AUTH_URL
201206
value: "https://xxxxxx"
202207
- name: AIRBROKE_OPENAI_API_KEY
203208
value: "sk-xxxxxxx"
@@ -242,7 +247,7 @@ spec:
242247
name: airbroke
243248
policy:
244249
semver:
245-
range: '>=1.1.22 <2.0.0'
250+
range: '>=1.2.0 <2.0.0'
246251
```
247252
248253
```yaml

charts/airbroke/ci/install-values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ database:
66

77
web:
88
# Use a harmless image for ct install; users should override in real deployments.
9-
image: nginx:latest
9+
imageRepository: nginx
10+
imageTag: latest
1011
livenessProbe:
1112
enabled: false
1213
readinessProbe:

charts/airbroke/templates/_helpers.tpl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,21 @@ Shorthand for component names
6161
{{- required "database.migrations_url is required!" .Values.database.migrations_url -}}
6262
{{- end -}}
6363

64+
{{- define "app.validate" -}}
65+
{{- if .Values.web.image -}}
66+
{{- fail "web.image was removed in airbroke chart 2.0.0; use web.imageRepository and optional web.imageTag instead" -}}
67+
{{- end -}}
68+
{{- range $index, $env := .Values.web.extraEnvs }}
69+
{{- $name := $env.name | upper | replace "-" "_" -}}
70+
{{- if eq $name "NEXTAUTH_SECRET" -}}
71+
{{- fail (printf "web.extraEnvs[%d].name=%s is no longer supported in airbroke chart 2.0.0; use BETTER_AUTH_SECRET" $index $env.name) -}}
72+
{{- end -}}
73+
{{- if eq $name "NEXTAUTH_URL" -}}
74+
{{- fail (printf "web.extraEnvs[%d].name=%s is no longer supported in airbroke chart 2.0.0; use BETTER_AUTH_URL" $index $env.name) -}}
75+
{{- end -}}
76+
{{- end -}}
77+
{{- end -}}
78+
6479
{{/*
6580
Common labels
6681
*/}}

charts/airbroke/templates/web-deployment.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ spec:
3131
{{- toYaml . | nindent 8 }}
3232
{{- end }}
3333
spec:
34-
{{- $defaultWebImage := printf "%s:%s" .Values.web.imageRepository (.Values.web.imageTag | default .Chart.AppVersion) }}
35-
{{- $webImage := .Values.web.image | default $defaultWebImage }}
34+
{{- $webImage := printf "%s:%s" .Values.web.imageRepository (.Values.web.imageTag | default .Chart.AppVersion) }}
3635
{{- if .Values.web.runtimeClassName }}
3736
runtimeClassName: {{ .Values.web.runtimeClassName }}
3837
{{- end }}

charts/airbroke/templates/web-env-secret.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- include "app.validate" . }}
12
apiVersion: v1
23
kind: Secret
34
metadata:
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
suite: airbroke deprecated image
2+
templates:
3+
- templates/web-env-secret.yaml
4+
values:
5+
- ../ci/install-values.yaml
6+
7+
tests:
8+
- it: fails when deprecated web.image is used
9+
set:
10+
web.image: nginx:latest
11+
asserts:
12+
- failedTemplate:
13+
errorMessage: web.image was removed in airbroke chart 2.0.0; use web.imageRepository and optional web.imageTag instead
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
suite: airbroke deprecated auth envs
2+
templates:
3+
- templates/web-env-secret.yaml
4+
values:
5+
- ../ci/install-values.yaml
6+
- values/nextauth-secret.yaml
7+
8+
tests:
9+
- it: fails when NEXTAUTH_SECRET is passed via extraEnvs
10+
asserts:
11+
- failedTemplate:
12+
errorMessage: web.extraEnvs[0].name=NEXTAUTH_SECRET is no longer supported in airbroke chart 2.0.0; use BETTER_AUTH_SECRET
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
suite: airbroke render
2+
templates:
3+
- templates/web-env-cm.yaml
4+
- templates/web-env-secret.yaml
5+
- templates/web-env-migrations-secret.yaml
6+
- templates/web-deployment.yaml
7+
values:
8+
- ../ci/install-values.yaml
9+
10+
tests:
11+
- it: renders the web image from imageRepository and imageTag
12+
template: templates/web-deployment.yaml
13+
documentSelector:
14+
path: kind
15+
value: Deployment
16+
asserts:
17+
- equal:
18+
path: spec.template.spec.containers[0].image
19+
value: nginx:latest

0 commit comments

Comments
 (0)