Skip to content

Commit 0b2fa27

Browse files
fix(chart/supervisor): branch TRIGGER_API_URL + OTEL endpoint on nginx.tls.enabled
When nginx.tls.enabled, the webapp Service routes through the nginx-tls sidecar's external TLS port (with oauth2-proxy auth_request on /). The supervisor can't traverse that auth chain with plain HTTP — runtime result is 400 The plain HTTP request was sent to HTTPS port Point the supervisor at <fullname>-webapp-internal:<nginx.internalPort> (TLS, no oauth2-proxy, app-token auth via TRIGGER_WORKER_TOKEN) when nginx.tls.enabled — mirrors flat-era trigger-dev chart behavior and the existing register-tasks job template's same conditional. Caller responsibility: chart consumers who enable nginx.tls.enabled must also render a <fullname>-webapp-internal Service that exposes nginx.internalPort and selects webapp pods (e.g. via an umbrella template alongside the upstream subchart, as GovSignals does). Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent e8ad21c commit 0b2fa27

3 files changed

Lines changed: 26 additions & 1 deletion

File tree

hosting/k8s/helm/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: trigger
33
description: The official Trigger.dev Helm chart
44
type: application
5-
version: 4.5.0-rc.4-plt663.5
5+
version: 4.5.0-rc.4-plt663.6
66
appVersion: v4.5.0-rc.4
77
home: https://trigger.dev
88
sources:

hosting/k8s/helm/templates/supervisor.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,12 @@ spec:
136136
env:
137137
# Core configuration
138138
- name: TRIGGER_API_URL
139+
{{- if and .Values.nginx.enabled .Values.nginx.tls.enabled }}
140+
# Use internal TLS service (bypasses oauth2-proxy, still encrypted)
141+
value: "https://{{ include "trigger-v4.fullname" . }}-webapp-internal.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.nginx.internalPort | default 3031 }}"
142+
{{- else }}
139143
value: "http://{{ include "trigger-v4.fullname" . }}-webapp:{{ .Values.webapp.service.port }}"
144+
{{- end }}
140145
- name: TRIGGER_WORKER_TOKEN
141146
{{- if .Values.webapp.bootstrap.enabled }}
142147
valueFrom:
@@ -253,7 +258,11 @@ spec:
253258
value: {{ .Values.supervisor.config.debug | quote }}
254259
# OTEL
255260
- name: OTEL_EXPORTER_OTLP_ENDPOINT
261+
{{- if and .Values.nginx.enabled .Values.nginx.tls.enabled }}
262+
value: "https://{{ include "trigger-v4.fullname" . }}-webapp-internal.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.nginx.internalPort | default 3031 }}/otel"
263+
{{- else }}
256264
value: "http://{{ include "trigger-v4.fullname" . }}-webapp.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.webapp.service.port }}/otel"
265+
{{- end }}
257266
{{- with .Values.supervisor.extraEnvVars }}
258267
{{- tpl (toYaml .) $ | nindent 12 }}
259268
{{- end }}

hosting/k8s/helm/values.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -914,6 +914,22 @@ registry:
914914
# - registry.local
915915

916916
# Shared persistent volumes
917+
# Optional nginx sidecar configuration. Default empty — chart consumers
918+
# that ship an in-pod nginx (e.g. for TLS termination + auth proxy) wire
919+
# this via extraContainers/extraVolumes; this block exists so other
920+
# templates can safely reference `.Values.nginx.*` with chart defaults.
921+
nginx:
922+
# When true (and `nginx.tls.enabled: true`), templates like supervisor
923+
# route to `<fullname>-webapp-internal:<nginx.internalPort>` over TLS
924+
# instead of the public webapp Service. The chart consumer is
925+
# responsible for actually rendering the in-pod sidecar + the
926+
# `<fullname>-webapp-internal` Service (see `extraContainers` /
927+
# `extraVolumes` on `webapp`).
928+
enabled: false
929+
tls:
930+
enabled: false
931+
internalPort: 3031
932+
917933
persistence:
918934
# This is used for the worker token file
919935
shared:

0 commit comments

Comments
 (0)