-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path20-ingress-tuf-router.yaml
More file actions
65 lines (64 loc) · 1.72 KB
/
20-ingress-tuf-router.yaml
File metadata and controls
65 lines (64 loc) · 1.72 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
53
54
55
56
57
58
59
60
61
62
63
64
65
{{- $host := pluck .Values.werf.env .Values.host | first | default .Values.host._default }}
{{- if hasPrefix "review" .Values.werf.env }}
{{- $host = ( printf "%s.%s" .Values.werf.env (pluck "dev" .Values.host | first | default .Values.host._default ) | lower ) }}
{{- end }}
{{- $ingressClassName := pluck .Values.global.env .Values.ingressClassName | first | default .Values.ingressClassName._default | quote }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: tuf-router
annotations:
spec:
ingressClassName: {{ $ingressClassName }}
tls:
- hosts:
- {{ $host }}
{{- if eq .Values.global.env "production" }}
- ru.{{ $host }}
{{- else }}
- ru-{{ $host }}
{{- end }}
{{- if eq .Values.global.env "production" }}
secretName: tls-{{ $host }}
{{- else }}
secretName: {{ pluck .Values.global.env .Values.ingressSecretName | first | default .Values.ingressSecretName._default }}
{{- end }}
rules:
- host: {{ $host }}
http:
paths:
- path: /targets
pathType: Prefix
backend:
service:
name: tuf-router
port:
name: http
- path: /download
pathType: Prefix
backend:
service:
name: tuf-router
port:
name: http
{{- if eq .Values.global.env "production" }}
- host: ru.{{ $host }}
{{- else }}
- host: ru-{{ $host }}
{{- end }}
http:
paths:
- path: /targets
pathType: Prefix
backend:
service:
name: tuf-router
port:
name: http
- path: /download
pathType: Prefix
backend:
service:
name: tuf-router
port:
name: http