| {{- if .Values.ui.ingress.enabled -}} |
| {{- $fullName := include "datalab-ui.fullname" . -}} |
| {{ $servicePort := .Values.ui.service.http_port }} |
| {{ $host := .Values.ui.ingress.host }} |
| apiVersion: extensions/v1beta1 |
| kind: Ingress |
| metadata: |
| name: {{ $fullName }} |
| labels: |
| {{ include "datalab-ui.labels" . | indent 4 }} |
| annotations: |
| {{- with .Values.ui.ingress.annotations }} |
| {{ toYaml . | indent 4 }} |
| {{- end }} |
| spec: |
| {{- if .Values.ui.ingress.tls }} |
| tls: |
| {{- range .Values.ui.ingress.tls }} |
| - hosts: |
| {{- range .hosts }} |
| - {{ . | quote }} |
| {{- end }} |
| secretName: {{ .secretName }} |
| {{- end }} |
| {{- end }} |
| rules: |
| - host: {{ $host }} |
| http: |
| paths: |
| - backend: |
| serviceName: {{ $fullName }} |
| servicePort: {{ $servicePort }} |
| path: / |
| {{- end }} |