Skip to content

feat: add envFrom value to Helm chart #9587

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 4 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add envUseClusterAccessURL
  • Loading branch information
ericpaulsen committed Sep 13, 2023
commit 65b78ef84bf1f83ece7e2e726d3b5b6cbd426708
4 changes: 3 additions & 1 deletion helm/coder/templates/_coder.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ args:
{{- end }}
- server
{{- end }}
{{- if .Values.coder.envFrom }}
envFrom:
{{- with .Values.coder.envFrom }}
{{ toYaml . }}
{{- end }}
{{- end }}
env:
- name: CODER_HTTP_ADDRESS
value: "0.0.0.0:8080"
Expand All @@ -54,7 +56,7 @@ env:
{{- $hasAccessURL = true }}
{{- end }}
{{- end }}
{{- if not $hasAccessURL }}
{{- if and (not $hasAccessURL) .Values.coder.envUseClusterAccessURL }}
- name: CODER_ACCESS_URL
value: {{ include "coder.defaultAccessURL" . | quote }}
{{- end }}
Expand Down
15 changes: 11 additions & 4 deletions helm/coder/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,21 @@ coder:
# - CODER_DERP_SERVER_RELAY_URL
#
# We will additionally set CODER_ACCESS_URL if unset to the cluster service
# URL.
# URL, unless coder.envUseClusterAccessURL is set to false.
env: []
# - name: "CODER_ACCESS_URL"
# value: "https://coder.example.com"

envFrom:
- secretRef:
name: ""
# coder.envFrom -- Secrets to use for Coder's environment variables. If you want
# one environment variable read from a secret, then use coder.env valueFrom. See
# the K8s docs here: https://kubernetes.io/docs/tasks/inject-data-application/distribute-credentials-secure/#define-container-environment-variables-using-secret-data
# If setting CODER_ACCESS_URL in coder.envFrom, then you must set coder.envUseClusterAccessURL
# to false.
envFrom: []

# coder.envUseClusterAccessURL -- Set this to false if defining CODER_ACCESS_URL
# in coder.envFrom
envUseClusterAccessURL: true

# coder.image -- The image to use for Coder.
image:
Expand Down