Skip to content

Commit 88d3496

Browse files
authored
fix: fix helm prometheus block causing failures (#5458)
1 parent a19c6fc commit 88d3496

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

helm/templates/coder.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,20 @@ spec:
8989
protocol: TCP
9090
{{- end }}
9191
{{- range .Values.coder.env }}
92-
{{- if and (eq .name "CODER_PROMETHEUS_ENABLE") (eq .value "true") }}
92+
{{- if eq .name "CODER_PROMETHEUS_ENABLE" }}
93+
{{/*
94+
This sadly has to be nested to avoid evaluating the second part
95+
of the condition too early and potentially getting type errors if
96+
the value is not a string (like a `valueFrom`). We do not support
97+
`valueFrom` for this env var specifically.
98+
*/}}
99+
{{- if eq .value "true" }}
93100
- name: "prometheus-http"
94101
containerPort: 6060
95102
protocol: TCP
96103
{{- end }}
97104
{{- end }}
105+
{{- end }}
98106
readinessProbe:
99107
httpGet:
100108
path: /api/v2/buildinfo

0 commit comments

Comments
 (0)