-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathingress.yaml
31 lines (31 loc) · 931 Bytes
/
ingress.yaml
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
{{ if and (index .Values.services .Values.ingress.target_service "enabled") (eq .Values.ingress.type "standard") }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
{{- with .Values.ingress.annotations }}
annotations:
{{- . | toYaml | nindent 4 }}
{{- end }}
labels:
{{- include "chart.labels" . | nindent 4 }}
app.kubernetes.io/component: webapp
app.service: {{ .Values.resourcePrefix }}webapp
name: {{ .Values.resourcePrefix }}webapp
spec:
{{- with (pick .Values.ingress "ingressClassName" "tls") }}
{{- . | toYaml | nindent 2 }}
{{- end }}
rules:
- host: {{ index .Values.services "php-base" "environment" "APP_HOST" }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ .Values.resourcePrefix }}{{ .Values.ingress.target_service }}
port:
number: 80
status:
loadBalancer: {}
{{- end }}