blob: 73ad2ff362e1447d325b1c1966c6ec700696f873 [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 -}}
Krzysztof Opasiak03b10092020-01-24 22:45:16 +010017{{- $serviceName := include "common.fullname" . -}}
Marc-Alexandre Choquette81a2df62018-07-14 13:04:33 -040018{{- $servicePort := .Values.service.externalPort -}}
19apiVersion: extensions/v1beta1
20kind: Ingress
21metadata:
Krzysztof Opasiak03b10092020-01-24 22:45:16 +010022 name: {{ $serviceName }}
Marc-Alexandre Choquette81a2df62018-07-14 13:04:33 -040023 labels:
Krzysztof Opasiak03b10092020-01-24 22:45:16 +010024 app: {{ include "common.name" . }}
Marc-Alexandre Choquette81a2df62018-07-14 13:04:33 -040025 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 -}}