Support typical tls setup (cert-manager)
@@ -5,17 +5,17 @@ metadata:
name: binderhub
{{- if or (and .Values.ingress.https.enabled (eq .Values.ingress.https.type "kube-lego")) .Values.ingress.annotations }}
annotations:
- {{- if eq .Values.ingress.https.type "kube-lego" }}
+ {{- if and .Values.ingress.https.enabled (eq .Values.ingress.https.type "kube-lego") }}
kubernetes.io/tls-acme: "true"
- {{ end -}}
+ {{- end }}
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
rules:
- {{- range $host := .Values.ingress.hosts }}
- - host: {{ $host }}
+ {{- range .Values.ingress.hosts }}
+ - host: {{ . }}
http:
paths:
- path: /
@@ -27,8 +27,17 @@ spec:
tls:
- secretName: kubelego-tls-binder-{{ .Release.Name }}
hosts:
- {{- range $host := .Values.ingress.hosts }}
- - {{ $host }}
+ {{- range .Values.ingress.hosts }}
+ - {{ . | quote }}
+ {{- end }}
+ {{- else if .Values.ingress.tls }}
+ tls:
+ {{- range .Values.ingress.tls }}
+ - hosts:
+ {{- range .hosts }}
+ - {{ . | quote }}
+ {{- end }}
+ secretName: {{ .secretName }}
{{- end }}
{{- end }}
{{- end -}}
