thirdparty-ops-docker-helm/charts/molgenis-website/templates/ingress.yaml

38 lines
1023 B
YAML
Raw Normal View History

2018-11-08 22:18:48 +01:00
{{- if .Values.ingress.enabled }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: "{{ $.Release.Name }}-ingress"
labels:
app: {{ $.Values.website.name }}
chart: "{{ $.Chart.Name }}-{{ $.Chart.Version }}"
release: "{{ $.Release.Name }}"
heritage: "{{ $.Release.Service }}"
annotations:
{{- if .Values.ingress.tls }}
2018-11-08 22:18:48 +01:00
ingress.kubernetes.io/secure-backends: "true"
{{- end }}
{{- range $key, $value := .Values.ingress.annotations }}
2018-11-08 22:18:48 +01:00
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
rules:
{{- range .Values.ingress.hosts }}
2018-11-08 22:18:48 +01:00
- host: {{ .name }}
http:
paths:
- path: {{ default "/" .path }}
backend:
serviceName: {{ $.Release.Name }}-{{ $.Values.website.service.name }}
2018-11-08 22:18:48 +01:00
servicePort: {{ $.Values.website.service.port }}
{{- end }}
2018-11-08 22:18:48 +01:00
{{- if .tls }}
tls:
- hosts:
{{- range .Values.ingress.hosts }}
2018-11-08 22:18:48 +01:00
- {{ .name }}
{{- end }}
secretName: {{ .Values.ingress.tlsSecret }}
2018-11-08 22:18:48 +01:00
{{- end }}
---
{{- end }}