Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/.helm/templates/20-ingress-tuf-router.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@ spec:
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:
Expand All @@ -34,7 +42,11 @@ spec:
name: tuf-router
port:
name: http
{{- if eq .Values.global.env "production" }}
- host: ru.{{ $host }}
{{- else }}
- host: ru-{{ $host }}
{{- end }}
http:
paths:
- path: /targets
Expand Down
22 changes: 20 additions & 2 deletions docs/.helm/templates/20-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ spec:
{{- if eq .Values.global.env "production" }}
- www.{{ $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:
Expand Down Expand Up @@ -51,10 +55,22 @@ spec:
ingressClassName: {{ $ingressClassName }}
tls:
- hosts:
{{- 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:
{{- if eq .Values.global.env "production" }}
- host: ru.{{ $host }}
{{- else }}
- host: ru-{{ $host }}
{{- end }}
http:
paths:
- path: /
Expand All @@ -64,6 +80,7 @@ spec:
name: {{ .Chart.Name }}
port:
number: 80
{{- if eq .Values.global.env "production" }}
---
apiVersion: cert-manager.io/v1
kind: Certificate
Expand All @@ -83,6 +100,7 @@ spec:
- {{ $host }}
- www.{{ $host }}
- ru.{{ $host }}
{{- end }}
---
{{- if ne .Values.global.env "production" }}
apiVersion: deckhouse.io/v1alpha1
Expand All @@ -92,7 +110,7 @@ metadata:
spec:
applicationDomain: {{ $host }}
sendAuthorizationHeader: false
applicationIngressCertificateSecretName: tls-{{ $host }}
applicationIngressCertificateSecretName: {{ pluck .Values.global.env .Values.ingressSecretName | first | default .Values.ingressSecretName._default }}
applicationIngressClassName: "nginx"
keepUsersLoggedInFor: "720h"
---
Expand All @@ -103,7 +121,7 @@ metadata:
spec:
applicationDomain: ru.{{ $host }}
sendAuthorizationHeader: false
applicationIngressCertificateSecretName: tls-{{ $host }}
applicationIngressCertificateSecretName: {{ pluck .Values.global.env .Values.ingressSecretName | first | default .Values.ingressSecretName._default }}
applicationIngressClassName: "nginx"
keepUsersLoggedInFor: "720h"
{{- end }}
5 changes: 4 additions & 1 deletion docs/.helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ priorityClassName:

host:
production: trdl.dev
_default: trdl.test.flant.com
_default: trdl.test.flant.dev

ingressClassName:
_default: "nginx"
production: "standalone-geo"

ingressSecretName:
_default: "wildcard-test-flant-dev"

resources:
requests:
memory:
Expand Down
2 changes: 1 addition & 1 deletion docs/.werf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ http {
server {
charset utf-8;
listen 80;
server_name ~^ru\..+$;
server_name ~^ru[\.\-].+$;
expires 1h;

root /app/ru;
Expand Down
Loading