forked from taskcluster/taskcluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathingress.yaml
32 lines (32 loc) · 1.45 KB
/
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
32
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: taskcluster-ingress
labels: {$eval: labels}
annotations:
'kubernetes.io/ingress.global-static-ip-name': '{{ .Values.ingressStaticIpName }}'
'ingress.gcp.kubernetes.io/pre-shared-cert': '{{ .Values.ingressCertName }}'
'cert-manager.io/cluster-issuer': '{{ .Values.certManagerClusterIssuerName | default "" }}'
'cert-manager.io/acme-challenge-type': '{{ if .Values.certManagerClusterIssuerName }}http01{{ end }}'
'cert-manager.io/acme-http01-edit-in-place': '{{ if .Values.certManagerClusterIssuerName }}true{{ end }}'
'kubernetes.io/tls-acme': '{{ if .Values.certManagerClusterIssuerName }}true{{ end }}'
'kubernetes.io/ingress.class': '{{ if eq .Values.ingressType "nginx" }}nginx{{ end }}'
'ingress.kubernetes.io/force-ssl-redirect': '{{ if .Values.certManagerClusterIssuerName }}true{{ end }}'
spec:
tls:
- secretName: '{{ .Values.ingressTlsSecretName | default "" }}'
hosts:
- '{{ substr 8 -1 (trimSuffix "/" .Values.rootUrl) }}'
rules:
- host: '{{ substr 8 -1 (trimSuffix "/" .Values.rootUrl) }}' # Turn url into a hostname
http:
paths:
$map: {$eval: ingresses}
each(i):
path: '{{ if eq .Values.ingressType "nginx" }}{{ trimSuffix "*" "${i.path}" }}{{ else }}${i.path}{{ end }}'
pathType: Prefix
backend:
service:
name: ${i.projectName}
port:
number: 80