From 86e868caffb6a5da086bb6318575519de57fa21b Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sun, 1 Apr 2018 04:53:14 +0200 Subject: [PATCH 1/2] Comments {# #} replaced with # I got faulty YAML when running a helm upgrade, perhaps they are a mistake? --- jupyterhub/templates/hub/deployment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jupyterhub/templates/hub/deployment.yaml b/jupyterhub/templates/hub/deployment.yaml index bf9d9cbdd2..67d7f7b996 100644 --- a/jupyterhub/templates/hub/deployment.yaml +++ b/jupyterhub/templates/hub/deployment.yaml @@ -133,11 +133,11 @@ spec: key: proxy.token {{ if .Values.hub.extraEnv -}} {{ $extraEnvType := typeOf .Values.hub.extraEnv -}} - {# If we have a list, embed that here directly. This allows for complex configuration from configmap, downward API, etc #} + # If we have a list, embed that here directly. This allows for complex configuration from configmap, downward API, etc {{ if eq $extraEnvType "[]interface {}" -}} {{ toYaml .Values.hub.extraEnv | indent 8 }} {{ else if eq $extraEnvType "map[string]interface {}" -}} - {# If we have a map, treat those as key-value pairs #} + # If we have a map, treat those as key-value pairs {{ range $key, $value := .Values.hub.extraEnv }} - name: {{ $key | quote }} value: {{ $value | quote }} From 931181194380be7dd7a9ebc2001866d964b10041 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Sun, 1 Apr 2018 05:40:23 +0200 Subject: [PATCH 2/2] adjusted to {{\* *\}} syntax --- jupyterhub/templates/hub/deployment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jupyterhub/templates/hub/deployment.yaml b/jupyterhub/templates/hub/deployment.yaml index 67d7f7b996..edc81d6bf8 100644 --- a/jupyterhub/templates/hub/deployment.yaml +++ b/jupyterhub/templates/hub/deployment.yaml @@ -133,11 +133,11 @@ spec: key: proxy.token {{ if .Values.hub.extraEnv -}} {{ $extraEnvType := typeOf .Values.hub.extraEnv -}} - # If we have a list, embed that here directly. This allows for complex configuration from configmap, downward API, etc + {{/* If we have a list, embed that here directly. This allows for complex configuration from configmap, downward API, etc. */}} {{ if eq $extraEnvType "[]interface {}" -}} {{ toYaml .Values.hub.extraEnv | indent 8 }} {{ else if eq $extraEnvType "map[string]interface {}" -}} - # If we have a map, treat those as key-value pairs + {{/* If we have a map, treat those as key-value pairs. */}} {{ range $key, $value := .Values.hub.extraEnv }} - name: {{ $key | quote }} value: {{ $value | quote }}