blob: dacea0cb9704e2d7cdabaa08afe1710c493e38fc [file] [log] [blame]
Marc-Alexandre Choquette81a2df62018-07-14 13:04:33 -04001{{/*
2# Copyright © 2018 Amdocs, Bell Canada
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15*/}}
16{{- if .Values.ingress.enabled -}}
17{{- $serviceName := include "fullname" . -}}
18{{- $servicePort := .Values.service.externalPort -}}
19apiVersion: extensions/v1beta1
20kind: Ingress
21metadata:
22 name: {{ template "fullname" . }}
23 labels:
24 app: {{ template "name" . }}
25 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
26 release: {{ .Release.Name }}
27 heritage: {{ .Release.Service }}
28 annotations:
29 {{- range $key, $value := .Values.ingress.annotations }}
30 {{ $key }}: {{ $value | quote }}
31 {{- end }}
32spec:
33 rules:
34 {{- range $host := .Values.ingress.hosts }}
35 - host: {{ $host }}
36 http:
37 paths:
38 - path: /
39 backend:
40 serviceName: {{ $serviceName }}
41 servicePort: {{ $servicePort }}
42 {{- end -}}
43 {{- if .Values.ingress.tls }}
44 tls:
45{{ toYaml .Values.ingress.tls | indent 4 }}
46 {{- end -}}
47{{- end -}}