Skip to content

Commit 89f3956

Browse files
committed
enabled -> deploy
1 parent 728c7ab commit 89f3956

25 files changed

+271
-801
lines changed

hosting/k8s/helm/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
values-*.yaml
22
!values-production-example.yaml
3-
*.tgz
3+
*.tgz
4+
/charts

hosting/k8s/helm/Chart.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ dependencies:
1111
- name: minio
1212
repository: oci://registry-1.docker.io/bitnamicharts
1313
version: 17.0.9
14-
digest: sha256:5b89e6afafb1387f83282c3469e3b6403b4eb1118246e08799839c529e4ae8c7
15-
generated: "2025-06-27T11:25:34.615756375+01:00"
14+
digest: sha256:681c9b5ed742a35fac108d40c32dab069320b1c22f0681c6ce354c0898274e22
15+
generated: "2025-06-27T14:01:55.514480271+01:00"

hosting/k8s/helm/Chart.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ dependencies:
2020
- name: postgresql
2121
version: "16.7.14"
2222
repository: "oci://registry-1.docker.io/bitnamicharts"
23-
condition: postgres.enabled
23+
condition: postgres.deploy
2424
alias: postgres
2525
- name: redis
2626
version: "21.2.6"
2727
repository: "oci://registry-1.docker.io/bitnamicharts"
28-
condition: redis.enabled
28+
condition: redis.deploy
2929
- name: clickhouse
3030
version: "9.3.7"
3131
repository: "oci://registry-1.docker.io/bitnamicharts"
32-
condition: clickhouse.enabled
32+
condition: clickhouse.deploy
3333
- name: minio
3434
version: "17.0.9"
3535
repository: "oci://registry-1.docker.io/bitnamicharts"
36-
condition: minio.enabled
36+
condition: minio.deploy

hosting/k8s/helm/README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ This Helm chart deploys Trigger.dev v4 self-hosting stack to Kubernetes.
44

55
## Quick Start
66

7+
### Prerequisites
8+
9+
```bash
10+
# Build Helm dependencies (required for Bitnami charts)
11+
helm dependency build
12+
13+
# Extract dependency charts for local template testing
14+
for file in ./charts/*.tgz; do echo "Extracting $file"; tar -xzf "$file" -C ./charts; done
15+
16+
# Alternative: Use --dependency-update flag for template testing
17+
helm template trigger . --dependency-update
18+
```
19+
720
### Installation
821

