Skip to content

Commit 4618d16

Browse files
committed
refactor: make notes helm template comments
1 parent 204e393 commit 4618d16

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

jupyterhub/templates/hub/deployment.yaml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ spec:
2323
{{- . | toYaml | trimSuffix "\n" | nindent 8 }}
2424
{{- end }}
2525
annotations:
26-
# This lets us autorestart when the secret changes!
26+
{{- /* This lets us autorestart when the secret changes! */}}
2727
checksum/config-map: {{ include (print .Template.BasePath "/hub/configmap.yaml") . | sha256sum }}
2828
checksum/secret: {{ include (print .Template.BasePath "/hub/secret.yaml") . | sha256sum }}
2929
{{- with .Values.hub.annotations }}
@@ -111,13 +111,13 @@ spec:
111111
{{- if .Values.debug.enabled }}
112112
- --debug
113113
{{- end }}
114-
{{- /*
115-
We want to do automatic upgrades for sqlite-pvc by default, but
116-
allow users to opt out of that if they want. Users using their own
117-
db need to 'opt in' Go Templates treat nil and "" and false as
118-
'false', making this code complex. We can probably make this a
119-
one-liner, but doing combinations of boolean vars in go templates is
120-
very inelegant & hard to reason about.
114+
{{- /* NOTE:
115+
We want to do automatic upgrades for sqlite-pvc by default, but
116+
allow users to opt out of that if they want. Users using their own
117+
db need to 'opt in' Go Templates treat nil and "" and false as
118+
'false', making this code complex. We can probably make this a
119+
one-liner, but doing combinations of boolean vars in go templates
120+
is very inelegant & hard to reason about.
121121
*/}}
122122
{{- $upgradeType := typeOf .Values.hub.db.upgrade }}
123123
{{- if eq $upgradeType "bool" }}
@@ -195,9 +195,12 @@ spec:
195195
- name: CONFIGPROXY_AUTH_TOKEN
196196
valueFrom:
197197
secretKeyRef:
198-
# NOTE: References the chart managed k8s Secret even if
199-
# hub.existingSecret is specified to avoid using the
200-
# lookup function on the user managed k8s Secret.
198+
{{- /* NOTE:
199+
References the chart managed k8s Secret even if
200+
hub.existingSecret is specified to avoid using the lookup
201+
function on the user managed k8s Secret which is assumed to
202+
not be possible.
203+
*/}}
201204
name: {{ include "jupyterhub.hub.fullname" . }}
202205
key: hub.config.ConfigurableHTTPProxy.auth_token
203206
{{- with .Values.hub.extraEnv }}
@@ -207,13 +210,13 @@ spec:
207210
- name: http
208211
containerPort: 8081
209212
{{- if .Values.hub.livenessProbe.enabled }}
210-
# livenessProbe notes:
211-
# We don't know how long hub database upgrades could take
212-
# so having a liveness probe could be a bit risky unless we put
213-
# a initialDelaySeconds value with long enough margin for that
214-
# to not be an issue. If it is too short, we could end up aborting
215-
# database upgrades midway or ending up in an infinite restart
216-
# loop.
213+
{{- /* NOTE:
214+
We don't know how long hub database upgrades could take so having a
215+
liveness probe could be a bit risky unless we put a
216+
initialDelaySeconds value with long enough margin for that to not be
217+
an issue. If it is too short, we could end up aborting database
218+
upgrades midway or ending up in an infinite restart loop.
219+
*/}}
217220
livenessProbe:
218221
initialDelaySeconds: {{ .Values.hub.livenessProbe.initialDelaySeconds }}
219222
periodSeconds: {{ .Values.hub.livenessProbe.periodSeconds }}

0 commit comments

Comments
 (0)