32 lines
907 B
YAML
32 lines
907 B
YAML
|
{{- if .Values.ingress.enabled -}}
|
||
|
apiVersion: extensions/v1beta1
|
||
|
kind: Ingress
|
||
|
metadata:
|
||
|
name: {{ template "openfaas.name" . }}-ingress
|
||
|
namespace: {{ .Release.Namespace | quote }}
|
||
|
labels:
|
||
|
app: {{ template "openfaas.name" . }}
|
||
|
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
||
|
release: {{ .Release.Name }}
|
||
|
heritage: {{ .Release.Service }}
|
||
|
annotations:
|
||
|
{{- range $key, $value := .Values.ingress.annotations }}
|
||
|
{{ $key }}: {{ $value | quote }}
|
||
|
{{- end }}
|
||
|
spec:
|
||
|
rules:
|
||
|
{{- range $host := .Values.ingress.hosts }}
|
||
|
- host: {{ $host.host }}
|
||
|
http:
|
||
|
paths:
|
||
|
- path: {{ $host.path }}
|
||
|
backend:
|
||
|
serviceName: {{ $host.serviceName }}
|
||
|
servicePort: {{ $host.servicePort }}
|
||
|
{{- end -}}
|
||
|
{{- if .Values.ingress.tls }}
|
||
|
tls:
|
||
|
{{ toYaml .Values.ingress.tls | indent 4 }}
|
||
|
{{- end -}}
|
||
|
{{- end -}}
|