Skip to content

Commit e8ad21c

Browse files
fix(chart/webapp): introduce separate webapp.service.servicePortTargetPort knob
PLT-906's previous patch overloaded webapp.service.targetPort for two different purposes: (1) the webapp container's listening port (used by .containerPort on the Deployment AND by downstream consumers like sidecar nginx proxy_pass localhost:<port>), and (2) the Service's ports[].targetPort field that controls in-pod routing. Those two values diverge whenever the Service should route through a sidecar container's named port (e.g. an in-pod TLS terminator or auth proxy) rather than directly to the webapp container. Overloading one field forced consumers to pick between routing through the sidecar and being able to reach the webapp. Add a dedicated webapp.service.servicePortTargetPort knob (default empty -> falls back to webapp.service.targetPort -> 'http'), so deployments can route Service traffic to a sidecar's named port without affecting containerPort / downstream consumers. Existing behavior preserved for users who don't set the new knob. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 3ddd2b9 commit e8ad21c

3 files changed

Lines changed: 11 additions & 2 deletions

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.4
5+
version: 4.5.0-rc.4-plt663.5
66
appVersion: v4.5.0-rc.4
77
home: https://trigger.dev
88
sources:

hosting/k8s/helm/templates/webapp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ spec:
498498
type: {{ .Values.webapp.service.type }}
499499
ports:
500500
- port: {{ .Values.webapp.service.port }}
501-
targetPort: {{ .Values.webapp.service.targetPort | default "http" }}
501+
targetPort: {{ .Values.webapp.service.servicePortTargetPort | default .Values.webapp.service.targetPort | default "http" }}
502502
protocol: TCP
503503
name: {{ .Values.webapp.service.name | default "http" }}
504504
selector:

hosting/k8s/helm/values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,15 @@ electric:
581581
# (e.g. a service-mesh ingress or platform LB) needs to address the
582582
# port by a specific name instead of the chart default "http".
583583
name: ""
584+
# Optional override of the Service's `ports[].targetPort` field
585+
# only. Defaults to `webapp.service.targetPort` (same value used
586+
# for the webapp container's listening port), which matches
587+
# historical behavior — Service routes directly to the webapp
588+
# container. Override when the Service should route to a sidecar
589+
# container's named port instead (e.g. an in-pod TLS terminator or
590+
# auth proxy listening on a different containerPort than the
591+
# webapp itself).
592+
servicePortTargetPort: ""
584593
annotations: {}
585594
resources: {}
586595

0 commit comments

Comments
 (0)