Skip to content

Commit 0c21654

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 0c21654

2 files changed

Lines changed: 10 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 (dig "nginx" "enabled" false .Values) (dig "nginx" "tls" "enabled" false .Values) }}
140+
# Use internal TLS service (bypasses oauth2-proxy, still encrypted)
141+
value: "https://{{ include "trigger-v4.fullname" . }}-webapp-internal.{{ .Release.Namespace }}.svc.cluster.local:{{ dig "nginx" "internalPort" 3031 .Values }}"
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 (dig "nginx" "enabled" false .Values) (dig "nginx" "tls" "enabled" false .Values) }}
262+
value: "https://{{ include "trigger-v4.fullname" . }}-webapp-internal.{{ .Release.Namespace }}.svc.cluster.local:{{ dig "nginx" "internalPort" 3031 .Values }}/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 }}

0 commit comments

Comments
 (0)