38 lines
1023 B
YAML
38 lines
1023 B
YAML
{{- 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 }}
|
|
ingress.kubernetes.io/secure-backends: "true"
|
|
{{- end }}
|
|
{{- range $key, $value := .Values.ingress.annotations }}
|
|
{{ $key }}: {{ $value | quote }}
|
|
{{- end }}
|
|
spec:
|
|
rules:
|
|
{{- range .Values.ingress.hosts }}
|
|
- host: {{ .name }}
|
|
http:
|
|
paths:
|
|
- path: {{ default "/" .path }}
|
|
backend:
|
|
serviceName: {{ $.Release.Name }}-{{ $.Values.website.service.name }}
|
|
servicePort: {{ $.Values.website.service.port }}
|
|
{{- end }}
|
|
{{- if .tls }}
|
|
tls:
|
|
- hosts:
|
|
{{- range .Values.ingress.hosts }}
|
|
- {{ .name }}
|
|
{{- end }}
|
|
secretName: {{ .Values.ingress.tlsSecret }}
|
|
{{- end }}
|
|
---
|
|
{{- end }} |