-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathwebapp-ingress.yaml
More file actions
52 lines (52 loc) · 1.53 KB
/
webapp-ingress.yaml
File metadata and controls
52 lines (52 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{{- if .Values.webapp.ingress.enabled -}}
{{- $fullName := include "trigger-v4.fullname" . -}}
{{- $svcPort := .Values.webapp.service.port -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}-webapp
labels:
{{- $component := "webapp" }}
{{- include "trigger-v4.componentLabels" (dict "Chart" .Chart "Release" .Release "Values" .Values "component" $component) | nindent 4 }}
annotations:
{{- include "trigger-v4.webapp.ingress.annotations" . | nindent 4 }}
spec:
{{- if .Values.webapp.ingress.className }}
ingressClassName: {{ .Values.webapp.ingress.className }}
{{- end }}
{{- if .Values.webapp.ingress.tls }}
tls:
{{- range .Values.webapp.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.webapp.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- if .paths }}
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType | default "Prefix" }}
backend:
service:
name: {{ $fullName }}-webapp
port:
number: {{ $svcPort }}
{{- end }}
{{- else }}
- path: /
pathType: Prefix
backend:
service:
name: {{ $fullName }}-webapp
port:
number: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}