Skip to content

fix: fix helm prometheus block causing failures #5458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion helm/templates/coder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,20 @@ spec:
protocol: TCP
{{- end }}
{{- range .Values.coder.env }}
{{- if and (eq .name "CODER_PROMETHEUS_ENABLE") (eq .value "true") }}
{{- if eq .name "CODER_PROMETHEUS_ENABLE" }}
{{/*
This sadly has to be nested to avoid evaluating the second part
of the condition too early and potentially getting type errors if
the value is not a string (like a `valueFrom`). We do not support
`valueFrom` for this env var specifically.
*/}}
{{- if eq .value "true" }}
- name: "prometheus-http"
containerPort: 6060
protocol: TCP
{{- end }}
{{- end }}
{{- end }}
readinessProbe:
httpGet:
path: /api/v2/buildinfo
Expand Down