Marc-Alexandre Choquette | 81a2df6 | 2018-07-14 13:04:33 -0400 | [diff] [blame] | 1 | {{/* |
| 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 Opasiak | 03b1009 | 2020-01-24 22:45:16 +0100 | [diff] [blame] | 17 | {{- $serviceName := include "common.fullname" . -}} |
Marc-Alexandre Choquette | 81a2df6 | 2018-07-14 13:04:33 -0400 | [diff] [blame] | 18 | {{- $servicePort := .Values.service.externalPort -}} |
Grzegorz-Lis | 9fd041e | 2020-07-10 13:12:21 +0200 | [diff] [blame] | 19 | apiVersion: networking.k8s.io/v1beta1 |
Marc-Alexandre Choquette | 81a2df6 | 2018-07-14 13:04:33 -0400 | [diff] [blame] | 20 | kind: Ingress |
| 21 | metadata: |
Krzysztof Opasiak | 03b1009 | 2020-01-24 22:45:16 +0100 | [diff] [blame] | 22 | name: {{ $serviceName }} |
Marc-Alexandre Choquette | 81a2df6 | 2018-07-14 13:04:33 -0400 | [diff] [blame] | 23 | labels: |
Krzysztof Opasiak | 03b1009 | 2020-01-24 22:45:16 +0100 | [diff] [blame] | 24 | app: {{ include "common.name" . }} |
Marc-Alexandre Choquette | 81a2df6 | 2018-07-14 13:04:33 -0400 | [diff] [blame] | 25 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 26 | release: {{ include "common.release" . }} |
Marc-Alexandre Choquette | 81a2df6 | 2018-07-14 13:04:33 -0400 | [diff] [blame] | 27 | heritage: {{ .Release.Service }} |
| 28 | annotations: |
| 29 | {{- range $key, $value := .Values.ingress.annotations }} |
| 30 | {{ $key }}: {{ $value | quote }} |
| 31 | {{- end }} |
| 32 | spec: |
| 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 -}} |