fix: Set a default CODER_ACCESS_URL in Helm (#5041)

* fix: Set a default `CODER_ACCESS_URL` in Helm

This allows for a simple `helm apply` to create a full Coder
deployment that works for creating workspaces.

* Update docs
This commit is contained in:
Kyle Carberry
2022-11-13 14:49:57 -06:00
committed by GitHub
parent 73f91e4690
commit 2a6fff9227
2 changed files with 17 additions and 2 deletions
+12
View File
@@ -54,6 +54,18 @@ spec:
env:
- name: CODER_ADDRESS
value: "0.0.0.0:{{ include "coder.port" . }}"
# Set the default access URL so a `helm apply` works by default.
# See: https://github.com/coder/coder/issues/5024
{{- $hasAccessURL := false }}
{{- range .Values.coder.env }}
{{- if eq .name "CODER_ACCESS_URL" }}
{{- $hasAccessURL = true }}
{{- end }}
{{- end }}
{{- if not $hasAccessURL }}
- name: CODER_ACCESS_URL
value: "{{ include "coder.portName" . }}://coder.{{.Release.Namespace}}.svc.cluster.local"
{{- end }}
# Used for inter-pod communication with high-availability.
- name: KUBE_POD_IP
valueFrom: