Skip to content

Commit f730a10

Browse files
authored
Merge pull request #3032 from HoseonRyu/fix-alias
Fix bugs related to installing chart multiple times in the same namespace
2 parents e87104a + 5b9f7ac commit f730a10

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

jupyterhub/templates/_helpers-names.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@
9090
{{- /* A hack to avoid issues from invoking this from a parent Helm chart. */}}
9191
{{- $existing_secret := .Values.hub.existingSecret }}
9292
{{- if ne .Chart.Name "jupyterhub" }}
93-
{{- $existing_secret = .Values.jupyterhub.hub.existingSecret }}
93+
{{- if .Values.jupyterhub }}
94+
{{- $existing_secret = .Values.jupyterhub.hub.existingSecret }}
95+
{{- end }}
9496
{{- end }}
9597
{{- if $existing_secret }}
9698
{{- $existing_secret }}

jupyterhub/templates/proxy/service.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,15 @@ metadata:
3535
{{- end }}
3636
spec:
3737
selector:
38+
# This service will target the autohttps pod if autohttps is configured, and
39+
# the proxy pod if not. When autohttps is configured, the service proxy-http
40+
# will be around to target the proxy pod directly.
3841
{{- if $autoHTTPS }}
39-
component: autohttps
42+
{{- $_ := merge (dict "componentLabel" "autohttps") . -}}
43+
{{- include "jupyterhub.matchLabels" $_ | nindent 4 }}
4044
{{- else }}
41-
component: proxy
45+
{{- include "jupyterhub.matchLabels" . | nindent 4 }}
4246
{{- end }}
43-
release: {{ .Release.Name }}
4447
ports:
4548
{{- if $HTTPS }}
4649
- name: https

0 commit comments

Comments
 (0)