Skip to content

Commit e0eb5d2

Browse files
committed
helm: add certs secret mount
1 parent 0a5e554 commit e0eb5d2

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

helm/templates/_helpers.tpl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ volumes:
9898
secret:
9999
secretName: {{ .Values.coder.tls.secretName | quote }}
100100
{{- end }}
101+
{{- if .Values.certs.secret.name }}
102+
- name: {{ .Values.certs.secret.name | quote }}
103+
secret:
104+
secretName: {{ .Values.certs.secret.name | quote }}
105+
{{- end }}
101106
{{- else }}
102107
volumes: {{ if and (not .Values.coder.tls.secretNames) (not .Values.coder.tls.secretName) }}[]{{ end }}
103108
{{- end }}
@@ -119,6 +124,11 @@ volumeMounts:
119124
mountPath: "/etc/ssl/certs/coder/{{ .Values.coder.tls.secretName }}"
120125
readOnly: true
121126
{{- end }}
127+
{{- if .Values.certs.secret.name }}
128+
- name: {{ .Values.coder.certs.secret.name | quote }}
129+
mountPath: /etc/ssl/certs/{{ .Values.certs.secret.key }}
130+
subPath: {{ .Values.certs.secret.key | quote }}
131+
readOnly: true
122132
{{- else }}
123133
volumeMounts: []
124134
{{- end }}

helm/values.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ coder:
3333
# It is recommended to keep this on if you are using Kubernetes templates
3434
# within Coder.
3535
workspacePerms: true
36+
# coder.serviceAccount.annotations -- The Coder service account annotations.
37+
3638

3739
# coder.env -- The environment variables to set for Coder. These can be used
3840
# to configure all aspects of `coder server`. Please see `coder server --help`
@@ -68,6 +70,14 @@ coder:
6870
# cpu: 100m
6971
# memory: 128Mi
7072

73+
# coder.certs -- Certificate to mount inside the Coder pod (e.g. CA bundle).
74+
certs:
75+
secret:
76+
# coder.certs.secret.name -- Name of the secret.
77+
name: ""
78+
# coder.certs.secret.key -- Key pointing to a certificate in the secret.
79+
key: ""
80+
7181
# coder.service -- The Service object to expose for Coder.
7282
service:
7383
# coder.service.enable -- Whether to create the Service object.

0 commit comments

Comments
 (0)