Skip to content

Commit 42a5584

Browse files
GuzlikGuzlik
authored andcommitted
final squash
1 parent ccc3f85 commit 42a5584

File tree

4 files changed

+37
-4
lines changed

4 files changed

+37
-4
lines changed

docs/.helm/templates/20-ingress-tuf-router.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,16 @@ spec:
1414
tls:
1515
- hosts:
1616
- {{ $host }}
17+
{{- if eq .Values.global.env "production" }}
1718
- ru.{{ $host }}
19+
{{- else }}
20+
- ru-{{ $host }}
21+
{{- end }}
22+
{{- if eq .Values.global.env "production" }}
1823
secretName: tls-{{ $host }}
24+
{{- else }}
25+
secretName: {{ pluck .Values.global.env .Values.ingressSecretName | first | default .Values.ingressSecretName._default }}
26+
{{- end }}
1927
rules:
2028
- host: {{ $host }}
2129
http:
@@ -34,7 +42,11 @@ spec:
3442
name: tuf-router
3543
port:
3644
name: http
45+
{{- if eq .Values.global.env "production" }}
3746
- host: ru.{{ $host }}
47+
{{- else }}
48+
- host: ru-{{ $host }}
49+
{{- end }}
3850
http:
3951
paths:
4052
- path: /targets

docs/.helm/templates/20-ingress.yaml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ spec:
2121
{{- if eq .Values.global.env "production" }}
2222
- www.{{ $host }}
2323
{{- end }}
24+
{{- if eq .Values.global.env "production" }}
2425
secretName: tls-{{ $host }}
26+
{{- else }}
27+
secretName: {{ pluck .Values.global.env .Values.ingressSecretName | first | default .Values.ingressSecretName._default }}
28+
{{- end }}
2529
rules:
2630
- host: {{ $host }}
2731
http:
@@ -51,10 +55,22 @@ spec:
5155
ingressClassName: {{ $ingressClassName }}
5256
tls:
5357
- hosts:
58+
{{- if eq .Values.global.env "production" }}
5459
- ru.{{ $host }}
60+
{{- else }}
61+
- ru-{{ $host }}
62+
{{- end }}
63+
{{- if eq .Values.global.env "production" }}
5564
secretName: tls-{{ $host }}
65+
{{- else }}
66+
secretName: {{ pluck .Values.global.env .Values.ingressSecretName | first | default .Values.ingressSecretName._default }}
67+
{{- end }}
5668
rules:
69+
{{- if eq .Values.global.env "production" }}
5770
- host: ru.{{ $host }}
71+
{{- else }}
72+
- host: ru-{{ $host }}
73+
{{- end }}
5874
http:
5975
paths:
6076
- path: /
@@ -64,6 +80,7 @@ spec:
6480
name: {{ .Chart.Name }}
6581
port:
6682
number: 80
83+
{{- if eq .Values.global.env "production" }}
6784
---
6885
apiVersion: cert-manager.io/v1
6986
kind: Certificate
@@ -83,6 +100,7 @@ spec:
83100
- {{ $host }}
84101
- www.{{ $host }}
85102
- ru.{{ $host }}
103+
{{- end }}
86104
---
87105
{{- if ne .Values.global.env "production" }}
88106
apiVersion: deckhouse.io/v1alpha1
@@ -92,7 +110,7 @@ metadata:
92110
spec:
93111
applicationDomain: {{ $host }}
94112
sendAuthorizationHeader: false
95-
applicationIngressCertificateSecretName: tls-{{ $host }}
113+
applicationIngressCertificateSecretName: {{ pluck .Values.global.env .Values.ingressSecretName | first | default .Values.ingressSecretName._default }}
96114
applicationIngressClassName: "nginx"
97115
keepUsersLoggedInFor: "720h"
98116
---
@@ -103,7 +121,7 @@ metadata:
103121
spec:
104122
applicationDomain: ru.{{ $host }}
105123
sendAuthorizationHeader: false
106-
applicationIngressCertificateSecretName: tls-{{ $host }}
124+
applicationIngressCertificateSecretName: {{ pluck .Values.global.env .Values.ingressSecretName | first | default .Values.ingressSecretName._default }}
107125
applicationIngressClassName: "nginx"
108126
keepUsersLoggedInFor: "720h"
109127
{{- end }}

docs/.helm/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ priorityClassName:
44

55
host:
66
production: trdl.dev
7-
_default: trdl.test.flant.com
7+
_default: trdl.test.flant.dev
88

99
ingressClassName:
1010
_default: "nginx"
1111
production: "standalone-geo"
1212

13+
ingressSecretName:
14+
_default: "wildcard-test-flant-dev"
15+
1316
resources:
1417
requests:
1518
memory:

docs/.werf/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ http {
7575
server {
7676
charset utf-8;
7777
listen 80;
78-
server_name ~^ru\..+$;
78+
server_name ~^ru[\.\-].+$;
7979
expires 1h;
8080

8181
root /app/ru;

0 commit comments

Comments
 (0)