Merge branch 'master' of ssh://158-160-253-227.nip.io:2222/infra/iac
This commit is contained in:
commit
e924d58d89
@ -89,6 +89,13 @@ spec:
|
||||
- key: production.py
|
||||
path: production.py
|
||||
defaultMode: 420
|
||||
- name: uwsgi-configmap
|
||||
configMap:
|
||||
name: uwsgi-configmap
|
||||
items:
|
||||
- key: uwsgi.ini
|
||||
path: uwsgi.ini
|
||||
defaultMode: 420
|
||||
containers:
|
||||
- name: backend
|
||||
image: cr.yandex/crp3ccidau046kdj8g9q/backend:production_a96dead0
|
||||
@ -202,5 +209,8 @@ spec:
|
||||
- name: django-configmap
|
||||
mountPath: /opt/sarex/config/settings/production.py
|
||||
subPath: production.py
|
||||
- name: uwsgi-configmap
|
||||
mountPath: /opt/sarex/uwsgi.ini
|
||||
subPath: uwsgi.ini
|
||||
imagePullSecrets:
|
||||
- name: regcred
|
||||
|
||||
@ -199,7 +199,7 @@ data:
|
||||
'PAGE_SIZE': 1000, 'DEFAULT_FILTER_BACKENDS': [
|
||||
'django_filters.rest_framework.DjangoFilterBackend' ],
|
||||
'DEFAULT_AUTHENTICATION_CLASSES': [
|
||||
'sarex.authentication.backends.ZitadelJWTAuthentication',
|
||||
# 'sarex.authentication.backends.ZitadelJWTAuthentication',
|
||||
'rest_framework.authentication.RemoteUserAuthentication',
|
||||
'rest_framework_simplejwt.authentication.JWTAuthentication',
|
||||
'rest_framework.authentication.BasicAuthentication',
|
||||
|
||||
@ -14,3 +14,4 @@ resources:
|
||||
- srx-admin-deployment.yaml
|
||||
- srx-admin-service.yaml
|
||||
- nginx-configmap.yaml
|
||||
- uwsgi-configmap.yaml
|
||||
|
||||
30
apps/django/base/uwsgi-configmap.yaml
Normal file
30
apps/django/base/uwsgi-configmap.yaml
Normal file
@ -0,0 +1,30 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: uwsgi-configmap
|
||||
namespace: django
|
||||
data:
|
||||
uwsgi.ini: |
|
||||
[uwsgi]
|
||||
module = config.wsgi:application
|
||||
DJANGO_SETTINGS_MODULE = config.settings.production
|
||||
http = 0.0.0.0:8000
|
||||
processes = 16
|
||||
master = true
|
||||
vacuum = true
|
||||
enable-threads = true
|
||||
buffer-size = 65535
|
||||
stats = :3031
|
||||
stats-http = true
|
||||
memory-report = true
|
||||
lazy-apps = true
|
||||
listen = 128
|
||||
disable-write-exception= 0
|
||||
harakiri = 300
|
||||
socket-timeout = 300
|
||||
chunked-input-timeout = 300
|
||||
http-timeout = 300
|
||||
worker-reload-mercy = 240
|
||||
mule-reload-mercy = 240
|
||||
static-map = /static=/opt/sarex/sarex/static/
|
||||
static-map = /media=/media/
|
||||
@ -2,7 +2,7 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontend-service
|
||||
name: frontend-svc
|
||||
namespace: documentations
|
||||
spec:
|
||||
type: ClusterIP
|
||||
|
||||
@ -143,7 +143,7 @@ spec:
|
||||
- name: REMARKS_URL
|
||||
value: http://remarks-static-service.remarks.svc.cluster.local:8080/remarks
|
||||
- name: RESOURCES_URL
|
||||
value: http://resources-service.resources.svc.cluster.local:8000
|
||||
value: http://backend-svc.resources.svc.cluster.local:80
|
||||
- name: S3_SERVICE_ACCOUNT
|
||||
value: /vault/secrets/documentations-s3-account-json
|
||||
- name: STATES_URL
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: frontend-service
|
||||
name: frontend-svc
|
||||
namespace: issues
|
||||
spec:
|
||||
type: ClusterIP
|
||||
|
||||
@ -48,6 +48,13 @@ spec:
|
||||
- key: production.py
|
||||
path: production.py
|
||||
defaultMode: 420
|
||||
- name: uwsgi-configmap
|
||||
configMap:
|
||||
name: uwsgi-configmap
|
||||
items:
|
||||
- key: uwsgi.ini
|
||||
path: uwsgi.ini
|
||||
defaultMode: 420
|
||||
|
||||
containers:
|
||||
- name: backend
|
||||
@ -83,6 +90,9 @@ spec:
|
||||
- name: django-configmap
|
||||
mountPath: /server/config/settings/production.py
|
||||
subPath: production.py
|
||||
- name: uwsgi-configmap
|
||||
mountPath: opt/server/uwsgi.ini
|
||||
subPath: uwsgi.ini
|
||||
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: backend-service
|
||||
name: backend-svc
|
||||
namespace: resources
|
||||
spec:
|
||||
type: ClusterIP
|
||||
@ -10,6 +10,6 @@ spec:
|
||||
app: backend
|
||||
ports:
|
||||
- name: http
|
||||
port: 8000
|
||||
port: 80
|
||||
targetPort: 8000
|
||||
protocol: TCP
|
||||
|
||||
@ -8,3 +8,4 @@ resources:
|
||||
- backend-deployment.yaml
|
||||
- backend-service.yaml
|
||||
- django-configmap.yaml
|
||||
- uwsgi-configmap.yaml
|
||||
|
||||
21
apps/resources/base/uwsgi-configmap.yaml
Normal file
21
apps/resources/base/uwsgi-configmap.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: uwsgi-configmap
|
||||
namespace: resources
|
||||
data:
|
||||
uwsgi.ini: |
|
||||
[uwsgi]
|
||||
chdir = /server
|
||||
module = config.wsgi:application
|
||||
master = true
|
||||
master-fifo = /opt/server/uwsgi-backend-server.fifo
|
||||
processes = 4
|
||||
http = 0.0.0.0:8000
|
||||
chmod-socket = 666
|
||||
vacuum = true
|
||||
harakiri = 6000
|
||||
buffer-size = 32768
|
||||
|
||||
static-map = /static=/opt/server/static/
|
||||
static-map = /media=/opt/server/media/
|
||||
@ -190,6 +190,44 @@ spec:
|
||||
prefix: /
|
||||
service: frontend-svc.django.svc.cluster.local
|
||||
port: 80
|
||||
gateway-platform:
|
||||
name: pdm-virt-service
|
||||
namespace: gateway
|
||||
hosts:
|
||||
- sarex.contour.infra.sarex.tech
|
||||
gateways:
|
||||
- gateway/platform-gateway
|
||||
routes:
|
||||
- path:
|
||||
prefix: /gateway/
|
||||
service: pdm-svc.documentations.svc.cluster.local
|
||||
port: 80
|
||||
documentations-frontend:
|
||||
name: documentations-frontend-virt-service
|
||||
namespace: gateway
|
||||
hosts:
|
||||
- sarex.contour.infra.sarex.tech
|
||||
gateways:
|
||||
- gateway/platform-gateway
|
||||
routes:
|
||||
- path:
|
||||
prefix: /documentations/static/
|
||||
rewrite: /
|
||||
service: frontend-svc.documentations.svc.cluster.local
|
||||
port: 80
|
||||
issues-frontend:
|
||||
name: issues-frontend-virt-service
|
||||
namespace: gateway
|
||||
hosts:
|
||||
- sarex.contour.infra.sarex.tech
|
||||
gateways:
|
||||
- gateway/platform-gateway
|
||||
routes:
|
||||
- path:
|
||||
prefix: /issues/static/
|
||||
rewrite: /
|
||||
service: frontend-svc.issues.svc.cluster.local
|
||||
port: 80
|
||||
vault:
|
||||
name: vault-virt-service
|
||||
namespace: gateway
|
||||
|
||||
Loading…
Reference in New Issue
Block a user