Skip to content

Commit

Permalink
cleanup: remove unused named helper in helpers.tpl
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Jan 16, 2021
1 parent 4f367eb commit d933f3b
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions jupyterhub/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,12 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "jupyterhub.nameField" . }}
name: {{ include "jupyterhub.autohttps.fullname" . }}
labels:
{{- include "jupyterhub.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
{{- $_ := merge (dict "appLabel" "kube-lego") . }}
{{- include "jupyterhub.matchLabels" $_ | nindent 6 }}
template:
metadata:
Expand Down Expand Up @@ -94,7 +93,7 @@

{{- /*
jupyterhub.componentLabel:
Used by "jupyterhub.labels" and "jupyterhub.nameField".
Used by "jupyterhub.labels".
NOTE: The component label is determined by either...
- 1: The provided scope's .componentLabel
Expand All @@ -111,22 +110,6 @@
{{- end }}
{{- /*
jupyterhub.nameField:
Populates the name field's value.
NOTE: some name fields are limited to 63 characters by the DNS naming spec.
TODO:
- [ ] Set all name fields using this helper.
- [ ] Optionally prefix the release name based on some setting in
.Values to allow for multiple deployments within a single namespace.
*/}}
{{- define "jupyterhub.nameField" -}}
{{- $name := print (.namePrefix | default "") (include "jupyterhub.componentLabel" .) (.nameSuffix | default "") -}}
{{ printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}


{{- /*
jupyterhub.commonLabels:
Foundation for "jupyterhub.labels".
Expand Down

0 comments on commit d933f3b

Please sign in to comment.