Merge branch 'master' of ssh://158-160-253-227.nip.io:2222/infra/iac
This commit is contained in:
commit
a3cd95fbe6
@ -16,6 +16,14 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: frontend
|
app: frontend
|
||||||
spec:
|
spec:
|
||||||
|
volumes:
|
||||||
|
- name: nginx-configmap
|
||||||
|
configMap:
|
||||||
|
name: nginx-configmap
|
||||||
|
items:
|
||||||
|
- key: nginx.conf
|
||||||
|
path: nginx.conf
|
||||||
|
defaultMode: 420
|
||||||
containers:
|
containers:
|
||||||
- name: frontend
|
- name: frontend
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/sarex-frontend-dev:contour_0b579274
|
image: cr.yandex/crp3ccidau046kdj8g9q/sarex-frontend-dev:contour_0b579274
|
||||||
@ -28,5 +36,9 @@ spec:
|
|||||||
requests:
|
requests:
|
||||||
cpu: 100m
|
cpu: 100m
|
||||||
memory: 100Mi
|
memory: 100Mi
|
||||||
|
volumeMounts:
|
||||||
|
- name: nginx-configmap
|
||||||
|
mountPath: /etc/nginx/nginx.conf
|
||||||
|
subPath: nginx.conf
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
- name: regcred
|
- name: regcred
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: frontend-service
|
name: frontend-svc
|
||||||
namespace: django
|
namespace: django
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
|
|||||||
@ -11,3 +11,6 @@ resources:
|
|||||||
- backend-service.yaml
|
- backend-service.yaml
|
||||||
- frontend-service.yaml
|
- frontend-service.yaml
|
||||||
- django-configmap.yaml
|
- django-configmap.yaml
|
||||||
|
- srx-admin-deployment.yaml
|
||||||
|
- srx-admin-service.yaml
|
||||||
|
- nginx-configmap.yaml
|
||||||
|
|||||||
107
apps/django/base/nginx-configmap.yaml
Normal file
107
apps/django/base/nginx-configmap.yaml
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: nginx-configmap
|
||||||
|
namespace: django
|
||||||
|
data:
|
||||||
|
nginx.conf: |
|
||||||
|
worker_processes auto;
|
||||||
|
|
||||||
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
|
events {
|
||||||
|
use epoll;
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
|
||||||
|
# Basic Settings
|
||||||
|
large_client_header_buffers 8 128k;
|
||||||
|
sendfile on;
|
||||||
|
tcp_nopush on;
|
||||||
|
tcp_nodelay on;
|
||||||
|
keepalive_timeout 300;
|
||||||
|
types_hash_max_size 2048;
|
||||||
|
client_max_body_size 5000M;
|
||||||
|
client_header_buffer_size 5M;
|
||||||
|
# server_tokens off;
|
||||||
|
# server_names_hash_bucket_size 64;
|
||||||
|
# server_name_in_redirect off;
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
# Logging Settings
|
||||||
|
access_log /var/log/nginx/access.log;
|
||||||
|
error_log /var/log/nginx/error.log;
|
||||||
|
|
||||||
|
# GZIP Settings
|
||||||
|
gzip on;
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_proxied any;
|
||||||
|
gzip_comp_level 6;
|
||||||
|
gzip_buffers 16 8k;
|
||||||
|
gzip_http_version 1.1;
|
||||||
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||||
|
|
||||||
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
root /opt/react_client/;
|
||||||
|
|
||||||
|
add_header 'Access-Control-Allow-Origin' '*' always;
|
||||||
|
add_header 'Access-Control-Allow-Methods' '*' always;
|
||||||
|
add_header 'Access-Control-Allow-Headers' '*' always;
|
||||||
|
|
||||||
|
location = /static/index.bundle.js {
|
||||||
|
add_header Cache-Control 'no-store no-cache, must-revalidate, proxy-revalidate, max-age=0';
|
||||||
|
if_modified_since off;
|
||||||
|
expires off;
|
||||||
|
}
|
||||||
|
location ~^/api/pm/ {
|
||||||
|
#rewrite /api/(.+) /$1 break;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_pass http://backend-svc.pm.svc.cluster.local:8000;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~^/api/v1/documents/ {
|
||||||
|
#rewrite /api/(.+) /$1 break;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_pass http://backend-filestream-svc.documentations.svc.cluster.local:80;
|
||||||
|
}
|
||||||
|
|
||||||
|
# location ~^/(api|admin)/ {
|
||||||
|
# proxy_set_header Host $host;
|
||||||
|
# proxy_pass http://backend-svc.django.svc.cluster.local:80;
|
||||||
|
# }
|
||||||
|
|
||||||
|
location ~^/workspaces-v2/(.+).js {
|
||||||
|
rewrite /workspaces-v2/(.+) /$1 break;
|
||||||
|
proxy_pass http://frontend-svc.workspaces.svc.cluster.local:80;
|
||||||
|
}
|
||||||
|
|
||||||
|
location @index {
|
||||||
|
add_header Cache-Control 'no-cache, must-revalidate, proxy-revalidate, max-age=0';
|
||||||
|
if_modified_since off;
|
||||||
|
expires off;
|
||||||
|
try_files /static/index.html =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~^/workflows/(.+).js {
|
||||||
|
rewrite /workflows/(.+) /$1 break;
|
||||||
|
proxy_pass http://frontend-svc.processing.svc.cluster.local:80;
|
||||||
|
}
|
||||||
|
location /service-worker.js {
|
||||||
|
try_files /static/$uri @index;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri @index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
32
apps/django/base/srx-admin-deployment.yaml
Normal file
32
apps/django/base/srx-admin-deployment.yaml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: srx-admin-frontend
|
||||||
|
namespace: django
|
||||||
|
labels:
|
||||||
|
app: srx-admin-frontend
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: srx-admin-frontend
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: srx-admin-frontend
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: srx-admin-frontend
|
||||||
|
image: cr.yandex/crp3ccidau046kdj8g9q/srx-admin:prod_3b9cb250
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 100Mi
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: regcred
|
||||||
15
apps/django/base/srx-admin-service.yaml
Normal file
15
apps/django/base/srx-admin-service.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: srx-admin-svc
|
||||||
|
namespace: django
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app: srx-admin
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: 80
|
||||||
|
protocol: TCP
|
||||||
@ -2,7 +2,7 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: backend-service
|
name: backend-svc
|
||||||
namespace: pm
|
namespace: pm
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: frontend-service
|
name: frontend-svc
|
||||||
namespace: processing
|
namespace: processing
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: frontend-service
|
name: frontend-svc
|
||||||
namespace: workspaces
|
namespace: workspaces
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
|
|||||||
@ -168,7 +168,7 @@ spec:
|
|||||||
tls:
|
tls:
|
||||||
credentialName: camunda-optimize-tls
|
credentialName: camunda-optimize-tls
|
||||||
virtualServices:
|
virtualServices:
|
||||||
platform:
|
platform-frontend:
|
||||||
name: sarex-frontend-virt-service
|
name: sarex-frontend-virt-service
|
||||||
namespace: gateway
|
namespace: gateway
|
||||||
hosts:
|
hosts:
|
||||||
@ -178,7 +178,19 @@ spec:
|
|||||||
routes:
|
routes:
|
||||||
- path:
|
- path:
|
||||||
prefix: /
|
prefix: /
|
||||||
service: frontend-service.django.svc.cluster.local
|
service: frontend-svc.django.svc.cluster.local
|
||||||
|
port: 80
|
||||||
|
platform-api:
|
||||||
|
name: sarex-backend-virt-service
|
||||||
|
namespace: gateway
|
||||||
|
hosts:
|
||||||
|
- sarex.contour.infra.sarex.tech
|
||||||
|
gateways:
|
||||||
|
- gateway/platform-gateway
|
||||||
|
routes:
|
||||||
|
- path:
|
||||||
|
prefix: /api/
|
||||||
|
service: backend-svc.django.svc.cluster.local
|
||||||
port: 80
|
port: 80
|
||||||
vault:
|
vault:
|
||||||
name: vault-virt-service
|
name: vault-virt-service
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user