922
```bash
@@ -122,7 +135,7 @@ Use external managed services instead of bundled components:
122135
postgres:
123136
enabled: false
124137
external: true
125-
externalConnection:
138+
external:
126139
host: "your-postgres.rds.amazonaws.com"
127140
port: 5432
128141
database: "trigger"
@@ -133,7 +146,7 @@ postgres:
133146
redis:
134147
enabled: false
135148
external: true
136-
externalConnection:
149+
external:
137150
host: "your-redis.cache.amazonaws.com"
138151
port: 6379
139152
password: "your-password"
@@ -142,7 +155,7 @@ redis:
142155
registry:
143156
enabled: true
144157
external: true
145-
externalConnection:
158+
external:
146159
host: "localhost"
147160
port: 5001
148161
username: ""

hosting/k8s/helm/templates/NOTES.txt

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,39 @@ Bootstrap Mode is enabled:
5858
{{- end }}
5959

6060
Configuration:
61-
{{- if .Values.postgres.external }}
62-
- Using external PostgreSQL at {{ .Values.postgres.externalConnection.host }}:{{ .Values.postgres.externalConnection.port }}
63-
{{- else }}
61+
{{- if .Values.postgres.deploy }}
6462
- Using internal PostgreSQL
65-
{{- end }}
66-
{{- if .Values.redis.external }}
67-
- Using external Redis at {{ .Values.redis.externalConnection.host }}:{{ .Values.redis.externalConnection.port }}
6863
{{- else }}
64+
- Using external PostgreSQL at {{ .Values.postgres.external.host }}:{{ .Values.postgres.external.port | default 5432 }}
65+
{{- end }}
66+
{{- if .Values.redis.deploy }}
6967
- Using internal Redis
68+
{{- else }}
69+
- Using external Redis at {{ .Values.redis.external.host }}:{{ .Values.redis.external.port | default 6379 }}
70+
{{- end }}
71+
{{- if .Values.electric.deploy }}
72+
- Using internal Electric sync service
73+
{{- else }}
74+
- Using external Electric sync service at {{ .Values.electric.external.url }}
7075
{{- end }}
71-
{{- if .Values.electric.enabled }}
72-
- Electric sync service enabled
76+
{{- if .Values.clickhouse.deploy }}
77+
- Using internal ClickHouse
78+
{{- else }}
79+
- Using external ClickHouse at {{ .Values.clickhouse.external.host }}:{{ .Values.clickhouse.external.httpPort | default 8123 }}
7380
{{- end }}
74-
{{- if .Values.clickhouse.enabled }}
75-
- ClickHouse analytics database enabled
81+
{{- if .Values.minio.deploy }}
82+
- Using internal MinIO object storage
83+
{{- else }}
84+
- Using external MinIO object storage at {{ .Values.minio.external.endpoint }}
7685
{{- end }}
77-
{{- if .Values.minio.enabled }}
78-
- MinIO object storage enabled
86+
{{- if .Values.registry.deploy }}
87+
- Using internal Docker registry
88+
{{- else }}
89+
- Using external Docker registry at {{ .Values.registry.external.host }}:{{ .Values.registry.external.port }}
90+
{{- if eq .Values.registry.external.host "localhost" }}
91+
92+
⚠️ Registry Warning:
93+
Using localhost for registry. Deployments will only work when testing locally in kind or minikube.
94+
Please ensure registry.external is properly configured to point at an external registry.
7995
{{- end }}
80-
{{- if .Values.registry.enabled }}
81-
- Docker registry enabled
8296
{{- end }}

hosting/k8s/helm/templates/_helpers.tpl

Lines changed: 78 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -95,58 +95,103 @@ Get the full image name for supervisor
9595
{{- end }}
9696
{{- end }}
9797

98+
{{/*
99+
PostgreSQL hostname
100+
*/}}
101+
{{- define "trigger-v4.postgres.hostname" -}}
102+
{{- if .Values.postgres.host }}
103+
{{- .Values.postgres.host }}
104+
{{- else if .Values.postgres.deploy }}
105+
{{- printf "%s-postgres" .Release.Name }}
106+
{{- end }}
107+
{{- end }}
108+
98109
{{/*
99110
PostgreSQL connection string
100111
*/}}
101112
{{- define "trigger-v4.postgres.connectionString" -}}
102-
{{- if .Values.postgres.external -}}
103-
postgresql://{{ .Values.postgres.externalConnection.username }}:{{ .Values.postgres.externalConnection.password }}@{{ .Values.postgres.externalConnection.host }}:{{ .Values.postgres.externalConnection.port }}/{{ .Values.postgres.externalConnection.database }}?schema={{ .Values.postgres.externalConnection.schema | default "public" }}&sslmode={{ .Values.postgres.externalConnection.sslMode | default "prefer" }}
104-
{{- else -}}
105-
postgresql://{{ .Values.postgres.auth.username }}:{{ .Values.postgres.auth.password }}@{{ include "trigger-v4.fullname" . }}-postgres:{{ .Values.postgres.primary.service.ports.postgres }}/{{ .Values.postgres.auth.database }}?schema={{ .Values.postgres.connection.schema | default "public" }}&sslmode={{ .Values.postgres.connection.sslMode | default "prefer" }}
113+
{{- if .Values.postgres.host -}}
114+
postgresql://{{ .Values.postgres.username }}:{{ .Values.postgres.password }}@{{ .Values.postgres.host }}:{{ .Values.postgres.port | default 5432 }}/{{ .Values.postgres.database }}?schema={{ .Values.postgres.schema | default "public" }}&sslmode={{ .Values.postgres.sslMode | default "prefer" }}
115+
{{- else if .Values.postgres.deploy -}}
116+
postgresql://{{ .Values.postgres.auth.username }}:{{ .Values.postgres.auth.password }}@{{ include "trigger-v4.postgres.hostname" . }}:5432/{{ .Values.postgres.auth.database }}?schema={{ .Values.postgres.connection.schema | default "public" }}&sslmode={{ .Values.postgres.connection.sslMode | default "prefer" }}
106117
{{- end -}}
107118
{{- end }}
108119

120+
{{/*
121+
Redis hostname
122+
*/}}
123+
{{- define "trigger-v4.redis.hostname" -}}
124+
{{- if .Values.redis.host }}
125+
{{- .Values.redis.host }}
126+
{{- else if .Values.redis.deploy }}
127+
{{- printf "%s-redis-master" .Release.Name }}
128+
{{- end }}
129+
{{- end }}
130+
109131
{{/*
110132
Redis connection details
111133
*/}}
112134
{{- define "trigger-v4.redis.host" -}}
113-
{{- if .Values.redis.external -}}
114-
{{ .Values.redis.externalConnection.host }}
115-
{{- else -}}
116-
{{ include "trigger-v4.fullname" . }}-redis-master
117-
{{- end -}}
135+
{{- include "trigger-v4.redis.hostname" . }}
118136
{{- end }}
119137

120138
{{- define "trigger-v4.redis.port" -}}
121-
{{- if .Values.redis.external -}}
122-
{{ .Values.redis.externalConnection.port }}
123-
{{- else -}}
124-
{{ .Values.redis.master.service.ports.redis }}
139+
{{- if .Values.redis.host -}}
140+
{{ .Values.redis.port | default 6379 }}
141+
{{- else if .Values.redis.deploy -}}
142+
6379
125143
{{- end -}}
126144
{{- end }}
127145

128146
{{/*
129147
Electric service URL
130148
*/}}
131149
{{- define "trigger-v4.electric.url" -}}
132-
{{- if .Values.electric.enabled -}}
150+
{{- if .Values.electric.deploy -}}
133151
http://{{ include "trigger-v4.fullname" . }}-electric:{{ .Values.electric.service.port }}
134152
{{- else -}}
135-
{{ .Values.config.electricOrigin }}
153+
{{ .Values.electric.external.url }}
136154
{{- end -}}
137155
{{- end }}
138156

157+
{{/*
158+
ClickHouse hostname
159+
*/}}
160+
{{- define "trigger-v4.clickhouse.hostname" -}}
161+
{{- if .Values.clickhouse.host }}
162+
{{- .Values.clickhouse.host }}
163+
{{- else if .Values.clickhouse.deploy }}
164+
{{- printf "%s-clickhouse" .Release.Name }}
165+
{{- end }}
166+
{{- end }}
167+
168+
{{/*
169+
ClickHouse URL
170+
*/}}
171+
{{- define "trigger-v4.clickhouse.url" -}}
172+
{{- if .Values.clickhouse.host -}}
173+
http://{{ .Values.clickhouse.username }}:{{ .Values.clickhouse.password }}@{{ .Values.clickhouse.host }}:{{ .Values.clickhouse.httpPort | default 8123 }}
174+
{{- else if .Values.clickhouse.deploy -}}
175+
http://{{ .Values.clickhouse.auth.username }}:{{ .Values.clickhouse.auth.password }}@{{ include "trigger-v4.clickhouse.hostname" . }}:8123
176+
{{- end -}}
177+
{{- end }}
178+
179+
{{/*
180+
MinIO hostname
181+
*/}}
182+
{{- define "trigger-v4.minio.hostname" -}}
183+
{{- if .Values.minio.endpoint }}
184+
{{- .Values.minio.endpoint }}
185+
{{- else if .Values.minio.deploy }}
186+
{{- printf "http://%s-minio:9000" .Release.Name }}
187+
{{- end }}
188+
{{- end }}
189+
139190
{{/*
140191
MinIO connection details
141192
*/}}
142193
{{- define "trigger-v4.minio.url" -}}
143-
{{- if .Values.minio.enabled -}}
144-
http://{{ include "trigger-v4.fullname" . }}-minio:{{ .Values.minio.service.ports.api }}
145-
{{- else if .Values.minio.external -}}
146-
{{ .Values.minio.externalConnection.url }}
147-
{{- else -}}
148-
""
149-
{{- end -}}
194+
{{- include "trigger-v4.minio.hostname" . }}
150195
{{- end }}
151196

152197
{{/*
@@ -164,23 +209,21 @@ Get the secrets name - either existing secret or generated name
164209
Registry connection details
165210
*/}}
166211
{{- define "trigger-v4.registry.host" -}}
167-
{{- if .Values.registry.external -}}
168-
{{ .Values.registry.externalConnection.host }}:{{ .Values.registry.externalConnection.port }}
169-
{{- else if .Values.registry.enabled -}}
212+
{{- if .Values.registry.deploy -}}
170213
{{ include "trigger-v4.fullname" . }}-registry:{{ .Values.registry.service.port }}
171214
{{- else -}}
172-
localhost:5000
215+
{{ .Values.registry.external.host }}:{{ .Values.registry.external.port }}
173216
{{- end -}}
174217
{{- end }}
175218

176219
{{/*
177220
PostgreSQL host (for wait-for-it script)
178221
*/}}
179222
{{- define "trigger-v4.postgres.host" -}}
180-
{{- if .Values.postgres.external -}}
181-
{{ .Values.postgres.externalConnection.host }}:{{ .Values.postgres.externalConnection.port }}
182-
{{- else -}}
183-
{{ include "trigger-v4.fullname" . }}-postgres:{{ .Values.postgres.primary.service.ports.postgres }}
223+
{{- if .Values.postgres.host -}}
224+
{{ .Values.postgres.host }}:{{ .Values.postgres.port | default 5432 }}
225+
{{- else if .Values.postgres.deploy -}}
226+
{{ include "trigger-v4.postgres.hostname" . }}:5432
184227
{{- end -}}
185228
{{- end }}
186229

@@ -217,17 +260,17 @@ Create the name of the supervisor cluster role to use
217260
Generate docker config for image pull secret
218261
*/}}
219262
{{- define "trigger-v4.imagePullSecret" }}
220-
{{- if and .Values.registry.enabled .Values.registry.auth.enabled }}
263+
{{- if and .Values.registry.deploy .Values.registry.auth.enabled }}
221264
{{- $registryHost := include "trigger-v4.registry.host" . }}
222265
{{- $username := .Values.registry.auth.username }}
223266
{{- $password := .Values.registry.auth.password }}
224267
{{- $auth := printf "%s:%s" $username $password | b64enc }}
225268
{{- $config := dict "auths" (dict $registryHost (dict "username" $username "password" $password "auth" $auth)) }}
226269
{{- $config | toJson }}
227-
{{- else if and .Values.registry.external .Values.registry.externalConnection.auth.enabled }}
228-
{{- $registryHost := .Values.registry.externalConnection.host }}
229-
{{- $username := .Values.registry.externalConnection.auth.username }}
230-
{{- $password := .Values.registry.externalConnection.auth.password }}
270+
{{- else if and (not .Values.registry.deploy) .Values.registry.external.auth.enabled }}
271+
{{- $registryHost := .Values.registry.external.host }}
272+
{{- $username := .Values.registry.external.auth.username }}
273+
{{- $password := .Values.registry.external.auth.password }}
231274
{{- $auth := printf "%s:%s" $username $password | b64enc }}
232275
{{- $config := dict "auths" (dict $registryHost (dict "username" $username "password" $password "auth" $auth)) }}
233276
{{- $config | toJson }}

0 commit comments

Comments
 (0)