Merge branch 'master' of gitlab.sarex.io:infra/iac into aero
# Conflicts: # .gitignore
This commit is contained in:
commit
9a39f4568e
7
.gitignore
vendored
7
.gitignore
vendored
@ -4,10 +4,5 @@ CLAUDE.md
|
|||||||
.env
|
.env
|
||||||
|
|
||||||
tmp
|
tmp
|
||||||
|
.tmp/
|
||||||
snapshots/*
|
snapshots/*
|
||||||
k3s/*
|
|
||||||
k3s-master/*
|
|
||||||
|
|
||||||
# самоподписанные TLS-сертификаты
|
|
||||||
nginx/certs/*.crt
|
|
||||||
nginx/certs/*.key
|
|
||||||
@ -1,80 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: checklists-backend
|
|
||||||
namespace: checklists
|
|
||||||
labels:
|
|
||||||
app: checklists-backend
|
|
||||||
service: api
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: checklists-backend
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: checklists-backend
|
|
||||||
service: checklists-backend
|
|
||||||
annotations:
|
|
||||||
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
|
||||||
vault.hashicorp.com/agent-init-first: "true"
|
|
||||||
vault.hashicorp.com/agent-inject: "true"
|
|
||||||
vault.hashicorp.com/agent-pre-populate-only: "true"
|
|
||||||
vault.hashicorp.com/auth-path: auth/kubernetes
|
|
||||||
vault.hashicorp.com/role: checklists
|
|
||||||
vault.hashicorp.com/agent-inject-secret-checklists-db: secrets/data/postgresql/apps/checklists
|
|
||||||
vault.hashicorp.com/agent-inject-template-checklists-db: |-
|
|
||||||
{{- with secret "secrets/data/postgresql/apps/checklists" -}}
|
|
||||||
DATABASE_HOST=postgresql.checklists.svc.cluster.local
|
|
||||||
DATABASE_PORT=5432
|
|
||||||
DATABASE_NAME=checklists_db
|
|
||||||
DATABASE_USER={{ index .Data.data "username" }}
|
|
||||||
DATABASE_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-checklists-jwt-public: secrets/data/vault/common/rsa_keys
|
|
||||||
vault.hashicorp.com/agent-inject-template-checklists-jwt-public: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
|
||||||
{{ index .Data.data "public_key" }}
|
|
||||||
{{- end -}}
|
|
||||||
spec:
|
|
||||||
serviceAccountName: checklists-vault
|
|
||||||
containers:
|
|
||||||
- name: api
|
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/checklists-backend:production_68f242cd
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
command: ["/bin/bash", "-ec"]
|
|
||||||
args:
|
|
||||||
- |
|
|
||||||
set -a
|
|
||||||
[ -f /vault/secrets/checklists-db ] && . /vault/secrets/checklists-db
|
|
||||||
[ -f /vault/secrets/checklists-jwt-public ] && export JWT_AUTH_PUBLIC_KEY="$(cat /vault/secrets/checklists-jwt-public)"
|
|
||||||
set +a
|
|
||||||
exec ./entrypoint.sh
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 8000
|
|
||||||
protocol: TCP
|
|
||||||
env:
|
|
||||||
- name: HTTP_APP_HOST
|
|
||||||
value: 0.0.0.0
|
|
||||||
- name: HTTP_APP_PORT
|
|
||||||
value: "8000"
|
|
||||||
- name: HTTP_APP_ROOT_PATH
|
|
||||||
value: /checklists
|
|
||||||
- name: HTTP_APP_WORKERS
|
|
||||||
value: "1"
|
|
||||||
- name: HTTP_APP_ADMIN_ENABLE
|
|
||||||
value: "true"
|
|
||||||
- name: JWT_AUTH_ENABLE
|
|
||||||
value: "true"
|
|
||||||
- name: DEBUG
|
|
||||||
value: "false"
|
|
||||||
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: "25m"
|
|
||||||
memory: 128Mi
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: regcred
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: rfi-backend-api-svc
|
|
||||||
namespace: checklists
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: checklists-backend
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 80
|
|
||||||
targetPort: 8000
|
|
||||||
protocol: TCP
|
|
||||||
124
apps/checklists/base/helmrelease.yaml
Normal file
124
apps/checklists/base/helmrelease.yaml
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: checklists
|
||||||
|
namespace: checklists
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: "0.1.9"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
checklists:
|
||||||
|
enabled: true
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: checklists-vault
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: checklists-backend
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
command:
|
||||||
|
_default: ["/bin/bash", "-ec"]
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/checklists-db ] && . /vault/secrets/checklists-db
|
||||||
|
[ -f /vault/secrets/checklists-jwt-public ] && export JWT_AUTH_PUBLIC_KEY="$(cat /vault/secrets/checklists-jwt-public)"
|
||||||
|
set +a
|
||||||
|
exec ./entrypoint.sh
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/checklists-backend:production_68f242cd
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: rfi-backend-api-svc
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
|
targetPort:
|
||||||
|
_default: 8000
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
envs:
|
||||||
|
- name: HTTP_APP_HOST
|
||||||
|
value:
|
||||||
|
_default: "0.0.0.0"
|
||||||
|
- name: HTTP_APP_PORT
|
||||||
|
value:
|
||||||
|
_default: "8000"
|
||||||
|
- name: HTTP_APP_ROOT_PATH
|
||||||
|
value:
|
||||||
|
_default: /checklists
|
||||||
|
- name: HTTP_APP_WORKERS
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: HTTP_APP_ADMIN_ENABLE
|
||||||
|
value:
|
||||||
|
_default: "true"
|
||||||
|
- name: JWT_AUTH_ENABLE
|
||||||
|
value:
|
||||||
|
_default: "true"
|
||||||
|
- name: DEBUG
|
||||||
|
value:
|
||||||
|
_default: "false"
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
||||||
|
vault.hashicorp.com/agent-init-first: "true"
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: checklists
|
||||||
|
vault.hashicorp.com/agent-inject-secret-checklists-db: secrets/data/apps/checklists/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-checklists-db: |-
|
||||||
|
{{- with secret "secrets/data/apps/checklists/postgres" -}}
|
||||||
|
DATABASE_HOST={{ index .Data.data "host" }}
|
||||||
|
DATABASE_PORT={{ index .Data.data "port" }}
|
||||||
|
DATABASE_NAME={{ index .Data.data "database" }}
|
||||||
|
DATABASE_USER={{ index .Data.data "username" }}
|
||||||
|
DATABASE_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-checklists-jwt-public: secrets/data/vault/common/rsa_keys
|
||||||
|
vault.hashicorp.com/agent-inject-template-checklists-jwt-public: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
{{- end -}}
|
||||||
@ -4,6 +4,4 @@ kind: Kustomization
|
|||||||
namespace: checklists
|
namespace: checklists
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
- serviceaccount.yaml
|
- helmrelease.yaml
|
||||||
- backend-deployment.yaml
|
|
||||||
- backend-service.yaml
|
|
||||||
|
|||||||
@ -5,3 +5,4 @@ metadata:
|
|||||||
name: checklists
|
name: checklists
|
||||||
labels:
|
labels:
|
||||||
istio-injection: enabled
|
istio-injection: enabled
|
||||||
|
security.deckhouse.io/pod-policy: privileged
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: checklists-vault
|
|
||||||
namespace: checklists
|
|
||||||
6
apps/checklists/d8-ugmk-prod/kustomization.yaml
Normal file
6
apps/checklists/d8-ugmk-prod/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: checklists
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
@ -1,89 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: backend
|
|
||||||
namespace: contracts
|
|
||||||
labels:
|
|
||||||
app: backend
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: backend
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: backend
|
|
||||||
annotations:
|
|
||||||
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
|
||||||
vault.hashicorp.com/agent-init-first: "true"
|
|
||||||
vault.hashicorp.com/agent-inject: "true"
|
|
||||||
vault.hashicorp.com/agent-pre-populate-only: "true"
|
|
||||||
vault.hashicorp.com/auth-path: auth/kubernetes
|
|
||||||
vault.hashicorp.com/role: contracts
|
|
||||||
vault.hashicorp.com/agent-inject-secret-contracts-db: secrets/data/postgresql/apps/contracts
|
|
||||||
vault.hashicorp.com/agent-inject-template-contracts-db: |-
|
|
||||||
{{- with secret "secrets/data/postgresql/apps/contracts" -}}
|
|
||||||
DB_URL=postgresql://{{ index .Data.data "username" }}:{{ index .Data.data "password" }}@postgresql.contracts.svc.cluster.local:5432/contracts_db?sslmode=disable
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-contracts-jwt-public: secrets/data/vault/common/rsa_keys
|
|
||||||
vault.hashicorp.com/agent-inject-template-contracts-jwt-public: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
|
||||||
{{ index .Data.data "public_key" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-contracts-rabbitmq: secrets/data/rabbitmq/apps/contracts
|
|
||||||
vault.hashicorp.com/agent-inject-template-contracts-rabbitmq: |-
|
|
||||||
{{- with secret "secrets/data/rabbitmq/apps/contracts" -}}
|
|
||||||
CONTRACTS_RABBITMQ_VHOST={{ index .Data.data "vhost" }}
|
|
||||||
CONTRACTS_RABBITMQ_USERNAME={{ index .Data.data "username" }}
|
|
||||||
CONTRACTS_RABBITMQ_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
CONTRACTS_RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
|
|
||||||
CONTRACTS_RABBITMQ_PORT=5672
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-contracts-s3: secrets/data/minio/apps/contracts
|
|
||||||
vault.hashicorp.com/agent-inject-template-contracts-s3: |-
|
|
||||||
{{- with secret "secrets/data/minio/apps/contracts" -}}
|
|
||||||
CONTRACTS_S3_ENDPOINT={{ index .Data.data.client "endpoint" }}
|
|
||||||
CONTRACTS_S3_REGION={{ index .Data.data.client "region" }}
|
|
||||||
CONTRACTS_S3_BUCKET=contracts
|
|
||||||
CONTRACTS_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
|
||||||
CONTRACTS_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-contracts-kafka: secrets/data/kafka/apps/contracts
|
|
||||||
vault.hashicorp.com/agent-inject-template-contracts-kafka: |-
|
|
||||||
{{- with secret "secrets/data/kafka/apps/contracts" -}}
|
|
||||||
CONTRACTS_KAFKA_BOOTSTRAP_SERVERS={{ index .Data.data.auth "bootstrap_servers" }}
|
|
||||||
CONTRACTS_KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
|
||||||
CONTRACTS_KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
|
||||||
CONTRACTS_KAFKA_USERNAME={{ index .Data.data "username" }}
|
|
||||||
CONTRACTS_KAFKA_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
{{- end -}}
|
|
||||||
spec:
|
|
||||||
serviceAccountName: contracts-vault
|
|
||||||
containers:
|
|
||||||
- name: backend
|
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/contracts:prod_d3bbd9fc
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
command: ["/bin/sh", "-ec"]
|
|
||||||
args:
|
|
||||||
- |
|
|
||||||
set -a
|
|
||||||
[ -f /vault/secrets/contracts-db ] && . /vault/secrets/contracts-db
|
|
||||||
[ -f /vault/secrets/contracts-jwt-public ] && export PUBLIC_KEY="$(cat /vault/secrets/contracts-jwt-public)"
|
|
||||||
[ -f /vault/secrets/contracts-rabbitmq ] && . /vault/secrets/contracts-rabbitmq
|
|
||||||
[ -f /vault/secrets/contracts-s3 ] && . /vault/secrets/contracts-s3
|
|
||||||
[ -f /vault/secrets/contracts-kafka ] && . /vault/secrets/contracts-kafka
|
|
||||||
set +a
|
|
||||||
exec /usr/local/bin/http
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 8000
|
|
||||||
protocol: TCP
|
|
||||||
env:
|
|
||||||
- name: ADDRESS
|
|
||||||
value: ":8000"
|
|
||||||
- name: ENABLE_SSL
|
|
||||||
value: "false"
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: regcred
|
|
||||||
129
apps/contracts/base/helmrelease.yaml
Normal file
129
apps/contracts/base/helmrelease.yaml
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: contracts
|
||||||
|
namespace: contracts
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: "0.1.9"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
contracts:
|
||||||
|
enabled: true
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: contracts-vault
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: backend
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
command:
|
||||||
|
_default: ["/bin/sh", "-ec"]
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/contracts-db ] && . /vault/secrets/contracts-db
|
||||||
|
[ -f /vault/secrets/contracts-jwt-public ] && export PUBLIC_KEY="$(cat /vault/secrets/contracts-jwt-public)"
|
||||||
|
[ -f /vault/secrets/contracts-rabbitmq ] && . /vault/secrets/contracts-rabbitmq
|
||||||
|
[ -f /vault/secrets/contracts-s3 ] && . /vault/secrets/contracts-s3
|
||||||
|
[ -f /vault/secrets/contracts-kafka ] && . /vault/secrets/contracts-kafka
|
||||||
|
set +a
|
||||||
|
exec /usr/local/bin/http
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/contracts:prod_d3bbd9fc
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: backend-service
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
targetPort:
|
||||||
|
_default: 8000
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
envs:
|
||||||
|
- name: ADDRESS
|
||||||
|
value:
|
||||||
|
_default: ":8000"
|
||||||
|
- name: ENABLE_SSL
|
||||||
|
value:
|
||||||
|
_default: "false"
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
||||||
|
vault.hashicorp.com/agent-init-first: "true"
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: contracts
|
||||||
|
vault.hashicorp.com/agent-inject-secret-contracts-db: secrets/data/postgresql/apps/contracts
|
||||||
|
vault.hashicorp.com/agent-inject-template-contracts-db: |-
|
||||||
|
{{- with secret "secrets/data/postgresql/apps/contracts" -}}
|
||||||
|
DB_URL=postgresql://{{ index .Data.data "username" }}:{{ index .Data.data "password" }}@postgresql.contracts.svc.cluster.local:5432/contracts_db?sslmode=disable
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-contracts-jwt-public: secrets/data/vault/common/rsa_keys
|
||||||
|
vault.hashicorp.com/agent-inject-template-contracts-jwt-public: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-contracts-rabbitmq: secrets/data/rabbitmq/apps/contracts
|
||||||
|
vault.hashicorp.com/agent-inject-template-contracts-rabbitmq: |-
|
||||||
|
{{- with secret "secrets/data/rabbitmq/apps/contracts" -}}
|
||||||
|
CONTRACTS_RABBITMQ_VHOST={{ index .Data.data "vhost" }}
|
||||||
|
CONTRACTS_RABBITMQ_USERNAME={{ index .Data.data "username" }}
|
||||||
|
CONTRACTS_RABBITMQ_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
CONTRACTS_RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
|
||||||
|
CONTRACTS_RABBITMQ_PORT=5672
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-contracts-s3: secrets/data/minio/apps/contracts
|
||||||
|
vault.hashicorp.com/agent-inject-template-contracts-s3: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/contracts" -}}
|
||||||
|
CONTRACTS_S3_ENDPOINT={{ index .Data.data.client "endpoint" }}
|
||||||
|
CONTRACTS_S3_REGION={{ index .Data.data.client "region" }}
|
||||||
|
CONTRACTS_S3_BUCKET=contracts
|
||||||
|
CONTRACTS_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||||
|
CONTRACTS_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-contracts-kafka: secrets/data/kafka/apps/contracts
|
||||||
|
vault.hashicorp.com/agent-inject-template-contracts-kafka: |-
|
||||||
|
{{- with secret "secrets/data/kafka/apps/contracts" -}}
|
||||||
|
CONTRACTS_KAFKA_BOOTSTRAP_SERVERS={{ index .Data.data.auth "bootstrap_servers" }}
|
||||||
|
CONTRACTS_KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
||||||
|
CONTRACTS_KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
||||||
|
CONTRACTS_KAFKA_USERNAME={{ index .Data.data "username" }}
|
||||||
|
CONTRACTS_KAFKA_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
@ -4,6 +4,4 @@ kind: Kustomization
|
|||||||
namespace: contracts
|
namespace: contracts
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
- serviceaccount.yaml
|
- helmrelease.yaml
|
||||||
- deployment.yaml
|
|
||||||
- service.yaml
|
|
||||||
|
|||||||
@ -5,3 +5,4 @@ metadata:
|
|||||||
name: contracts
|
name: contracts
|
||||||
labels:
|
labels:
|
||||||
istio-injection: enabled
|
istio-injection: enabled
|
||||||
|
security.deckhouse.io/pod-policy: privileged
|
||||||
|
|||||||
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: backend-service
|
|
||||||
namespace: contracts
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: backend
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 8000
|
|
||||||
targetPort: 8000
|
|
||||||
protocol: TCP
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: contracts-vault
|
|
||||||
namespace: contracts
|
|
||||||
6
apps/contracts/d8-ugmk-prod/kustomization.yaml
Normal file
6
apps/contracts/d8-ugmk-prod/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: contracts
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
@ -35,7 +35,7 @@ spec:
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
name:
|
name:
|
||||||
_default: cr.yandex/crp3ccidau046kdj8g9q/srx-admin:prod_feb59026
|
_default: cr.yandex/crp3ccidau046kdj8g9q/srx-admin:prod_638c3442
|
||||||
pullPolicy:
|
pullPolicy:
|
||||||
_default: IfNotPresent
|
_default: IfNotPresent
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: django
|
namespace: control-interface
|
||||||
resources:
|
resources:
|
||||||
- helmrelease.yaml
|
- helmrelease.yaml
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: django
|
namespace: control-interface
|
||||||
resources:
|
resources:
|
||||||
- ../base
|
- ../base
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
|
|||||||
@ -1,222 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: backend
|
|
||||||
namespace: django
|
|
||||||
labels:
|
|
||||||
app: backend
|
|
||||||
service: backend
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: backend
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: backend
|
|
||||||
service: backend
|
|
||||||
annotations:
|
|
||||||
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
|
||||||
vault.hashicorp.com/agent-init-first: "true"
|
|
||||||
vault.hashicorp.com/agent-inject: "true"
|
|
||||||
vault.hashicorp.com/agent-pre-populate-only: "true"
|
|
||||||
vault.hashicorp.com/auth-path: auth/kubernetes
|
|
||||||
vault.hashicorp.com/role: django
|
|
||||||
vault.hashicorp.com/agent-inject-secret-django-postgresql: secrets/data/postgresql/apps/django
|
|
||||||
vault.hashicorp.com/agent-inject-template-django-postgresql: |-
|
|
||||||
{{- with secret "secrets/data/postgresql/apps/django" -}}
|
|
||||||
DJANGO_POSTGRES_HOST=postgresql.django.svc.cluster.local
|
|
||||||
DJANGO_POSTGRES_PORTS=5432
|
|
||||||
DJANGO_POSTGRES_DATABASE=sarex_db
|
|
||||||
DJANGO_POSTGRES_USER={{ index .Data.data "username" }}
|
|
||||||
DJANGO_POSTGRES_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-django-rabbitmq: secrets/data/rabbitmq/apps/django
|
|
||||||
vault.hashicorp.com/agent-inject-template-django-rabbitmq: |-
|
|
||||||
{{- with secret "secrets/data/rabbitmq/apps/django" -}}
|
|
||||||
CELERY_RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
|
|
||||||
CELERY_RABBITMQ_USER={{ index .Data.data "username" }}
|
|
||||||
CELERY_RABBITMQ_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
CELERY_RABBITMQ_VHOST={{ index .Data.data "vhost" }}
|
|
||||||
DJANGO_RABBIT_HOSTNAME=rabbitmq.rabbitmq.svc.cluster.local
|
|
||||||
DJANGO_RABBIT_USER={{ index .Data.data "username" }}
|
|
||||||
DJANGO_RABBIT_PASS={{ index .Data.data "password" }}
|
|
||||||
DJANGO_RABBIT_VHOST={{ index .Data.data "vhost" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-django-s3: secrets/data/minio/apps/django
|
|
||||||
vault.hashicorp.com/agent-inject-template-django-s3: |-
|
|
||||||
{{- with secret "secrets/data/minio/apps/django" }}
|
|
||||||
AWS_S3_ENDPOINT_URL=https://minio.contour.infra.sarex.tech
|
|
||||||
S3_HOST=https://minio.contour.infra.sarex.tech
|
|
||||||
{{- $buckets := index .Data.data "buckets" }}
|
|
||||||
S3_BUCKET={{ if gt (len $buckets) 0 }}{{ index (index $buckets 0) "name" }}{{ else }}django{{ end }}
|
|
||||||
S3_LOGIN={{ index .Data.data "access_key" }}
|
|
||||||
S3_PASSWORD={{ index .Data.data "secret_key" }}
|
|
||||||
{{- end }}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-django-kafka: secrets/data/kafka/apps/django
|
|
||||||
vault.hashicorp.com/agent-inject-template-django-kafka: |-
|
|
||||||
{{- with secret "secrets/data/kafka/apps/django" -}}
|
|
||||||
KAFKA_BOOTSTRAP_SERVERS="[\"{{ index .Data.data.auth "bootstrap_servers" }}\"]"
|
|
||||||
KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
|
||||||
KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
|
||||||
KAFKA_SASL_PLAIN_USERNAME={{ index .Data.data "username" }}
|
|
||||||
KAFKA_SASL_PLAIN_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-django-jwt-private: secrets/data/vault/common/rsa_keys
|
|
||||||
vault.hashicorp.com/agent-inject-template-django-jwt-private: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
|
||||||
{{ index .Data.data "private_key" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-django-jwt-public: secrets/data/vault/common/rsa_keys
|
|
||||||
vault.hashicorp.com/agent-inject-template-django-jwt-public: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
|
||||||
{{ index .Data.data "public_key" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-django-common: secrets/data/vault/common/django_auth
|
|
||||||
vault.hashicorp.com/agent-inject-template-django-common: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
|
||||||
ZITADEL_ACCESS_TOKEN={{ index .Data.data "django_zitadel_access_token" }}
|
|
||||||
{{- end -}}
|
|
||||||
spec:
|
|
||||||
serviceAccountName: django-vault
|
|
||||||
volumes:
|
|
||||||
- name: django-configmap
|
|
||||||
configMap:
|
|
||||||
name: django-configmap
|
|
||||||
items:
|
|
||||||
- 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
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
command: ["/bin/sh", "-ec"]
|
|
||||||
args:
|
|
||||||
- |
|
|
||||||
set -a
|
|
||||||
[ -f /vault/secrets/django-postgresql ] && . /vault/secrets/django-postgresql
|
|
||||||
[ -f /vault/secrets/django-rabbitmq ] && . /vault/secrets/django-rabbitmq
|
|
||||||
[ -f /vault/secrets/django-s3 ] && . /vault/secrets/django-s3
|
|
||||||
[ -f /vault/secrets/django-kafka ] && . /vault/secrets/django-kafka
|
|
||||||
[ -f /vault/secrets/django-common ] && . /vault/secrets/django-common
|
|
||||||
[ -f /vault/secrets/django-jwt-private ] && export JWT_PRIVATE_KEY="$(cat /vault/secrets/django-jwt-private)"
|
|
||||||
[ -f /vault/secrets/django-jwt-public ] && export JWT_PUBLIC_KEY="$(cat /vault/secrets/django-jwt-public)"
|
|
||||||
set +a
|
|
||||||
exec /opt/sarex/entrypoint.sh
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 8000
|
|
||||||
protocol: TCP
|
|
||||||
env:
|
|
||||||
- name: ALLOWED_HOSTS
|
|
||||||
value: '*'
|
|
||||||
- name: SERVER_USE_CHANGELOG
|
|
||||||
value: "0"
|
|
||||||
- name: SERVER_ZITADEL_ENABLED
|
|
||||||
value: "True"
|
|
||||||
- name: DJANGO_SETTINGS_MODULE
|
|
||||||
value: config.settings.production
|
|
||||||
- name: CELERY_REDIS_HOST
|
|
||||||
value: redis
|
|
||||||
- name: CELERY_REDIS_PORT
|
|
||||||
value: "6379"
|
|
||||||
- name: DJANGO_REDIS_HOST
|
|
||||||
value: redis
|
|
||||||
- name: SERVER_EXTERNAL_FIND_BY_USERNAME_ENABLED
|
|
||||||
value: "True"
|
|
||||||
- name: SERVER_EXTERNAL_FIND_BY_EMAIL_ENABLED
|
|
||||||
value: "True"
|
|
||||||
- name: DJANGO_REDIS_PORT
|
|
||||||
value: "6379"
|
|
||||||
- name: BIMV2_INTERNAL_HOST
|
|
||||||
value: http://bim-backend-v2-service.bim-api
|
|
||||||
- name: BIMV2_TIMEOUT
|
|
||||||
value: "60"
|
|
||||||
- name: JWT_KID
|
|
||||||
value: "1"
|
|
||||||
- name: PDM_SYNC
|
|
||||||
value: "1"
|
|
||||||
- name: KC_SYNC_ENABLE
|
|
||||||
value: "0"
|
|
||||||
- name: MEASUREMENTS_HOST
|
|
||||||
value: http://measurements-service.measurements.svc.cluster.local:8000/api
|
|
||||||
- name: MEASUREMENTS_USE_MEASUREMENTS
|
|
||||||
value: "1"
|
|
||||||
- name: SERVER_API_HOST
|
|
||||||
value: https://sarex.contour.infra.sarex.tech
|
|
||||||
- name: SERVER_HOST
|
|
||||||
value: https://sarex.contour.infra.sarex.tech
|
|
||||||
- name: WORKFLOWS_HOST
|
|
||||||
value: http://backend-svc.processing.svc.cluster.local:80
|
|
||||||
- name: WORKFLOWS_BASE_HOST
|
|
||||||
value: http://backend-svc.django.svc.cluster.local:80
|
|
||||||
- name: WORKFLOWS_PREFIX
|
|
||||||
value: /internal/v1
|
|
||||||
- name: WORKFLOWS_USE
|
|
||||||
value: "1"
|
|
||||||
- name: SERVER_S3_STREAM_IMPORT
|
|
||||||
value: "1"
|
|
||||||
- name: SERVER_SAVE_DIFF_DEM
|
|
||||||
value: "1"
|
|
||||||
- name: SERVER_USE_CLICKHOUSE
|
|
||||||
value: "0"
|
|
||||||
- name: SERVER_USE_CREATE_COMPARED_GEOTIFF_TASK
|
|
||||||
value: "0"
|
|
||||||
- name: SERVER_USE_DJANGO_STORAGE
|
|
||||||
value: "1"
|
|
||||||
- name: SERVER_USE_METASHAPE
|
|
||||||
value: "0"
|
|
||||||
- name: SERVER_CHANGELOG_MODE_SYSTEM_LOG
|
|
||||||
value: "1"
|
|
||||||
- name: SERVER_CHANGELOG_MODE
|
|
||||||
value: "0"
|
|
||||||
- name: SERVER_DJANGO_URLS
|
|
||||||
value: "1"
|
|
||||||
- name: CHECK_IMPORT_HASH
|
|
||||||
value: "1"
|
|
||||||
- name: EAV_ENABLE
|
|
||||||
value: "1"
|
|
||||||
- name: SERVER_CHECK_IMPORT_HASH
|
|
||||||
value: "1"
|
|
||||||
- name: SERVER_CHUNKED_PATH
|
|
||||||
value: /tmp/chunked_uploads/%Y/%m/%d
|
|
||||||
- name: SERVER_HIDE_USER_SCROLL_PERMISSIONS
|
|
||||||
value: "0"
|
|
||||||
- name: SERVER_USE_WRORKFLOW_STATUS
|
|
||||||
value: "1"
|
|
||||||
- name: ZITADEL_HOST
|
|
||||||
value: https://zitadel.contour.infra.sarex.tech
|
|
||||||
- name: SERVER_KAFKA_ENABLED
|
|
||||||
value: "False"
|
|
||||||
- name: KAFKA_TOPICS
|
|
||||||
value: '{"planning": "message-hub-stage", "ams-sync": "ams-sync"}'
|
|
||||||
- name: KAFKA_SSL_CAFILE
|
|
||||||
value: /usr/local/share/ca-certificates/kafka.crt
|
|
||||||
- name: KC_USE_REDIRECT_LOGOUT
|
|
||||||
value: "False"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: "25m"
|
|
||||||
memory: 128Mi
|
|
||||||
volumeMounts:
|
|
||||||
- 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
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: backend-svc
|
|
||||||
namespace: django
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: backend
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 80
|
|
||||||
targetPort: 8000
|
|
||||||
protocol: TCP
|
|
||||||
312
apps/django/base/backend.yaml
Normal file
312
apps/django/base/backend.yaml
Normal file
@ -0,0 +1,312 @@
|
|||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: backend
|
||||||
|
namespace: django
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: "0.1.9"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
enabled: true
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: django-vault
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: backend
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
command:
|
||||||
|
_default: ["/bin/sh", "-ec"]
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/django-postgresql ] && . /vault/secrets/django-postgresql
|
||||||
|
[ -f /vault/secrets/django-rabbitmq ] && . /vault/secrets/django-rabbitmq
|
||||||
|
[ -f /vault/secrets/django-s3 ] && . /vault/secrets/django-s3
|
||||||
|
[ -f /vault/secrets/django-kafka ] && . /vault/secrets/django-kafka
|
||||||
|
[ -f /vault/secrets/django-jwt-private ] && export JWT_PRIVATE_KEY="$(cat /vault/secrets/django-jwt-private)"
|
||||||
|
[ -f /vault/secrets/django-jwt-public ] && export JWT_PUBLIC_KEY="$(cat /vault/secrets/django-jwt-public)"
|
||||||
|
set +a
|
||||||
|
exec /opt/sarex/entrypoint.sh
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: false
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/backend:production_f813140d
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: backend-svc
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
|
targetPort:
|
||||||
|
_default: 8000
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- name: django-configmap
|
||||||
|
mountPath:
|
||||||
|
_default: /opt/sarex/config/settings/production.py
|
||||||
|
subPath:
|
||||||
|
_default: production.py
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: django-configmap
|
||||||
|
items:
|
||||||
|
- key: production.py
|
||||||
|
path:
|
||||||
|
_default: production.py
|
||||||
|
- name: uwsgi-configmap
|
||||||
|
mountPath:
|
||||||
|
_default: /opt/sarex/uwsgi.ini
|
||||||
|
subPath:
|
||||||
|
_default: uwsgi.ini
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: uwsgi-configmap
|
||||||
|
items:
|
||||||
|
- key: uwsgi.ini
|
||||||
|
path:
|
||||||
|
_default: uwsgi.ini
|
||||||
|
envs:
|
||||||
|
- name: ALLOWED_HOSTS
|
||||||
|
value:
|
||||||
|
_default: "*"
|
||||||
|
- name: SERVER_USE_CHANGELOG
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: SERVER_ZITADEL_ENABLED
|
||||||
|
value:
|
||||||
|
_default: "True"
|
||||||
|
- name: DJANGO_SETTINGS_MODULE
|
||||||
|
value:
|
||||||
|
_default: config.settings.production
|
||||||
|
- name: CELERY_REDIS_HOST
|
||||||
|
value:
|
||||||
|
_default: redis
|
||||||
|
- name: CELERY_REDIS_PORT
|
||||||
|
value:
|
||||||
|
_default: "6379"
|
||||||
|
- name: DJANGO_REDIS_HOST
|
||||||
|
value:
|
||||||
|
_default: redis
|
||||||
|
- name: SERVER_EXTERNAL_FIND_BY_USERNAME_ENABLED
|
||||||
|
value:
|
||||||
|
_default: "True"
|
||||||
|
- name: SERVER_EXTERNAL_FIND_BY_EMAIL_ENABLED
|
||||||
|
value:
|
||||||
|
_default: "True"
|
||||||
|
- name: DJANGO_REDIS_PORT
|
||||||
|
value:
|
||||||
|
_default: "6379"
|
||||||
|
- name: BIMV2_INTERNAL_HOST
|
||||||
|
value:
|
||||||
|
_default: http://bim-backend-v2-service.bim-api
|
||||||
|
- name: BIMV2_TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: "60"
|
||||||
|
- name: JWT_KID
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: PDM_SYNC
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: KC_SYNC_ENABLE
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: MEASUREMENTS_HOST
|
||||||
|
value:
|
||||||
|
_default: http://measurements-service.measurements.svc.cluster.local:8000/api
|
||||||
|
- name: MEASUREMENTS_USE_MEASUREMENTS
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: SERVER_API_HOST
|
||||||
|
value:
|
||||||
|
_default: https://sarex.contour.infra.sarex.tech
|
||||||
|
- name: SERVER_HOST
|
||||||
|
value:
|
||||||
|
_default: https://sarex.contour.infra.sarex.tech
|
||||||
|
- name: WORKFLOWS_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.processing.svc.cluster.local:80
|
||||||
|
- name: WORKFLOWS_BASE_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.django.svc.cluster.local:80
|
||||||
|
- name: WORKFLOWS_PREFIX
|
||||||
|
value:
|
||||||
|
_default: /internal/v1
|
||||||
|
- name: WORKFLOWS_USE
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: SERVER_S3_STREAM_IMPORT
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: SERVER_SAVE_DIFF_DEM
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: SERVER_USE_CLICKHOUSE
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: SERVER_USE_CREATE_COMPARED_GEOTIFF_TASK
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: SERVER_USE_DJANGO_STORAGE
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: SERVER_USE_METASHAPE
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: SERVER_CHANGELOG_MODE_SYSTEM_LOG
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: SERVER_CHANGELOG_MODE
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: SERVER_DJANGO_URLS
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: CHECK_IMPORT_HASH
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: EAV_ENABLE
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: SERVER_CHECK_IMPORT_HASH
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: SERVER_CHUNKED_PATH
|
||||||
|
value:
|
||||||
|
_default: /tmp/chunked_uploads/%Y/%m/%d
|
||||||
|
- name: SERVER_HIDE_USER_SCROLL_PERMISSIONS
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: SERVER_USE_WRORKFLOW_STATUS
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: ZITADEL_HOST
|
||||||
|
value:
|
||||||
|
_default: https://zitadel.contour.infra.sarex.tech
|
||||||
|
- name: SERVER_KAFKA_ENABLED
|
||||||
|
value:
|
||||||
|
_default: "False"
|
||||||
|
- name: KAFKA_TOPICS
|
||||||
|
value:
|
||||||
|
_default: '{"planning": "message-hub-stage", "ams-sync": "ams-sync"}'
|
||||||
|
- name: KAFKA_SSL_CAFILE
|
||||||
|
value:
|
||||||
|
_default: /usr/local/share/ca-certificates/kafka.crt
|
||||||
|
- name: KC_USE_REDIRECT_LOGOUT
|
||||||
|
value:
|
||||||
|
_default: "False"
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
||||||
|
vault.hashicorp.com/agent-init-first: "true"
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: django
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-postgresql: secrets/data/apps/django/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-postgresql: |-
|
||||||
|
{{- with secret "secrets/data/apps/django/postgres" -}}
|
||||||
|
DJANGO_POSTGRES_HOST={{ index .Data.data "host" }}
|
||||||
|
DJANGO_POSTGRES_PORTS={{ index .Data.data "port" }}
|
||||||
|
DJANGO_POSTGRES_DATABASE={{ index .Data.data "database" }}
|
||||||
|
DJANGO_POSTGRES_USER={{ index .Data.data "username" }}
|
||||||
|
DJANGO_POSTGRES_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-rabbitmq: secrets/data/rabbitmq/apps/django
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-rabbitmq: |-
|
||||||
|
{{- with secret "secrets/data/rabbitmq/apps/django" -}}
|
||||||
|
CELERY_RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
|
||||||
|
CELERY_RABBITMQ_USER={{ index .Data.data "username" }}
|
||||||
|
CELERY_RABBITMQ_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
CELERY_RABBITMQ_VHOST={{ index .Data.data "vhost" }}
|
||||||
|
DJANGO_RABBIT_HOSTNAME=rabbitmq.rabbitmq.svc.cluster.local
|
||||||
|
DJANGO_RABBIT_USER={{ index .Data.data "username" }}
|
||||||
|
DJANGO_RABBIT_PASS={{ index .Data.data "password" }}
|
||||||
|
DJANGO_RABBIT_VHOST={{ index .Data.data "vhost" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-s3: secrets/data/minio/apps/django
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-s3: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/django" }}
|
||||||
|
AWS_S3_ENDPOINT_URL=https://minio.contour.infra.sarex.tech
|
||||||
|
S3_HOST=https://minio.contour.infra.sarex.tech
|
||||||
|
{{- $buckets := index .Data.data "buckets" }}
|
||||||
|
S3_BUCKET={{ if gt (len $buckets) 0 }}{{ index (index $buckets 0) "name" }}{{ else }}django{{ end }}
|
||||||
|
S3_LOGIN={{ index .Data.data "access_key" }}
|
||||||
|
S3_PASSWORD={{ index .Data.data "secret_key" }}
|
||||||
|
{{- end }}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-kafka: secrets/data/kafka/apps/django
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-kafka: |-
|
||||||
|
{{- with secret "secrets/data/kafka/apps/django" -}}
|
||||||
|
KAFKA_BOOTSTRAP_SERVERS="[\"{{ index .Data.data.auth "bootstrap_servers" }}\"]"
|
||||||
|
KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
||||||
|
KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
||||||
|
KAFKA_SASL_PLAIN_USERNAME={{ index .Data.data "username" }}
|
||||||
|
KAFKA_SASL_PLAIN_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-jwt-private: secrets/data/vault/common/rsa_keys
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-jwt-private: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
||||||
|
{{ index .Data.data "private_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-jwt-public: secrets/data/vault/common/rsa_keys
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-jwt-public: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-common: secrets/data/vault/common/django_auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-common: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
||||||
|
ZITADEL_ACCESS_TOKEN={{ index .Data.data "django_zitadel_access_token" }}
|
||||||
|
{{- end -}}
|
||||||
@ -1,204 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: celery
|
|
||||||
namespace: django
|
|
||||||
labels:
|
|
||||||
app: celery
|
|
||||||
service: celery
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: celery
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: celery
|
|
||||||
service: celery
|
|
||||||
annotations:
|
|
||||||
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
|
||||||
vault.hashicorp.com/agent-init-first: "true"
|
|
||||||
vault.hashicorp.com/agent-inject: "true"
|
|
||||||
vault.hashicorp.com/agent-pre-populate-only: "true"
|
|
||||||
vault.hashicorp.com/auth-path: auth/kubernetes
|
|
||||||
vault.hashicorp.com/role: django
|
|
||||||
vault.hashicorp.com/agent-inject-secret-django-postgresql: secrets/data/postgresql/apps/django
|
|
||||||
vault.hashicorp.com/agent-inject-template-django-postgresql: |-
|
|
||||||
{{- with secret "secrets/data/postgresql/apps/django" -}}
|
|
||||||
DJANGO_POSTGRES_HOST=postgresql.django.svc.cluster.local
|
|
||||||
DJANGO_POSTGRES_PORTS=5432
|
|
||||||
DJANGO_POSTGRES_DATABASE=sarex_db
|
|
||||||
DJANGO_POSTGRES_USER={{ index .Data.data "username" }}
|
|
||||||
DJANGO_POSTGRES_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-django-rabbitmq: secrets/data/rabbitmq/apps/django
|
|
||||||
vault.hashicorp.com/agent-inject-template-django-rabbitmq: |-
|
|
||||||
{{- with secret "secrets/data/rabbitmq/apps/django" -}}
|
|
||||||
CELERY_RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
|
|
||||||
CELERY_RABBITMQ_USER={{ index .Data.data "username" }}
|
|
||||||
CELERY_RABBITMQ_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
CELERY_RABBITMQ_VHOST={{ index .Data.data "vhost" }}
|
|
||||||
DJANGO_RABBIT_HOSTNAME=rabbitmq.rabbitmq.svc.cluster.local
|
|
||||||
DJANGO_RABBIT_USER={{ index .Data.data "username" }}
|
|
||||||
DJANGO_RABBIT_PASS={{ index .Data.data "password" }}
|
|
||||||
DJANGO_RABBIT_VHOST={{ index .Data.data "vhost" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-django-s3: secrets/data/minio/apps/django
|
|
||||||
vault.hashicorp.com/agent-inject-template-django-s3: |-
|
|
||||||
{{- with secret "secrets/data/minio/apps/django" -}}
|
|
||||||
AWS_S3_ENDPOINT_URL=https://minio.contour.infra.sarex.tech
|
|
||||||
S3_HOST=https://minio.contour.infra.sarex.tech
|
|
||||||
{{- $buckets := index .Data.data "buckets" }}
|
|
||||||
S3_BUCKET={{- if gt (len $buckets) 0 -}}{{ index (index $buckets 0) "name" }}{{- else -}}django{{- end -}}
|
|
||||||
S3_LOGIN={{ index .Data.data "access_key" }}
|
|
||||||
S3_PASSWORD={{ index .Data.data "secret_key" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-django-kafka: secrets/data/kafka/apps/django
|
|
||||||
vault.hashicorp.com/agent-inject-template-django-kafka: |-
|
|
||||||
{{- with secret "secrets/data/kafka/apps/django" -}}
|
|
||||||
KAFKA_BOOTSTRAP_SERVERS="[\"{{ index .Data.data.auth "bootstrap_servers" }}\"]"
|
|
||||||
KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
|
||||||
KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
|
||||||
KAFKA_SASL_PLAIN_USERNAME={{ index .Data.data "username" }}
|
|
||||||
KAFKA_SASL_PLAIN_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-django-jwt-private: secrets/data/vault/common/rsa_keys
|
|
||||||
vault.hashicorp.com/agent-inject-template-django-jwt-private: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
|
||||||
{{ index .Data.data "private_key" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-django-jwt-public: secrets/data/vault/common/rsa_keys
|
|
||||||
vault.hashicorp.com/agent-inject-template-django-jwt-public: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
|
||||||
{{ index .Data.data "public_key" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-django-common: secrets/data/vault/common/django_auth
|
|
||||||
vault.hashicorp.com/agent-inject-template-django-common: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
|
||||||
ZITADEL_ACCESS_TOKEN={{ index .Data.data "django_zitadel_access_token" }}
|
|
||||||
{{- end -}}
|
|
||||||
spec:
|
|
||||||
serviceAccountName: django-vault
|
|
||||||
volumes:
|
|
||||||
- name: django-configmap
|
|
||||||
configMap:
|
|
||||||
name: django-configmap
|
|
||||||
items:
|
|
||||||
- key: production.py
|
|
||||||
path: production.py
|
|
||||||
defaultMode: 420
|
|
||||||
containers:
|
|
||||||
- name: celery
|
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/backend:production_a96dead0
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
command: ["/bin/sh", "-ec"]
|
|
||||||
args:
|
|
||||||
- |
|
|
||||||
set -a
|
|
||||||
[ -f /vault/secrets/django-postgresql ] && . /vault/secrets/django-postgresql
|
|
||||||
[ -f /vault/secrets/django-rabbitmq ] && . /vault/secrets/django-rabbitmq
|
|
||||||
[ -f /vault/secrets/django-s3 ] && . /vault/secrets/django-s3
|
|
||||||
[ -f /vault/secrets/django-kafka ] && . /vault/secrets/django-kafka
|
|
||||||
[ -f /vault/secrets/django-common ] && . /vault/secrets/django-common
|
|
||||||
[ -f /vault/secrets/django-jwt-private ] && export JWT_PRIVATE_KEY="$(cat /vault/secrets/django-jwt-private)"
|
|
||||||
[ -f /vault/secrets/django-jwt-public ] && export JWT_PUBLIC_KEY="$(cat /vault/secrets/django-jwt-public)"
|
|
||||||
set +a
|
|
||||||
exec celery -A config worker -B -l info -E -Q default -n default_worker.%h --concurrency=2
|
|
||||||
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 8000
|
|
||||||
protocol: TCP
|
|
||||||
env:
|
|
||||||
- name: ALLOWED_HOSTS
|
|
||||||
value: '*'
|
|
||||||
- name: SERVER_USE_CHANGELOG
|
|
||||||
value: "0"
|
|
||||||
- name: SERVER_ZITADEL_ENABLED
|
|
||||||
value: "False"
|
|
||||||
- name: DJANGO_SETTINGS_MODULE
|
|
||||||
value: config.settings.production
|
|
||||||
- name: CELERY_REDIS_HOST
|
|
||||||
value: redis
|
|
||||||
- name: CELERY_REDIS_PORT
|
|
||||||
value: "6379"
|
|
||||||
- name: DJANGO_REDIS_HOST
|
|
||||||
value: redis
|
|
||||||
- name: DJANGO_REDIS_PORT
|
|
||||||
value: "6379"
|
|
||||||
- name: BIMV2_INTERNAL_HOST
|
|
||||||
value: http://bim-backend-v2-service.bim-api
|
|
||||||
- name: BIMV2_TIMEOUT
|
|
||||||
value: "60"
|
|
||||||
- name: JWT_KID
|
|
||||||
value: "1"
|
|
||||||
- name: PDM_SYNC
|
|
||||||
value: "1"
|
|
||||||
- name: KC_SYNC_ENABLE
|
|
||||||
value: "0"
|
|
||||||
- name: MEASUREMENTS_HOST
|
|
||||||
value: http://measurements-service.measurements.svc.cluster.local:8000/api
|
|
||||||
- name: MEASUREMENTS_USE_MEASUREMENTS
|
|
||||||
value: "1"
|
|
||||||
- name: SERVER_API_HOST
|
|
||||||
value: https://wb.sarex.io
|
|
||||||
- name: SERVER_HOST
|
|
||||||
value: https://wb.sarex.io
|
|
||||||
- name: WORKFLOWS_HOST
|
|
||||||
value: https://wb.sarex.io
|
|
||||||
- name: WORKFLOWS_BASE_HOST
|
|
||||||
value: https://wb.sarex.io
|
|
||||||
- name: WORKFLOWS_USE
|
|
||||||
value: "1"
|
|
||||||
- name: SERVER_S3_STREAM_IMPORT
|
|
||||||
value: "1"
|
|
||||||
- name: SERVER_SAVE_DIFF_DEM
|
|
||||||
value: "1"
|
|
||||||
- name: SERVER_USE_CLICKHOUSE
|
|
||||||
value: "0"
|
|
||||||
- name: SERVER_USE_CREATE_COMPARED_GEOTIFF_TASK
|
|
||||||
value: "0"
|
|
||||||
- name: SERVER_USE_DJANGO_STORAGE
|
|
||||||
value: "1"
|
|
||||||
- name: SERVER_USE_METASHAPE
|
|
||||||
value: "0"
|
|
||||||
- name: SERVER_CHANGELOG_MODE_SYSTEM_LOG
|
|
||||||
value: "1"
|
|
||||||
- name: SERVER_CHANGELOG_MODE
|
|
||||||
value: "0"
|
|
||||||
- name: SERVER_DJANGO_URLS
|
|
||||||
value: "1"
|
|
||||||
- name: CHECK_IMPORT_HASH
|
|
||||||
value: "1"
|
|
||||||
- name: EAV_ENABLE
|
|
||||||
value: "1"
|
|
||||||
- name: SERVER_CHECK_IMPORT_HASH
|
|
||||||
value: "1"
|
|
||||||
- name: SERVER_CHUNKED_PATH
|
|
||||||
value: /tmp/chunked_uploads/%Y/%m/%d
|
|
||||||
- name: SERVER_HIDE_USER_SCROLL_PERMISSIONS
|
|
||||||
value: "0"
|
|
||||||
- name: SERVER_USE_WRORKFLOW_STATUS
|
|
||||||
value: "1"
|
|
||||||
- name: ZITADEL_HOST
|
|
||||||
value: https://zitadel-srx.wb.ru
|
|
||||||
- name: SERVER_KAFKA_ENABLED
|
|
||||||
value: "False"
|
|
||||||
- name: KAFKA_TOPICS
|
|
||||||
value: '{"planning": "message-hub-stage", "ams-sync": "ams-sync"}'
|
|
||||||
- name: KAFKA_SSL_CAFILE
|
|
||||||
value: /usr/local/share/ca-certificates/kafka.crt
|
|
||||||
- name: KC_USE_REDIRECT_LOGOUT
|
|
||||||
value: "False"
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: "25m"
|
|
||||||
memory: 128Mi
|
|
||||||
volumeMounts:
|
|
||||||
- name: django-configmap
|
|
||||||
mountPath: /opt/sarex/config/settings/production.py
|
|
||||||
subPath: production.py
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: regcred
|
|
||||||
279
apps/django/base/celery.yaml
Normal file
279
apps/django/base/celery.yaml
Normal file
@ -0,0 +1,279 @@
|
|||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: celery
|
||||||
|
namespace: django
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: "0.1.9"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
celery:
|
||||||
|
enabled: true
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: django-vault
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: celery
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
command:
|
||||||
|
_default: ["/bin/sh", "-ec"]
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/django-postgresql ] && . /vault/secrets/django-postgresql
|
||||||
|
[ -f /vault/secrets/django-rabbitmq ] && . /vault/secrets/django-rabbitmq
|
||||||
|
[ -f /vault/secrets/django-s3 ] && . /vault/secrets/django-s3
|
||||||
|
[ -f /vault/secrets/django-kafka ] && . /vault/secrets/django-kafka
|
||||||
|
[ -f /vault/secrets/django-jwt-private ] && export JWT_PRIVATE_KEY="$(cat /vault/secrets/django-jwt-private)"
|
||||||
|
[ -f /vault/secrets/django-jwt-public ] && export JWT_PUBLIC_KEY="$(cat /vault/secrets/django-jwt-public)"
|
||||||
|
set +a
|
||||||
|
exec celery -A config worker -B -l info -E -Q default -n default_worker.%h --concurrency=2
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: false
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/backend:production_a96dead0
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: false
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- name: django-configmap
|
||||||
|
mountPath:
|
||||||
|
_default: /opt/sarex/config/settings/production.py
|
||||||
|
subPath:
|
||||||
|
_default: production.py
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: django-configmap
|
||||||
|
items:
|
||||||
|
- key: production.py
|
||||||
|
path:
|
||||||
|
_default: production.py
|
||||||
|
envs:
|
||||||
|
- name: ALLOWED_HOSTS
|
||||||
|
value:
|
||||||
|
_default: "*"
|
||||||
|
- name: SERVER_USE_CHANGELOG
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: SERVER_ZITADEL_ENABLED
|
||||||
|
value:
|
||||||
|
_default: "False"
|
||||||
|
- name: DJANGO_SETTINGS_MODULE
|
||||||
|
value:
|
||||||
|
_default: config.settings.production
|
||||||
|
- name: CELERY_REDIS_HOST
|
||||||
|
value:
|
||||||
|
_default: redis
|
||||||
|
- name: CELERY_REDIS_PORT
|
||||||
|
value:
|
||||||
|
_default: "6379"
|
||||||
|
- name: DJANGO_REDIS_HOST
|
||||||
|
value:
|
||||||
|
_default: redis
|
||||||
|
- name: DJANGO_REDIS_PORT
|
||||||
|
value:
|
||||||
|
_default: "6379"
|
||||||
|
- name: BIMV2_INTERNAL_HOST
|
||||||
|
value:
|
||||||
|
_default: http://bim-backend-v2-service.bim-api
|
||||||
|
- name: BIMV2_TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: "60"
|
||||||
|
- name: JWT_KID
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: PDM_SYNC
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: KC_SYNC_ENABLE
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: MEASUREMENTS_HOST
|
||||||
|
value:
|
||||||
|
_default: http://measurements-service.measurements.svc.cluster.local:8000/api
|
||||||
|
- name: MEASUREMENTS_USE_MEASUREMENTS
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: SERVER_API_HOST
|
||||||
|
value:
|
||||||
|
_default: https://wb.sarex.io
|
||||||
|
- name: SERVER_HOST
|
||||||
|
value:
|
||||||
|
_default: https://wb.sarex.io
|
||||||
|
- name: WORKFLOWS_HOST
|
||||||
|
value:
|
||||||
|
_default: https://wb.sarex.io
|
||||||
|
- name: WORKFLOWS_BASE_HOST
|
||||||
|
value:
|
||||||
|
_default: https://wb.sarex.io
|
||||||
|
- name: WORKFLOWS_USE
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: SERVER_S3_STREAM_IMPORT
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: SERVER_SAVE_DIFF_DEM
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: SERVER_USE_CLICKHOUSE
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: SERVER_USE_CREATE_COMPARED_GEOTIFF_TASK
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: SERVER_USE_DJANGO_STORAGE
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: SERVER_USE_METASHAPE
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: SERVER_CHANGELOG_MODE_SYSTEM_LOG
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: SERVER_CHANGELOG_MODE
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: SERVER_DJANGO_URLS
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: CHECK_IMPORT_HASH
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: EAV_ENABLE
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: SERVER_CHECK_IMPORT_HASH
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: SERVER_CHUNKED_PATH
|
||||||
|
value:
|
||||||
|
_default: /tmp/chunked_uploads/%Y/%m/%d
|
||||||
|
- name: SERVER_HIDE_USER_SCROLL_PERMISSIONS
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: SERVER_USE_WRORKFLOW_STATUS
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: ZITADEL_HOST
|
||||||
|
value:
|
||||||
|
_default: https://zitadel-srx.wb.ru
|
||||||
|
- name: SERVER_KAFKA_ENABLED
|
||||||
|
value:
|
||||||
|
_default: "False"
|
||||||
|
- name: KAFKA_TOPICS
|
||||||
|
value:
|
||||||
|
_default: '{"planning": "message-hub-stage", "ams-sync": "ams-sync"}'
|
||||||
|
- name: KAFKA_SSL_CAFILE
|
||||||
|
value:
|
||||||
|
_default: /usr/local/share/ca-certificates/kafka.crt
|
||||||
|
- name: KC_USE_REDIRECT_LOGOUT
|
||||||
|
value:
|
||||||
|
_default: "False"
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
||||||
|
vault.hashicorp.com/agent-init-first: "true"
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: django
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-postgresql: secrets/data/apps/django/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-postgresql: |-
|
||||||
|
{{- with secret "secrets/data/apps/django/postgres" -}}
|
||||||
|
DJANGO_POSTGRES_HOST={{ index .Data.data "host" }}
|
||||||
|
DJANGO_POSTGRES_PORTS={{ index .Data.data "port" }}
|
||||||
|
DJANGO_POSTGRES_DATABASE={{ index .Data.data "database" }}
|
||||||
|
DJANGO_POSTGRES_USER={{ index .Data.data "username" }}
|
||||||
|
DJANGO_POSTGRES_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-rabbitmq: secrets/data/rabbitmq/apps/django
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-rabbitmq: |-
|
||||||
|
{{- with secret "secrets/data/rabbitmq/apps/django" -}}
|
||||||
|
CELERY_RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
|
||||||
|
CELERY_RABBITMQ_USER={{ index .Data.data "username" }}
|
||||||
|
CELERY_RABBITMQ_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
CELERY_RABBITMQ_VHOST={{ index .Data.data "vhost" }}
|
||||||
|
DJANGO_RABBIT_HOSTNAME=rabbitmq.rabbitmq.svc.cluster.local
|
||||||
|
DJANGO_RABBIT_USER={{ index .Data.data "username" }}
|
||||||
|
DJANGO_RABBIT_PASS={{ index .Data.data "password" }}
|
||||||
|
DJANGO_RABBIT_VHOST={{ index .Data.data "vhost" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-s3: secrets/data/minio/apps/django
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-s3: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/django" -}}
|
||||||
|
AWS_S3_ENDPOINT_URL=https://minio.contour.infra.sarex.tech
|
||||||
|
S3_HOST=https://minio.contour.infra.sarex.tech
|
||||||
|
{{- $buckets := index .Data.data "buckets" }}
|
||||||
|
S3_BUCKET={{- if gt (len $buckets) 0 -}}{{ index (index $buckets 0) "name" }}{{- else -}}django{{- end -}}
|
||||||
|
S3_LOGIN={{ index .Data.data "access_key" }}
|
||||||
|
S3_PASSWORD={{ index .Data.data "secret_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-kafka: secrets/data/kafka/apps/django
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-kafka: |-
|
||||||
|
{{- with secret "secrets/data/kafka/apps/django" -}}
|
||||||
|
KAFKA_BOOTSTRAP_SERVERS="[\"{{ index .Data.data.auth "bootstrap_servers" }}\"]"
|
||||||
|
KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
||||||
|
KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
||||||
|
KAFKA_SASL_PLAIN_USERNAME={{ index .Data.data "username" }}
|
||||||
|
KAFKA_SASL_PLAIN_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-jwt-private: secrets/data/vault/common/rsa_keys
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-jwt-private: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
||||||
|
{{ index .Data.data "private_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-jwt-public: secrets/data/vault/common/rsa_keys
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-jwt-public: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-django-common: secrets/data/vault/common/django_auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-django-common: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
||||||
|
ZITADEL_ACCESS_TOKEN={{ index .Data.data "django_zitadel_access_token" }}
|
||||||
|
{{- end -}}
|
||||||
@ -1,55 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: frontend
|
|
||||||
namespace: django
|
|
||||||
labels:
|
|
||||||
app: frontend
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: frontend
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: frontend
|
|
||||||
spec:
|
|
||||||
volumes:
|
|
||||||
- name: nginx-configmap
|
|
||||||
configMap:
|
|
||||||
name: nginx-configmap
|
|
||||||
items:
|
|
||||||
- key: nginx.conf
|
|
||||||
path: nginx.conf
|
|
||||||
defaultMode: 420
|
|
||||||
- name: zitadel-configmap
|
|
||||||
configMap:
|
|
||||||
name: zitadel-configmap
|
|
||||||
items:
|
|
||||||
- key: config.json
|
|
||||||
path: config.json
|
|
||||||
defaultMode: 420
|
|
||||||
containers:
|
|
||||||
- name: frontend
|
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/sarex-frontend-dev:contour_5.22.0
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 80
|
|
||||||
protocol: TCP
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 25m
|
|
||||||
memory: 100Mi
|
|
||||||
volumeMounts:
|
|
||||||
- name: nginx-configmap
|
|
||||||
mountPath: /etc/nginx/nginx.conf
|
|
||||||
subPath: nginx.conf
|
|
||||||
- name: zitadel-configmap
|
|
||||||
readOnly: true
|
|
||||||
mountPath: /opt/react_client/static/config.json
|
|
||||||
subPath: config.json
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: regcred
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: frontend-svc
|
|
||||||
namespace: django
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: frontend
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 80
|
|
||||||
targetPort: 80
|
|
||||||
protocol: TCP
|
|
||||||
101
apps/django/base/frontend.yaml
Normal file
101
apps/django/base/frontend.yaml
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: frontend
|
||||||
|
namespace: django
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: "0.1.9"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
frontend:
|
||||||
|
enabled: true
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/sarex-frontend-dev:contour_5.22.0
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: frontend
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 100Mi
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: false
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: frontend-svc
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
|
targetPort:
|
||||||
|
_default: 80
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- name: nginx-configmap
|
||||||
|
mountPath:
|
||||||
|
_default: /etc/nginx/nginx.conf
|
||||||
|
subPath:
|
||||||
|
_default: nginx.conf
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: nginx-configmap
|
||||||
|
items:
|
||||||
|
- key: nginx.conf
|
||||||
|
path:
|
||||||
|
_default: nginx.conf
|
||||||
|
|
||||||
|
- name: zitadel-configmap
|
||||||
|
mountPath:
|
||||||
|
_default: /opt/react_client/static/config.json
|
||||||
|
subPath:
|
||||||
|
_default: config.json
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: zitadel-configmap
|
||||||
|
items:
|
||||||
|
- key: config.json
|
||||||
|
path:
|
||||||
|
_default: config.json
|
||||||
@ -4,17 +4,14 @@ kind: Kustomization
|
|||||||
namespace: django
|
namespace: django
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
- serviceaccount.yaml
|
|
||||||
- backend-deployment.yaml
|
|
||||||
- celery-deployment.yaml
|
|
||||||
- frontend-deployment.yaml
|
|
||||||
- backend-service.yaml
|
|
||||||
- frontend-service.yaml
|
|
||||||
- django-configmap.yaml
|
- django-configmap.yaml
|
||||||
- srx-admin-deployment.yaml
|
|
||||||
- srx-admin-service.yaml
|
|
||||||
- nginx-configmap.yaml
|
- nginx-configmap.yaml
|
||||||
- uwsgi-configmap.yaml
|
- uwsgi-configmap.yaml
|
||||||
- zitadel-configmap.yaml
|
- zitadel-configmap.yaml
|
||||||
- s3-proxy-service.yaml
|
- backend.yaml
|
||||||
|
- celery.yaml
|
||||||
|
- frontend.yaml
|
||||||
|
- srx-admin.yaml
|
||||||
- s3-proxy.yaml
|
- s3-proxy.yaml
|
||||||
|
- redis-deployment.yaml
|
||||||
|
- redis-service.yaml
|
||||||
|
|||||||
@ -5,3 +5,4 @@ metadata:
|
|||||||
name: django
|
name: django
|
||||||
labels:
|
labels:
|
||||||
istio-injection: enabled
|
istio-injection: enabled
|
||||||
|
security.deckhouse.io/pod-policy: privileged
|
||||||
|
|||||||
@ -62,36 +62,37 @@ data:
|
|||||||
if_modified_since off;
|
if_modified_since off;
|
||||||
expires off;
|
expires off;
|
||||||
}
|
}
|
||||||
location ~^/api/pm/ {
|
# location ~^/api/pm/ {
|
||||||
#rewrite /api/(.+) /$1 break;
|
# #rewrite /api/(.+) /$1 break;
|
||||||
proxy_set_header Host $host;
|
# proxy_set_header Host $host;
|
||||||
proxy_pass http://backend-svc.pm.svc.cluster.local:8000;
|
# proxy_pass http://backend-svc.pm.svc.cluster.local:8000;
|
||||||
}
|
# }
|
||||||
|
|
||||||
location ~^/api/v1/documents/ {
|
# location ~^/api/v1/documents/ {
|
||||||
#rewrite /api/(.+) /$1 break;
|
# #rewrite /api/(.+) /$1 break;
|
||||||
proxy_set_header Host $host;
|
# proxy_set_header Host $host;
|
||||||
proxy_pass http://backend-filestream-svc.documentations.svc.cluster.local:80;
|
# proxy_pass http://backend-filestream-svc.documentations.svc.cluster.local:80;
|
||||||
}
|
# }
|
||||||
|
|
||||||
# location ~^/(api|admin)/ {
|
# location ~^/(api|admin)/ {
|
||||||
# proxy_set_header Host $host;
|
# proxy_set_header Host $host;
|
||||||
# proxy_pass http://backend-svc.django.svc.cluster.local:80;
|
# proxy_pass http://backend-svc.django.svc.cluster.local:80;
|
||||||
# }
|
# }
|
||||||
|
|
||||||
location ~^/workspaces-v2/(.+).js {
|
# location ~^/workspaces-v2/(.+).js {
|
||||||
proxy_http_version 1.1;
|
# proxy_http_version 1.1;
|
||||||
proxy_set_header Connection "";
|
# proxy_set_header Connection "";
|
||||||
rewrite /workspaces-v2/(.+) /$1 break;
|
# rewrite /workspaces-v2/(.+) /$1 break;
|
||||||
proxy_pass http://frontend-svc.workspaces.svc.cluster.local:80;
|
# proxy_pass http://frontend-svc.workspaces.svc.cluster.local:80;
|
||||||
}
|
# }
|
||||||
|
|
||||||
|
|
||||||
location ~^/workspaces-v2/(.+)\.wasm$ {
|
# location ~^/workspaces-v2/(.+)\.wasm$ {
|
||||||
proxy_http_version 1.1;
|
# proxy_http_version 1.1;
|
||||||
proxy_set_header Connection "";
|
# proxy_set_header Connection "";
|
||||||
rewrite ^/workspaces-v2/(.+) /$1 break;
|
# rewrite ^/workspaces-v2/(.+) /$1 break;
|
||||||
proxy_pass http://frontend-svc.workspaces.svc.cluster.local:80;
|
# proxy_pass http://frontend-svc.workspaces.svc.cluster.local:80;
|
||||||
}
|
# }
|
||||||
|
|
||||||
location @index {
|
location @index {
|
||||||
add_header Cache-Control 'no-cache, must-revalidate, proxy-revalidate, max-age=0';
|
add_header Cache-Control 'no-cache, must-revalidate, proxy-revalidate, max-age=0';
|
||||||
|
|||||||
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: s3-proxy-svc
|
|
||||||
namespace: django
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: s3-proxy
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 80
|
|
||||||
targetPort: 80
|
|
||||||
protocol: TCP
|
|
||||||
@ -1,69 +1,97 @@
|
|||||||
apiVersion: apps/v1
|
---
|
||||||
kind: Deployment
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
metadata:
|
metadata:
|
||||||
name: s3-proxy
|
name: s3-proxy
|
||||||
namespace: django
|
namespace: django
|
||||||
labels:
|
|
||||||
app: s3-proxy
|
|
||||||
|
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
interval: 10m
|
||||||
|
chart:
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: s3-proxy
|
|
||||||
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: s3-proxy
|
|
||||||
annotations:
|
|
||||||
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
|
||||||
|
|
||||||
vault.hashicorp.com/agent-init-first: "true"
|
|
||||||
vault.hashicorp.com/agent-inject: "true"
|
|
||||||
vault.hashicorp.com/agent-pre-populate-only: "true"
|
|
||||||
vault.hashicorp.com/auth-path: auth/kubernetes
|
|
||||||
vault.hashicorp.com/role: django
|
|
||||||
|
|
||||||
vault.hashicorp.com/agent-inject-secret-s3: secrets/data/minio/apps/django
|
|
||||||
|
|
||||||
vault.hashicorp.com/agent-inject-template-s3: |
|
|
||||||
{{- with secret "secrets/data/minio/apps/django" }}
|
|
||||||
AWS_API_ENDPOINT=https://minio.contour.infra.sarex.tech
|
|
||||||
{{- $buckets := index .Data.data "buckets" }}
|
|
||||||
AWS_S3_BUCKET={{ if gt (len $buckets) 0 }}{{ index (index $buckets 0) "name" }}{{ else }}django{{ end }}
|
|
||||||
AWS_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
|
||||||
AWS_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: django-vault
|
chart: universal-chart
|
||||||
|
version: "0.1.9"
|
||||||
containers:
|
sourceRef:
|
||||||
- name: s3-proxy
|
kind: HelmRepository
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/s3-proxy:vault_6e586217
|
name: yc-oci-charts
|
||||||
imagePullPolicy: Always
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
s3-proxy:
|
||||||
|
enabled: true
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: django-vault
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/s3-proxy:vault_6e586217
|
||||||
|
pullPolicy:
|
||||||
|
_default: Always
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: s3-proxy
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
command:
|
command:
|
||||||
- /bin/sh
|
_default: ["/bin/sh", "-ec"]
|
||||||
- -ec
|
|
||||||
|
|
||||||
args:
|
args:
|
||||||
- |
|
_default:
|
||||||
set -a
|
- |
|
||||||
[ -f /vault/secrets/s3 ] && . /vault/secrets/s3
|
set -a
|
||||||
set +a
|
[ -f /vault/secrets/s3 ] && . /vault/secrets/s3
|
||||||
|
set +a
|
||||||
exec /s3-proxy
|
exec /s3-proxy
|
||||||
|
probes:
|
||||||
ports:
|
liveness:
|
||||||
- name: http
|
enabled: false
|
||||||
containerPort: 80
|
readiness:
|
||||||
|
enabled: false
|
||||||
env:
|
service:
|
||||||
- name: ACCESS_LOG
|
enabled: true
|
||||||
value: "true"
|
name:
|
||||||
|
_default: s3-proxy-svc
|
||||||
- name: CORS_ALLOW_HEADERS
|
type:
|
||||||
value: "Content-Type, Accept-Ranges, Content-Range, Content-Encoding"
|
_default: ClusterIP
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
|
targetPort:
|
||||||
|
_default: 80
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
envs:
|
||||||
|
- name: ACCESS_LOG
|
||||||
|
value:
|
||||||
|
_default: "true"
|
||||||
|
- name: CORS_ALLOW_HEADERS
|
||||||
|
value:
|
||||||
|
_default: "Content-Type, Accept-Ranges, Content-Range, Content-Encoding"
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
||||||
|
vault.hashicorp.com/agent-init-first: "true"
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: django
|
||||||
|
vault.hashicorp.com/agent-inject-secret-s3: secrets/data/minio/apps/django
|
||||||
|
vault.hashicorp.com/agent-inject-template-s3: |
|
||||||
|
{{- with secret "secrets/data/minio/apps/django" }}
|
||||||
|
AWS_API_ENDPOINT=https://minio.contour.infra.sarex.tech
|
||||||
|
{{- $buckets := index .Data.data "buckets" }}
|
||||||
|
AWS_S3_BUCKET={{ if gt (len $buckets) 0 }}{{ index (index $buckets 0) "name" }}{{ else }}django{{ end }}
|
||||||
|
AWS_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||||
|
AWS_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||||
|
{{- end }}
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: django-vault
|
|
||||||
namespace: django
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
---
|
|
||||||
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: 25m
|
|
||||||
memory: 100Mi
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: regcred
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
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
|
|
||||||
70
apps/django/base/srx-admin.yaml
Normal file
70
apps/django/base/srx-admin.yaml
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: srx-admin-frontend
|
||||||
|
namespace: django
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: "0.1.9"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
srx-admin:
|
||||||
|
enabled: true
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/srx-admin:prod_3b9cb250
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: srx-admin-frontend
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 100Mi
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: false
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: srx-admin-svc
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
|
targetPort:
|
||||||
|
_default: 80
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
@ -8,8 +8,8 @@ data:
|
|||||||
{
|
{
|
||||||
"auth_type": "zitadel",
|
"auth_type": "zitadel",
|
||||||
"zitadel": {
|
"zitadel": {
|
||||||
"client_id": "379557107642492501",
|
"client_id": "383923818340615274",
|
||||||
"host": "https://zitadel.contour.infra.sarex.tech"
|
"host": "https://sarex-login.uralmine.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
6
apps/django/d8-ugmk-prod/kustomization.yaml
Normal file
6
apps/django/d8-ugmk-prod/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: django
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
@ -1,110 +1,161 @@
|
|||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
metadata:
|
metadata:
|
||||||
name: backend
|
name: backend
|
||||||
namespace: django
|
namespace: django
|
||||||
spec:
|
spec:
|
||||||
replicas: 2
|
values:
|
||||||
template:
|
services:
|
||||||
spec:
|
backend:
|
||||||
containers:
|
deployment:
|
||||||
- name: backend
|
replicaCount:
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/backend:production_c0c6bbb1
|
_default: 2
|
||||||
env:
|
image:
|
||||||
- name: GK_ENCRYPTION_KEY
|
name:
|
||||||
value: zfDjuszywHSbAhY8KJQbESbpUYN74XTs
|
_default: cr.yandex/crp3ccidau046kdj8g9q/backend:production_c0c6bbb1
|
||||||
- name: SERVER_DONSTROI_STYLE
|
envs:
|
||||||
value: 'True'
|
- name: GK_ENCRYPTION_KEY
|
||||||
- name: SERVER_API_HOST
|
value:
|
||||||
value: https://sarex.dsinv.ru
|
_default: zfDjuszywHSbAhY8KJQbESbpUYN74XTs
|
||||||
- name: SERVER_VERIFY_SSL
|
- name: SERVER_DONSTROI_STYLE
|
||||||
value: 'False'
|
value:
|
||||||
- name: SERVER_SUPERSET_HOST
|
_default: "True"
|
||||||
value: https://bi.sarex.dsinv.ru
|
- name: SERVER_API_HOST
|
||||||
- name: GATEWAY_HOST
|
value:
|
||||||
value: http://pdm-api.documentations.svc.cluster.local:8080
|
_default: https://sarex.dsinv.ru
|
||||||
- name: KC_DEFAULT_COMPANY_NAME
|
- name: SERVER_VERIFY_SSL
|
||||||
value: Донстрой
|
value:
|
||||||
- name: KC_SYNC_USER_GROUPS
|
_default: "False"
|
||||||
value: '0'
|
- name: SERVER_SUPERSET_HOST
|
||||||
- name: SERVER_ZITADEL_ENABLED
|
value:
|
||||||
value: 'False'
|
_default: https://bi.sarex.dsinv.ru
|
||||||
- name: KC_SYNC_USER_POSITIONS
|
- name: GATEWAY_HOST
|
||||||
value: '0'
|
value:
|
||||||
- name: KC_SYNC_USER_DEPARTMENTS
|
_default: http://pdm-api.documentations.svc.cluster.local:8080
|
||||||
value: '0'
|
- name: KC_DEFAULT_COMPANY_NAME
|
||||||
- name: SERVER_CHANGELOG_MODE_CELERY
|
value:
|
||||||
value: 'True'
|
_default: Донстрой
|
||||||
- name: SERVER_CHANGELOG_MODE_SYSTEM_LOG
|
- name: KC_SYNC_USER_GROUPS
|
||||||
value: 'True'
|
value:
|
||||||
- name: DJANGO_SETTINGS_MODULE
|
_default: "0"
|
||||||
value: config.settings.production
|
- name: SERVER_ZITADEL_ENABLED
|
||||||
- name: CC_PATH
|
value:
|
||||||
value: /usr/local/bin/CloudCompare
|
_default: "False"
|
||||||
- name: CC_COMPARISONS_BASE_DIR
|
- name: KC_SYNC_USER_POSITIONS
|
||||||
value: /tmp
|
value:
|
||||||
- name: PCVT_PATH
|
_default: "0"
|
||||||
value: /usr/local/bin/PotreeConverter
|
- name: KC_SYNC_USER_DEPARTMENTS
|
||||||
- name: POTREE_CONVERTER_PATH
|
value:
|
||||||
value: /usr/local/bin/PotreeConverter
|
_default: "0"
|
||||||
- name: WORKFLOWS_BASE_HOST
|
- name: SERVER_CHANGELOG_MODE_CELERY
|
||||||
value: http://backend.django.svc.cluster.local:8000
|
value:
|
||||||
- name: WORKFLOWS_HOST
|
_default: "True"
|
||||||
value: http://workflows-service.workflow.svc.cluster.local:8000
|
- name: SERVER_CHANGELOG_MODE_SYSTEM_LOG
|
||||||
- name: WORKFLOWS_PREFIX
|
value:
|
||||||
value: /api/v1
|
_default: "True"
|
||||||
- name: SERVER_HOST
|
- name: DJANGO_SETTINGS_MODULE
|
||||||
value: https://sarex.dsinv.ru
|
value:
|
||||||
- name: S3_HOST
|
_default: config.settings.production
|
||||||
value: http://minio-service.minio.svc.cluster.local:9000
|
- name: CC_PATH
|
||||||
- name: AWS_S3_ENDPOINT_URL
|
value:
|
||||||
value: http://minio-service.minio.svc.cluster.local:9000
|
_default: /usr/local/bin/CloudCompare
|
||||||
- name: MEASUREMENTS_USE_MEASUREMENTS
|
- name: CC_COMPARISONS_BASE_DIR
|
||||||
value: '1'
|
value:
|
||||||
- name: MEASUREMENTS_HOST
|
_default: /tmp
|
||||||
value: http://measurement-service.measurements.svc.cluster.local:8000/api
|
- name: PCVT_PATH
|
||||||
- name: SERVER_USE_DJANGO_STORAGE
|
value:
|
||||||
value: '1'
|
_default: /usr/local/bin/PotreeConverter
|
||||||
- name: SERVER_DJANGO_URLS
|
- name: POTREE_CONVERTER_PATH
|
||||||
value: '1'
|
value:
|
||||||
- name: SERVER_S3_STREAM_IMPORT
|
_default: /usr/local/bin/PotreeConverter
|
||||||
value: '1'
|
- name: WORKFLOWS_BASE_HOST
|
||||||
- name: WORKFLOWS_USE
|
value:
|
||||||
value: '1'
|
_default: http://backend.django.svc.cluster.local:8000
|
||||||
- name: SERVER_KAFKA_ENABLED
|
- name: WORKFLOWS_HOST
|
||||||
value: 'True'
|
value:
|
||||||
- name: KAFKA_TOPICS
|
_default: http://workflows-service.workflow.svc.cluster.local:8000
|
||||||
value: '{"planning": "message-hub-stage", "ams-sync": "ams-sync"}'
|
- name: WORKFLOWS_PREFIX
|
||||||
- name: KAFKA_BOOTSTRAP_SERVERS
|
value:
|
||||||
value: '["donstroi-kafka-bootstrap.kafka.svc.cluster.local:9093"]'
|
_default: /api/v1
|
||||||
- name: KAFKA_SECURITY_PROTOCOL
|
- name: SERVER_HOST
|
||||||
value: SSL
|
value:
|
||||||
- name: KAFKA_SASL_MECHANISM
|
_default: https://sarex.dsinv.ru
|
||||||
value: SCRAM-SHA-512
|
- name: S3_HOST
|
||||||
- name: KAFKA_SSL_CAFILE
|
value:
|
||||||
value: /etc/ca-certificates/Yandex/YandexInternalRootCA.crt
|
_default: http://minio-service.minio.svc.cluster.local:9000
|
||||||
- name: WORKFLOWS_REGISTRY
|
- name: AWS_S3_ENDPOINT_URL
|
||||||
value: cr.yandex/crp3ccidau046kdj8g9q
|
value:
|
||||||
- name: DJANGO_REDIS_HOST
|
_default: http://minio-service.minio.svc.cluster.local:9000
|
||||||
value: redis-service.django.svc.cluster.local
|
- name: MEASUREMENTS_USE_MEASUREMENTS
|
||||||
- name: DJANGO_RABBIT_HOSTNAME
|
value:
|
||||||
value: rabbitmq-service.django.svc.cluster.local
|
_default: "1"
|
||||||
- name: CELERY_RABBITMQ_HOST
|
- name: MEASUREMENTS_HOST
|
||||||
value: rabbitmq-service.django.svc.cluster.local
|
value:
|
||||||
- name: DJANGO_POSTGRES_HOST
|
_default: http://measurement-service.measurements.svc.cluster.local:8000/api
|
||||||
value: postgres-service
|
- name: SERVER_USE_DJANGO_STORAGE
|
||||||
- name: DJANGO_POSTGRES_PORTS
|
value:
|
||||||
value: '5432'
|
_default: "1"
|
||||||
- name: ALLOWED_HOSTS
|
- name: SERVER_DJANGO_URLS
|
||||||
value: '*'
|
value:
|
||||||
- name: USE_SSL_FOR_URL_SERIALIZATION
|
_default: "1"
|
||||||
value: '0'
|
- name: SERVER_S3_STREAM_IMPORT
|
||||||
- name: SERVER_REPLACE_HOST
|
value:
|
||||||
value: '1'
|
_default: "1"
|
||||||
- name: SERVER_JWT_PROXY
|
- name: WORKFLOWS_USE
|
||||||
value: '0'
|
value:
|
||||||
- name: PDM_SYNC
|
_default: "1"
|
||||||
value: '1'
|
- name: SERVER_KAFKA_ENABLED
|
||||||
- name: CELERY_REDIS_HOST
|
value:
|
||||||
value: redis-service
|
_default: "True"
|
||||||
|
- name: KAFKA_TOPICS
|
||||||
|
value:
|
||||||
|
_default: '{"planning": "message-hub-stage", "ams-sync": "ams-sync"}'
|
||||||
|
- name: KAFKA_BOOTSTRAP_SERVERS
|
||||||
|
value:
|
||||||
|
_default: '["donstroi-kafka-bootstrap.kafka.svc.cluster.local:9093"]'
|
||||||
|
- name: KAFKA_SECURITY_PROTOCOL
|
||||||
|
value:
|
||||||
|
_default: SSL
|
||||||
|
- name: KAFKA_SASL_MECHANISM
|
||||||
|
value:
|
||||||
|
_default: SCRAM-SHA-512
|
||||||
|
- name: KAFKA_SSL_CAFILE
|
||||||
|
value:
|
||||||
|
_default: /etc/ca-certificates/Yandex/YandexInternalRootCA.crt
|
||||||
|
- name: WORKFLOWS_REGISTRY
|
||||||
|
value:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q
|
||||||
|
- name: DJANGO_REDIS_HOST
|
||||||
|
value:
|
||||||
|
_default: redis-service.django.svc.cluster.local
|
||||||
|
- name: DJANGO_RABBIT_HOSTNAME
|
||||||
|
value:
|
||||||
|
_default: rabbitmq-service.django.svc.cluster.local
|
||||||
|
- name: CELERY_RABBITMQ_HOST
|
||||||
|
value:
|
||||||
|
_default: rabbitmq-service.django.svc.cluster.local
|
||||||
|
- name: DJANGO_POSTGRES_HOST
|
||||||
|
value:
|
||||||
|
_default: postgres-service
|
||||||
|
- name: DJANGO_POSTGRES_PORTS
|
||||||
|
value:
|
||||||
|
_default: "5432"
|
||||||
|
- name: ALLOWED_HOSTS
|
||||||
|
value:
|
||||||
|
_default: "*"
|
||||||
|
- name: USE_SSL_FOR_URL_SERIALIZATION
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: SERVER_REPLACE_HOST
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: SERVER_JWT_PROXY
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: PDM_SYNC
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: CELERY_REDIS_HOST
|
||||||
|
value:
|
||||||
|
_default: redis-service
|
||||||
|
|||||||
@ -1,87 +1,125 @@
|
|||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
metadata:
|
metadata:
|
||||||
name: celery
|
name: celery
|
||||||
namespace: django
|
namespace: django
|
||||||
spec:
|
spec:
|
||||||
template:
|
values:
|
||||||
spec:
|
services:
|
||||||
containers:
|
celery:
|
||||||
- name: celery
|
image:
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/backend:production_c0c6bbb1
|
name:
|
||||||
env:
|
_default: cr.yandex/crp3ccidau046kdj8g9q/backend:production_c0c6bbb1
|
||||||
- name: DJANGO_SETTINGS_MODULE
|
envs:
|
||||||
value: config.settings.production
|
- name: DJANGO_SETTINGS_MODULE
|
||||||
- name: CC_PATH
|
value:
|
||||||
value: /usr/local/bin/CloudCompare
|
_default: config.settings.production
|
||||||
- name: CC_COMPARISONS_BASE_DIR
|
- name: CC_PATH
|
||||||
value: /tmp
|
value:
|
||||||
- name: AWS_S3_ENDPOINT_URL
|
_default: /usr/local/bin/CloudCompare
|
||||||
value: http://minio-service.minio.svc.cluster.local:9000
|
- name: CC_COMPARISONS_BASE_DIR
|
||||||
- name: PCVT_PATH
|
value:
|
||||||
value: /usr/local/bin/PotreeConverter
|
_default: /tmp
|
||||||
- name: POTREE_CONVERTER_PATH
|
- name: AWS_S3_ENDPOINT_URL
|
||||||
value: /usr/local/bin/PotreeConverter
|
value:
|
||||||
- name: WORKFLOWS_BASE_HOST
|
_default: http://minio-service.minio.svc.cluster.local:9000
|
||||||
value: http://backend.django.svc.cluster.local:8000
|
- name: PCVT_PATH
|
||||||
- name: WORKFLOWS_HOST
|
value:
|
||||||
value: https://sarex.dsinv.ru
|
_default: /usr/local/bin/PotreeConverter
|
||||||
- name: SERVER_CACHE_ENABLED
|
- name: POTREE_CONVERTER_PATH
|
||||||
value: 'True'
|
value:
|
||||||
- name: SERVER_API_HOST
|
_default: /usr/local/bin/PotreeConverter
|
||||||
value: https://sarex.dsinv.ru
|
- name: WORKFLOWS_BASE_HOST
|
||||||
- name: SERVER_VERIFY_SSL
|
value:
|
||||||
value: 'False'
|
_default: http://backend.django.svc.cluster.local:8000
|
||||||
- name: SERVER_HOST
|
- name: WORKFLOWS_HOST
|
||||||
value: https://sarex.dsinv.ru
|
value:
|
||||||
- name: S3_HOST
|
_default: https://sarex.dsinv.ru
|
||||||
value: http://minio-service.minio.svc.cluster.local:9000
|
- name: SERVER_CACHE_ENABLED
|
||||||
- name: MEASUREMENTS_USE_MEASUREMENTS
|
value:
|
||||||
value: '1'
|
_default: "True"
|
||||||
- name: MEASUREMENTS_HOST
|
- name: SERVER_API_HOST
|
||||||
value: http://measurements-service.measurements.svc.cluster.local:8000/api
|
value:
|
||||||
- name: SERVER_USE_DJANGO_STORAGE
|
_default: https://sarex.dsinv.ru
|
||||||
value: '1'
|
- name: SERVER_VERIFY_SSL
|
||||||
- name: SERVER_DJANGO_URLS
|
value:
|
||||||
value: '1'
|
_default: "False"
|
||||||
- name: CACHE_HOST
|
- name: SERVER_HOST
|
||||||
value: redis.pm.svc.cluster.local
|
value:
|
||||||
- name: SERVER_DONSTROI_STYLE
|
_default: https://sarex.dsinv.ru
|
||||||
value: 'True'
|
- name: S3_HOST
|
||||||
- name: SERVER_S3_STREAM_IMPORT
|
value:
|
||||||
value: '1'
|
_default: http://minio-service.minio.svc.cluster.local:9000
|
||||||
- name: WORKFLOWS_USE
|
- name: MEASUREMENTS_USE_MEASUREMENTS
|
||||||
value: '1'
|
value:
|
||||||
- name: WORKFLOWS_REGISTRY
|
_default: "1"
|
||||||
value: cr.yandex/crp3ccidau046kdj8g9q
|
- name: MEASUREMENTS_HOST
|
||||||
- name: CELERY_REDIS_HOST
|
value:
|
||||||
value: redis-service
|
_default: http://measurements-service.measurements.svc.cluster.local:8000/api
|
||||||
- name: CELERY_RABBITMQ_HOST
|
- name: SERVER_USE_DJANGO_STORAGE
|
||||||
value: rabbitmq-service.django.svc.cluster.local
|
value:
|
||||||
- name: DJANGO_POSTGRES_HOST
|
_default: "1"
|
||||||
value: postgres-service
|
- name: SERVER_DJANGO_URLS
|
||||||
- name: SERVER_KAFKA_ENABLED
|
value:
|
||||||
value: 'True'
|
_default: "1"
|
||||||
- name: KAFKA_TOPICS
|
- name: CACHE_HOST
|
||||||
value: '{"planning": "message-hub-stage", "ams-sync": "ams-sync"}'
|
value:
|
||||||
- name: KAFKA_BOOTSTRAP_SERVERS
|
_default: redis.pm.svc.cluster.local
|
||||||
value: '["donstroi-kafka-bootstrap.kafka.svc.cluster.local:9093"]'
|
- name: SERVER_DONSTROI_STYLE
|
||||||
- name: KAFKA_SECURITY_PROTOCOL
|
value:
|
||||||
value: SSL
|
_default: "True"
|
||||||
- name: KAFKA_SASL_MECHANISM
|
- name: SERVER_S3_STREAM_IMPORT
|
||||||
value: SCRAM-SHA-512
|
value:
|
||||||
- name: KAFKA_SSL_CAFILE
|
_default: "1"
|
||||||
value: /etc/ca-certificates/Yandex/YandexInternalRootCA.crt
|
- name: WORKFLOWS_USE
|
||||||
- name: DJANGO_POSTGRES_PORTS
|
value:
|
||||||
value: '5432'
|
_default: "1"
|
||||||
- name: ALLOWED_HOSTS
|
- name: WORKFLOWS_REGISTRY
|
||||||
value: '*'
|
value:
|
||||||
- name: USE_SSL_FOR_URL_SERIALIZATION
|
_default: cr.yandex/crp3ccidau046kdj8g9q
|
||||||
value: '0'
|
- name: CELERY_REDIS_HOST
|
||||||
- name: SERVER_REPLACE_HOST
|
value:
|
||||||
value: '1'
|
_default: redis-service
|
||||||
- name: SERVER_JWT_PROXY
|
- name: CELERY_RABBITMQ_HOST
|
||||||
value: '1'
|
value:
|
||||||
- name: PDM_SYNC
|
_default: rabbitmq-service.django.svc.cluster.local
|
||||||
value: '1'
|
- name: DJANGO_POSTGRES_HOST
|
||||||
|
value:
|
||||||
|
_default: postgres-service
|
||||||
|
- name: SERVER_KAFKA_ENABLED
|
||||||
|
value:
|
||||||
|
_default: "True"
|
||||||
|
- name: KAFKA_TOPICS
|
||||||
|
value:
|
||||||
|
_default: '{"planning": "message-hub-stage", "ams-sync": "ams-sync"}'
|
||||||
|
- name: KAFKA_BOOTSTRAP_SERVERS
|
||||||
|
value:
|
||||||
|
_default: '["donstroi-kafka-bootstrap.kafka.svc.cluster.local:9093"]'
|
||||||
|
- name: KAFKA_SECURITY_PROTOCOL
|
||||||
|
value:
|
||||||
|
_default: SSL
|
||||||
|
- name: KAFKA_SASL_MECHANISM
|
||||||
|
value:
|
||||||
|
_default: SCRAM-SHA-512
|
||||||
|
- name: KAFKA_SSL_CAFILE
|
||||||
|
value:
|
||||||
|
_default: /etc/ca-certificates/Yandex/YandexInternalRootCA.crt
|
||||||
|
- name: DJANGO_POSTGRES_PORTS
|
||||||
|
value:
|
||||||
|
_default: "5432"
|
||||||
|
- name: ALLOWED_HOSTS
|
||||||
|
value:
|
||||||
|
_default: "*"
|
||||||
|
- name: USE_SSL_FOR_URL_SERIALIZATION
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: SERVER_REPLACE_HOST
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: SERVER_JWT_PROXY
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: PDM_SYNC
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
metadata:
|
metadata:
|
||||||
name: frontend
|
name: frontend
|
||||||
namespace: django
|
namespace: django
|
||||||
spec:
|
spec:
|
||||||
template:
|
values:
|
||||||
spec:
|
services:
|
||||||
containers:
|
frontend:
|
||||||
- name: frontend
|
image:
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/sarex-frontend-dev:contour_5.15.7
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/sarex-frontend-dev:contour_5.15.7
|
||||||
|
|||||||
@ -8,13 +8,13 @@ resources:
|
|||||||
patches:
|
patches:
|
||||||
- path: backend.yaml
|
- path: backend.yaml
|
||||||
target:
|
target:
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
name: backend
|
name: backend
|
||||||
- path: celery.yaml
|
- path: celery.yaml
|
||||||
target:
|
target:
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
name: celery
|
name: celery
|
||||||
- path: frontend.yaml
|
- path: frontend.yaml
|
||||||
target:
|
target:
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
name: frontend
|
name: frontend
|
||||||
|
|||||||
@ -4,6 +4,4 @@ kind: Kustomization
|
|||||||
resources:
|
resources:
|
||||||
- ../base
|
- ../base
|
||||||
- postgresql.yaml
|
- postgresql.yaml
|
||||||
- redis-deployment.yaml
|
|
||||||
- redis-service.yaml
|
|
||||||
patches: []
|
patches: []
|
||||||
|
|||||||
@ -1,173 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: documentations-api
|
|
||||||
namespace: documentations
|
|
||||||
labels:
|
|
||||||
app: documentations-api
|
|
||||||
service: documentations-api
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: documentations-api
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: documentations-api
|
|
||||||
service: documentations-api
|
|
||||||
annotations:
|
|
||||||
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
|
||||||
vault.hashicorp.com/agent-init-first: "true"
|
|
||||||
vault.hashicorp.com/agent-inject: "true"
|
|
||||||
vault.hashicorp.com/agent-pre-populate-only: "true"
|
|
||||||
vault.hashicorp.com/auth-path: auth/kubernetes
|
|
||||||
vault.hashicorp.com/role: documentations
|
|
||||||
vault.hashicorp.com/agent-inject-secret-documentations-postgresql: secrets/data/postgresql/apps/documentations
|
|
||||||
vault.hashicorp.com/agent-inject-template-documentations-postgresql: |-
|
|
||||||
{{- with secret "secrets/data/postgresql/apps/documentations" -}}
|
|
||||||
POSTGRES_ADDRESS=postgresql.documentations.svc.cluster.local
|
|
||||||
POSTGRES_PORT=5432
|
|
||||||
POSTGRES_DB=documentations_db
|
|
||||||
POSTGRES_USER={{ index .Data.data "username" }}
|
|
||||||
POSTGRES_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-documentations-common: secrets/data/vault/common/django_auth
|
|
||||||
vault.hashicorp.com/agent-inject-template-documentations-common: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
|
||||||
DJANGO_BASIC_AUTH={{ index .Data.data "key" }}
|
|
||||||
DJANGO_BASIC_AUTH_FOR_GET_USER={{ index .Data.data "key" }}
|
|
||||||
DOCUMENT_PUBLIC_LINK_JWT_SECRET={{ index .Data.data "documentations_public_link_jwt_secret" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-documentations-s3-account-json: secrets/data/vault/common/django_auth
|
|
||||||
vault.hashicorp.com/agent-inject-template-documentations-s3-account-json: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
|
||||||
{{ index .Data.data "documentations_s3_service_account_json" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-documentations-zitadel-account-json: secrets/data/vault/common/django_auth
|
|
||||||
vault.hashicorp.com/agent-inject-template-documentations-zitadel-account-json: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
|
||||||
{{ index .Data.data "documentations_zitadel_account_json" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-documentations-rsa-public: secrets/data/vault/common/rsa_keys
|
|
||||||
vault.hashicorp.com/agent-inject-template-documentations-rsa-public: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
|
||||||
{{ index .Data.data "public_key" }}
|
|
||||||
{{- end -}}
|
|
||||||
spec:
|
|
||||||
serviceAccountName: documentations-vault
|
|
||||||
containers:
|
|
||||||
- name: documentations-api
|
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/documentations:prod_a9990430
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
command: ["/bin/sh", "-ec"]
|
|
||||||
args:
|
|
||||||
- |
|
|
||||||
set -a
|
|
||||||
[ -f /vault/secrets/documentations-postgresql ] && . /vault/secrets/documentations-postgresql
|
|
||||||
[ -f /vault/secrets/documentations-common ] && . /vault/secrets/documentations-common
|
|
||||||
[ -f /vault/secrets/documentations-rsa-public ] && export PUBLIC_KEY="$(cat /vault/secrets/documentations-rsa-public)"
|
|
||||||
set +a
|
|
||||||
exec /app/entrypoint.sh
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 8080
|
|
||||||
protocol: TCP
|
|
||||||
env:
|
|
||||||
- name: POSTGRES_POOL_SIZE
|
|
||||||
value: "20"
|
|
||||||
- name: ZITADEL_ACCOUNT
|
|
||||||
value: /vault/secrets/documentations-zitadel-account-json
|
|
||||||
- name: ZITADEL_DOMAIN
|
|
||||||
value: zitadel-srx.wb.ru
|
|
||||||
- name: USE_ZITADEL
|
|
||||||
value: "0"
|
|
||||||
- name: FLOWS_URL
|
|
||||||
value: http://backend-svc.flows.svc.cluster.local:80
|
|
||||||
- name: LAST_MASTER_BIM
|
|
||||||
value: "36311"
|
|
||||||
- name: API_ADDRESS
|
|
||||||
value: 0.0.0.0:8080
|
|
||||||
- name: API_ADDRESS_FILE
|
|
||||||
value: 0.0.0.0:8080
|
|
||||||
- name: DOCUMENT_PUBLIC_LINK_JWT_EXPIRATION_MINUTES
|
|
||||||
value: "5"
|
|
||||||
- name: ENABLE_SQL_QUERY
|
|
||||||
value: "0"
|
|
||||||
- name: ENABLE_SSL
|
|
||||||
value: "0"
|
|
||||||
- name: WORKSPACE_V2_EXTERNAL_URL
|
|
||||||
value: https://sarex.contour.infra.sarex.tech/workspaces-v2/
|
|
||||||
- name: ENABLE_S3
|
|
||||||
value: "1"
|
|
||||||
- name: CONTAINER_REGISTRY
|
|
||||||
value: cr.yandex/crp3ccidau046kdj8g9q
|
|
||||||
- name: ENVIRONMENT
|
|
||||||
value: production
|
|
||||||
- name: LAST_SLAVE_1_BIM
|
|
||||||
value: "1000000"
|
|
||||||
- name: HOST
|
|
||||||
value: http://backend-api-svc.documentations.svc.cluster.local:80
|
|
||||||
- name: FILE_STREAM_HOST
|
|
||||||
value: sarex.contour.infra.sarex.tech
|
|
||||||
- name: DOCUMENTATION_URL
|
|
||||||
value: http://documentations-api.documentations.svc.cluster.local:80/
|
|
||||||
- name: WORKFLOW_URL
|
|
||||||
value: http://backend-svc.processing.svc.cluster.local:80/
|
|
||||||
- name: WORKSPACE_URL
|
|
||||||
value: http://backend-svc.workspaces.svc.cluster.local:80/
|
|
||||||
- name: BIM_API_URL
|
|
||||||
value: http://bim-api-service.bim.svc.cluster.local:8080/
|
|
||||||
- name: BIM_API_V2_URL
|
|
||||||
value: http://backend-service.bim.svc.cluster.local:8000/
|
|
||||||
- name: WORKSPACE_BUNDLE_VERSION
|
|
||||||
value: v1
|
|
||||||
- name: SYSTEM_LOG_URL
|
|
||||||
value: http://backend-svc.system-log.svc.cluster.local:80
|
|
||||||
- name: DJANGO_HOST
|
|
||||||
value: http://backend-svc.django.svc.cluster.local:80
|
|
||||||
- name: MARKS_PROCESSING_URL
|
|
||||||
value: http://marks-service:8000
|
|
||||||
- name: PUBLIC_LINK_HOST
|
|
||||||
value: https://document-link-srx.wb.ru
|
|
||||||
- name: NAMESPACE
|
|
||||||
value: documentations
|
|
||||||
- name: DJANGO_ORIGINATOR
|
|
||||||
value: docs_prod
|
|
||||||
- name: WORKFLOW_IMAGES_VERSION
|
|
||||||
value: master
|
|
||||||
- name: WORKFLOWS_IMAGES_VERSION
|
|
||||||
value: master
|
|
||||||
- name: S3_SERVICE_ACCOUNT
|
|
||||||
value: /vault/secrets/documentations-s3-account-json
|
|
||||||
- name: READ_WRITE_TIMEOUT_FILE_STREAM
|
|
||||||
value: 6h
|
|
||||||
- name: CACHE_DEFAULT_EXPIRATION
|
|
||||||
value: 60s
|
|
||||||
- name: ENABLE_SMTP
|
|
||||||
value: "True"
|
|
||||||
- name: ENABLE_MAILGUN
|
|
||||||
value: "False"
|
|
||||||
- name: CACHE_CLEANUP_INTERVAL
|
|
||||||
value: 60s
|
|
||||||
- name: ENABLE_AUTH_JWT_IN_URL
|
|
||||||
value: "true"
|
|
||||||
- name: ENABLE_SIGNATURE_IN_URL
|
|
||||||
value: "false"
|
|
||||||
- name: USE_CACHE_IN_FILE_STREAMER
|
|
||||||
value: "0"
|
|
||||||
- name: VALKEY_ADDR
|
|
||||||
value: redis:6379
|
|
||||||
- name: VALKEY_HOST
|
|
||||||
value: redis
|
|
||||||
- name: VALKEY_PORT
|
|
||||||
value: "6379"
|
|
||||||
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: "25m"
|
|
||||||
memory: 128Mi
|
|
||||||
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: regcred
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: backend-api-svc
|
|
||||||
namespace: documentations
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: documentations-api
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 80
|
|
||||||
targetPort: 8080
|
|
||||||
protocol: TCP
|
|
||||||
260
apps/documentations/base/api.yaml
Normal file
260
apps/documentations/base/api.yaml
Normal file
@ -0,0 +1,260 @@
|
|||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: documentations-api
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: "0.1.9"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
enabled: true
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: documentations-vault
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: documentations-api
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
port:
|
||||||
|
_default: 8080
|
||||||
|
command:
|
||||||
|
_default: ["/bin/sh", "-ec"]
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/documentations-postgresql ] && . /vault/secrets/documentations-postgresql
|
||||||
|
[ -f /vault/secrets/documentations-common ] && . /vault/secrets/documentations-common
|
||||||
|
[ -f /vault/secrets/documentations-rsa-public ] && export PUBLIC_KEY="$(cat /vault/secrets/documentations-rsa-public)"
|
||||||
|
set +a
|
||||||
|
exec /app/entrypoint.sh
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: false
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/documentations:prod_a9990430
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: backend-api-svc
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
|
targetPort:
|
||||||
|
_default: 8080
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
envs:
|
||||||
|
- name: POSTGRES_POOL_SIZE
|
||||||
|
value:
|
||||||
|
_default: "20"
|
||||||
|
- name: ZITADEL_ACCOUNT
|
||||||
|
value:
|
||||||
|
_default: /vault/secrets/documentations-zitadel-account-json
|
||||||
|
- name: ZITADEL_DOMAIN
|
||||||
|
value:
|
||||||
|
_default: zitadel-srx.wb.ru
|
||||||
|
- name: USE_ZITADEL
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: FLOWS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.flows.svc.cluster.local:80
|
||||||
|
- name: LAST_MASTER_BIM
|
||||||
|
value:
|
||||||
|
_default: "36311"
|
||||||
|
- name: API_ADDRESS
|
||||||
|
value:
|
||||||
|
_default: 0.0.0.0:8080
|
||||||
|
- name: API_ADDRESS_FILE
|
||||||
|
value:
|
||||||
|
_default: 0.0.0.0:8080
|
||||||
|
- name: DOCUMENT_PUBLIC_LINK_JWT_EXPIRATION_MINUTES
|
||||||
|
value:
|
||||||
|
_default: "5"
|
||||||
|
- name: ENABLE_SQL_QUERY
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: ENABLE_SSL
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: WORKSPACE_V2_EXTERNAL_URL
|
||||||
|
value:
|
||||||
|
_default: https://sarex.contour.infra.sarex.tech/workspaces-v2/
|
||||||
|
- name: ENABLE_S3
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: CONTAINER_REGISTRY
|
||||||
|
value:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q
|
||||||
|
- name: ENVIRONMENT
|
||||||
|
value:
|
||||||
|
_default: production
|
||||||
|
- name: LAST_SLAVE_1_BIM
|
||||||
|
value:
|
||||||
|
_default: "1000000"
|
||||||
|
- name: HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-api-svc.documentations.svc.cluster.local:80
|
||||||
|
- name: FILE_STREAM_HOST
|
||||||
|
value:
|
||||||
|
_default: sarex.contour.infra.sarex.tech
|
||||||
|
- name: DOCUMENTATION_URL
|
||||||
|
value:
|
||||||
|
_default: http://documentations-api.documentations.svc.cluster.local:80/
|
||||||
|
- name: WORKFLOW_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.processing.svc.cluster.local:80/
|
||||||
|
- name: WORKSPACE_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.workspaces.svc.cluster.local:80/
|
||||||
|
- name: BIM_API_URL
|
||||||
|
value:
|
||||||
|
_default: http://bim-api-service.bim.svc.cluster.local:8080/
|
||||||
|
- name: BIM_API_V2_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-service.bim.svc.cluster.local:8000/
|
||||||
|
- name: WORKSPACE_BUNDLE_VERSION
|
||||||
|
value:
|
||||||
|
_default: v1
|
||||||
|
- name: SYSTEM_LOG_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.system-log.svc.cluster.local:80
|
||||||
|
- name: DJANGO_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.django.svc.cluster.local:80
|
||||||
|
- name: MARKS_PROCESSING_URL
|
||||||
|
value:
|
||||||
|
_default: http://marks-service:8000
|
||||||
|
- name: PUBLIC_LINK_HOST
|
||||||
|
value:
|
||||||
|
_default: https://document-link-srx.wb.ru
|
||||||
|
- name: NAMESPACE
|
||||||
|
value:
|
||||||
|
_default: documentations
|
||||||
|
- name: DJANGO_ORIGINATOR
|
||||||
|
value:
|
||||||
|
_default: docs_prod
|
||||||
|
- name: WORKFLOW_IMAGES_VERSION
|
||||||
|
value:
|
||||||
|
_default: master
|
||||||
|
- name: WORKFLOWS_IMAGES_VERSION
|
||||||
|
value:
|
||||||
|
_default: master
|
||||||
|
- name: S3_SERVICE_ACCOUNT
|
||||||
|
value:
|
||||||
|
_default: /vault/secrets/documentations-s3-account-json
|
||||||
|
- name: READ_WRITE_TIMEOUT_FILE_STREAM
|
||||||
|
value:
|
||||||
|
_default: 6h
|
||||||
|
- name: CACHE_DEFAULT_EXPIRATION
|
||||||
|
value:
|
||||||
|
_default: 60s
|
||||||
|
- name: ENABLE_SMTP
|
||||||
|
value:
|
||||||
|
_default: "True"
|
||||||
|
- name: ENABLE_MAILGUN
|
||||||
|
value:
|
||||||
|
_default: "False"
|
||||||
|
- name: CACHE_CLEANUP_INTERVAL
|
||||||
|
value:
|
||||||
|
_default: 60s
|
||||||
|
- name: DOCUMENT_PUBLIC_LINK_JWT_SECRET
|
||||||
|
value:
|
||||||
|
_default: "mock"
|
||||||
|
- name: ENABLE_AUTH_JWT_IN_URL
|
||||||
|
value:
|
||||||
|
_default: "true"
|
||||||
|
- name: ENABLE_SIGNATURE_IN_URL
|
||||||
|
value:
|
||||||
|
_default: "false"
|
||||||
|
- name: USE_CACHE_IN_FILE_STREAMER
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: VALKEY_ADDR
|
||||||
|
value:
|
||||||
|
_default: redis:6379
|
||||||
|
- name: VALKEY_HOST
|
||||||
|
value:
|
||||||
|
_default: redis
|
||||||
|
- name: VALKEY_PORT
|
||||||
|
value:
|
||||||
|
_default: "6379"
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
||||||
|
vault.hashicorp.com/agent-init-first: "true"
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: documentations
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-postgresql: secrets/data/apps/documentations/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-postgresql: |-
|
||||||
|
{{- with secret "secrets/data/apps/documentations/postgres" -}}
|
||||||
|
POSTGRES_ADDRESS={{ index .Data.data "host" }}
|
||||||
|
POSTGRES_PORT={{ index .Data.data "port" }}
|
||||||
|
POSTGRES_DB={{ index .Data.data "database" }}
|
||||||
|
POSTGRES_USER={{ index .Data.data "username" }}
|
||||||
|
POSTGRES_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-common: secrets/data/vault/common/django_auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-common: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
||||||
|
DJANGO_BASIC_AUTH={{ index .Data.data "key" }}
|
||||||
|
DJANGO_BASIC_AUTH_FOR_GET_USER={{ index .Data.data "key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-s3-account-json: secrets/data/vault/common/django_auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-s3-account-json: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
||||||
|
{{ index .Data.data "documentations_s3_service_account_json" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-zitadel-account-json: secrets/data/vault/common/django_auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-zitadel-account-json: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
||||||
|
{{ index .Data.data "documentations_zitadel_account_json" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-rsa-public: secrets/data/vault/common/rsa_keys
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-rsa-public: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
{{- end -}}
|
||||||
@ -1,173 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: documentations-filestream
|
|
||||||
namespace: documentations
|
|
||||||
labels:
|
|
||||||
app: documentations-filestream
|
|
||||||
service: documentations-filestream
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: documentations-filestream
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: documentations-filestream
|
|
||||||
service: documentations-filestream
|
|
||||||
annotations:
|
|
||||||
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
|
||||||
vault.hashicorp.com/agent-init-first: "true"
|
|
||||||
vault.hashicorp.com/agent-inject: "true"
|
|
||||||
vault.hashicorp.com/agent-pre-populate-only: "true"
|
|
||||||
vault.hashicorp.com/auth-path: auth/kubernetes
|
|
||||||
vault.hashicorp.com/role: documentations
|
|
||||||
vault.hashicorp.com/agent-inject-secret-documentations-postgresql: secrets/data/postgresql/apps/documentations
|
|
||||||
vault.hashicorp.com/agent-inject-template-documentations-postgresql: |-
|
|
||||||
{{- with secret "secrets/data/postgresql/apps/documentations" -}}
|
|
||||||
POSTGRES_ADDRESS=postgresql.documentations.svc.cluster.local
|
|
||||||
POSTGRES_PORT=5432
|
|
||||||
POSTGRES_DB=documentations_db
|
|
||||||
POSTGRES_USER={{ index .Data.data "username" }}
|
|
||||||
POSTGRES_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-documentations-common: secrets/data/vault/common/django_auth
|
|
||||||
vault.hashicorp.com/agent-inject-template-documentations-common: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
|
||||||
DJANGO_BASIC_AUTH={{ index .Data.data "key" }}
|
|
||||||
DJANGO_BASIC_AUTH_FOR_GET_USER={{ index .Data.data "key" }}
|
|
||||||
DOCUMENT_PUBLIC_LINK_JWT_SECRET={{ index .Data.data "documentations_public_link_jwt_secret" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-documentations-s3-account-json: secrets/data/vault/common/django_auth
|
|
||||||
vault.hashicorp.com/agent-inject-template-documentations-s3-account-json: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
|
||||||
{{ index .Data.data "documentations_s3_service_account_json" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-documentations-zitadel-account-json: secrets/data/vault/common/django_auth
|
|
||||||
vault.hashicorp.com/agent-inject-template-documentations-zitadel-account-json: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
|
||||||
{{ index .Data.data "documentations_zitadel_account_json" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-documentations-rsa-public: secrets/data/vault/common/rsa_keys
|
|
||||||
vault.hashicorp.com/agent-inject-template-documentations-rsa-public: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
|
||||||
{{ index .Data.data "public_key" }}
|
|
||||||
{{- end -}}
|
|
||||||
spec:
|
|
||||||
serviceAccountName: documentations-vault
|
|
||||||
containers:
|
|
||||||
- name: documentations-filestream
|
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/documentations-api-files:prod_a9990430
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
command: ["/bin/sh", "-ec"]
|
|
||||||
args:
|
|
||||||
- |
|
|
||||||
set -a
|
|
||||||
[ -f /vault/secrets/documentations-postgresql ] && . /vault/secrets/documentations-postgresql
|
|
||||||
[ -f /vault/secrets/documentations-common ] && . /vault/secrets/documentations-common
|
|
||||||
[ -f /vault/secrets/documentations-rsa-public ] && export PUBLIC_KEY="$(cat /vault/secrets/documentations-rsa-public)"
|
|
||||||
set +a
|
|
||||||
exec /app/file_entrypoint.sh
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 8080
|
|
||||||
protocol: TCP
|
|
||||||
env:
|
|
||||||
- name: POSTGRES_POOL_SIZE
|
|
||||||
value: "20"
|
|
||||||
- name: ZITADEL_ACCOUNT
|
|
||||||
value: /vault/secrets/documentations-zitadel-account-json
|
|
||||||
- name: ZITADEL_DOMAIN
|
|
||||||
value: zitadel-srx.wb.ru
|
|
||||||
- name: USE_ZITADEL
|
|
||||||
value: "0"
|
|
||||||
- name: FLOWS_URL
|
|
||||||
value: http://backend-svc.flows.svc.cluster.local:80
|
|
||||||
- name: LAST_MASTER_BIM
|
|
||||||
value: "36311"
|
|
||||||
- name: API_ADDRESS
|
|
||||||
value: 0.0.0.0:8080
|
|
||||||
- name: API_ADDRESS_FILE
|
|
||||||
value: 0.0.0.0:8080
|
|
||||||
- name: DOCUMENT_PUBLIC_LINK_JWT_EXPIRATION_MINUTES
|
|
||||||
value: "5"
|
|
||||||
- name: ENABLE_SQL_QUERY
|
|
||||||
value: "0"
|
|
||||||
- name: ENABLE_SSL
|
|
||||||
value: "0"
|
|
||||||
- name: WORKSPACE_V2_EXTERNAL_URL
|
|
||||||
value: https://srx.wb.ru/workspaces-v2/
|
|
||||||
- name: ENABLE_S3
|
|
||||||
value: "1"
|
|
||||||
- name: CONTAINER_REGISTRY
|
|
||||||
value: cr.yandex/crp3ccidau046kdj8g9q
|
|
||||||
- name: ENVIRONMENT
|
|
||||||
value: production
|
|
||||||
- name: LAST_SLAVE_1_BIM
|
|
||||||
value: "1000000"
|
|
||||||
- name: HOST
|
|
||||||
value: http://backend-api-svc.documentations.svc.cluster.local:80
|
|
||||||
- name: FILE_STREAM_HOST
|
|
||||||
value: srx.wb.ru
|
|
||||||
- name: DOCUMENTATION_URL
|
|
||||||
value: http://backend-api-svc.documentations.svc.cluster.local:80/
|
|
||||||
- name: WORKFLOW_URL
|
|
||||||
value: http://workflows-api-service.workflow.svc.cluster.local:8000/
|
|
||||||
- name: WORKSPACE_URL
|
|
||||||
value: http://backend-svc.workspaces.svc.cluster.local:80/
|
|
||||||
- name: BIM_API_URL
|
|
||||||
value: http://bim-api-service.bim.svc.cluster.local:8080/
|
|
||||||
- name: BIM_API_V2_URL
|
|
||||||
value: http://backend-service.bim.svc.cluster.local:8000/
|
|
||||||
- name: WORKSPACE_BUNDLE_VERSION
|
|
||||||
value: v1
|
|
||||||
- name: SYSTEM_LOG_URL
|
|
||||||
value: http://api-service.system-log.svc.cluster.local:80
|
|
||||||
- name: DJANGO_HOST
|
|
||||||
value: http://backend-svc.django.svc.cluster.local:80
|
|
||||||
- name: MARKS_PROCESSING_URL
|
|
||||||
value: http://marks-service:8000
|
|
||||||
- name: PUBLIC_LINK_HOST
|
|
||||||
value: https://document-link-srx.wb.ru
|
|
||||||
- name: NAMESPACE
|
|
||||||
value: documentations
|
|
||||||
- name: DJANGO_ORIGINATOR
|
|
||||||
value: docs_prod
|
|
||||||
- name: WORKFLOW_IMAGES_VERSION
|
|
||||||
value: master
|
|
||||||
- name: WORKFLOWS_IMAGES_VERSION
|
|
||||||
value: master
|
|
||||||
- name: S3_SERVICE_ACCOUNT
|
|
||||||
value: /vault/secrets/documentations-s3-account-json
|
|
||||||
- name: READ_WRITE_TIMEOUT_FILE_STREAM
|
|
||||||
value: 6h
|
|
||||||
- name: CACHE_DEFAULT_EXPIRATION
|
|
||||||
value: 60s
|
|
||||||
- name: ENABLE_SMTP
|
|
||||||
value: "True"
|
|
||||||
- name: ENABLE_MAILGUN
|
|
||||||
value: "False"
|
|
||||||
- name: CACHE_CLEANUP_INTERVAL
|
|
||||||
value: 60s
|
|
||||||
- name: ENABLE_AUTH_JWT_IN_URL
|
|
||||||
value: "false"
|
|
||||||
- name: ENABLE_SIGNATURE_IN_URL
|
|
||||||
value: "true"
|
|
||||||
- name: USE_CACHE_IN_FILE_STREAMER
|
|
||||||
value: "0"
|
|
||||||
- name: VALKEY_ADDR
|
|
||||||
value: redis:6379
|
|
||||||
- name: VALKEY_HOST
|
|
||||||
value: redis
|
|
||||||
- name: VALKEY_PORT
|
|
||||||
value: "6379"
|
|
||||||
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: "25m"
|
|
||||||
memory: 128Mi
|
|
||||||
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: regcred
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: backend-filestream-svc
|
|
||||||
namespace: documentations
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: documentations-filestream
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 80
|
|
||||||
targetPort: 8080
|
|
||||||
protocol: TCP
|
|
||||||
260
apps/documentations/base/filestream.yaml
Normal file
260
apps/documentations/base/filestream.yaml
Normal file
@ -0,0 +1,260 @@
|
|||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: documentations-filestream
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: "0.1.9"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
enabled: true
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: documentations-vault
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: documentations-filestream
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
port:
|
||||||
|
_default: 8080
|
||||||
|
command:
|
||||||
|
_default: ["/bin/sh", "-ec"]
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/documentations-postgresql ] && . /vault/secrets/documentations-postgresql
|
||||||
|
[ -f /vault/secrets/documentations-common ] && . /vault/secrets/documentations-common
|
||||||
|
[ -f /vault/secrets/documentations-rsa-public ] && export PUBLIC_KEY="$(cat /vault/secrets/documentations-rsa-public)"
|
||||||
|
set +a
|
||||||
|
exec /app/file_entrypoint.sh
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: false
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/documentations-api-files:prod_a9990430
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: backend-filestream-svc
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
|
targetPort:
|
||||||
|
_default: 8080
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
envs:
|
||||||
|
- name: POSTGRES_POOL_SIZE
|
||||||
|
value:
|
||||||
|
_default: "20"
|
||||||
|
- name: ZITADEL_ACCOUNT
|
||||||
|
value:
|
||||||
|
_default: /vault/secrets/documentations-zitadel-account-json
|
||||||
|
- name: ZITADEL_DOMAIN
|
||||||
|
value:
|
||||||
|
_default: zitadel-srx.wb.ru
|
||||||
|
- name: USE_ZITADEL
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: FLOWS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.flows.svc.cluster.local:80
|
||||||
|
- name: LAST_MASTER_BIM
|
||||||
|
value:
|
||||||
|
_default: "36311"
|
||||||
|
- name: API_ADDRESS
|
||||||
|
value:
|
||||||
|
_default: 0.0.0.0:8080
|
||||||
|
- name: API_ADDRESS_FILE
|
||||||
|
value:
|
||||||
|
_default: 0.0.0.0:8080
|
||||||
|
- name: DOCUMENT_PUBLIC_LINK_JWT_EXPIRATION_MINUTES
|
||||||
|
value:
|
||||||
|
_default: "5"
|
||||||
|
- name: ENABLE_SQL_QUERY
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: ENABLE_SSL
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: WORKSPACE_V2_EXTERNAL_URL
|
||||||
|
value:
|
||||||
|
_default: https://srx.wb.ru/workspaces-v2/
|
||||||
|
- name: ENABLE_S3
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: CONTAINER_REGISTRY
|
||||||
|
value:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q
|
||||||
|
- name: ENVIRONMENT
|
||||||
|
value:
|
||||||
|
_default: production
|
||||||
|
- name: LAST_SLAVE_1_BIM
|
||||||
|
value:
|
||||||
|
_default: "1000000"
|
||||||
|
- name: HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-api-svc.documentations.svc.cluster.local:80
|
||||||
|
- name: FILE_STREAM_HOST
|
||||||
|
value:
|
||||||
|
_default: srx.wb.ru
|
||||||
|
- name: DOCUMENTATION_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-api-svc.documentations.svc.cluster.local:80/
|
||||||
|
- name: WORKFLOW_URL
|
||||||
|
value:
|
||||||
|
_default: http://workflows-api-service.workflow.svc.cluster.local:8000/
|
||||||
|
- name: WORKSPACE_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.workspaces.svc.cluster.local:80/
|
||||||
|
- name: BIM_API_URL
|
||||||
|
value:
|
||||||
|
_default: http://bim-api-service.bim.svc.cluster.local:8080/
|
||||||
|
- name: BIM_API_V2_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-service.bim.svc.cluster.local:8000/
|
||||||
|
- name: WORKSPACE_BUNDLE_VERSION
|
||||||
|
value:
|
||||||
|
_default: v1
|
||||||
|
- name: SYSTEM_LOG_URL
|
||||||
|
value:
|
||||||
|
_default: http://api-service.system-log.svc.cluster.local:80
|
||||||
|
- name: DJANGO_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.django.svc.cluster.local:80
|
||||||
|
- name: MARKS_PROCESSING_URL
|
||||||
|
value:
|
||||||
|
_default: http://marks-service:8000
|
||||||
|
- name: PUBLIC_LINK_HOST
|
||||||
|
value:
|
||||||
|
_default: https://document-link-srx.wb.ru
|
||||||
|
- name: NAMESPACE
|
||||||
|
value:
|
||||||
|
_default: documentations
|
||||||
|
- name: DJANGO_ORIGINATOR
|
||||||
|
value:
|
||||||
|
_default: docs_prod
|
||||||
|
- name: WORKFLOW_IMAGES_VERSION
|
||||||
|
value:
|
||||||
|
_default: master
|
||||||
|
- name: WORKFLOWS_IMAGES_VERSION
|
||||||
|
value:
|
||||||
|
_default: master
|
||||||
|
- name: S3_SERVICE_ACCOUNT
|
||||||
|
value:
|
||||||
|
_default: /vault/secrets/documentations-s3-account-json
|
||||||
|
- name: READ_WRITE_TIMEOUT_FILE_STREAM
|
||||||
|
value:
|
||||||
|
_default: 6h
|
||||||
|
- name: CACHE_DEFAULT_EXPIRATION
|
||||||
|
value:
|
||||||
|
_default: 60s
|
||||||
|
- name: ENABLE_SMTP
|
||||||
|
value:
|
||||||
|
_default: "True"
|
||||||
|
- name: ENABLE_MAILGUN
|
||||||
|
value:
|
||||||
|
_default: "False"
|
||||||
|
- name: CACHE_CLEANUP_INTERVAL
|
||||||
|
value:
|
||||||
|
_default: 60s
|
||||||
|
- name: ENABLE_AUTH_JWT_IN_URL
|
||||||
|
value:
|
||||||
|
_default: "false"
|
||||||
|
- name: ENABLE_SIGNATURE_IN_URL
|
||||||
|
value:
|
||||||
|
_default: "true"
|
||||||
|
- name: DOCUMENT_PUBLIC_LINK_JWT_SECRET
|
||||||
|
value:
|
||||||
|
_default: "mock"
|
||||||
|
- name: USE_CACHE_IN_FILE_STREAMER
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: VALKEY_ADDR
|
||||||
|
value:
|
||||||
|
_default: redis:6379
|
||||||
|
- name: VALKEY_HOST
|
||||||
|
value:
|
||||||
|
_default: redis
|
||||||
|
- name: VALKEY_PORT
|
||||||
|
value:
|
||||||
|
_default: "6379"
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
||||||
|
vault.hashicorp.com/agent-init-first: "true"
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: documentations
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-postgresql: secrets/data/apps/documentations/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-postgresql: |-
|
||||||
|
{{- with secret "secrets/data/apps/documentations/postgres" -}}
|
||||||
|
POSTGRES_ADDRESS={{ index .Data.data "host" }}
|
||||||
|
POSTGRES_PORT={{ index .Data.data "port" }}
|
||||||
|
POSTGRES_DB={{ index .Data.data "database" }}
|
||||||
|
POSTGRES_USER={{ index .Data.data "username" }}
|
||||||
|
POSTGRES_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-common: secrets/data/vault/common/django_auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-common: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
||||||
|
DJANGO_BASIC_AUTH={{ index .Data.data "key" }}
|
||||||
|
DJANGO_BASIC_AUTH_FOR_GET_USER={{ index .Data.data "key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-s3-account-json: secrets/data/vault/common/django_auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-s3-account-json: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
||||||
|
{{ index .Data.data "documentations_s3_service_account_json" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-zitadel-account-json: secrets/data/vault/common/django_auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-zitadel-account-json: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
||||||
|
{{ index .Data.data "documentations_zitadel_account_json" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-rsa-public: secrets/data/vault/common/rsa_keys
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-rsa-public: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
{{- end -}}
|
||||||
@ -1,32 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: frontend
|
|
||||||
namespace: documentations
|
|
||||||
labels:
|
|
||||||
app: frontend
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: frontend
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: frontend
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: frontend
|
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/documentation-frontend-app:brusnika_ae1bb076
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 80
|
|
||||||
protocol: TCP
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 25m
|
|
||||||
memory: 100Mi
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: regcred
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: frontend-svc
|
|
||||||
namespace: documentations
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: frontend
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 80
|
|
||||||
targetPort: 80
|
|
||||||
protocol: TCP
|
|
||||||
70
apps/documentations/base/frontend.yaml
Normal file
70
apps/documentations/base/frontend.yaml
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: frontend
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: "0.1.9"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
frontend:
|
||||||
|
enabled: true
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/documentation-frontend-app:brusnika_ae1bb076
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: frontend
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 100Mi
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: false
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: frontend-svc
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
|
targetPort:
|
||||||
|
_default: 80
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
@ -4,12 +4,9 @@ kind: Kustomization
|
|||||||
namespace: documentations
|
namespace: documentations
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
- serviceaccount.yaml
|
- api.yaml
|
||||||
- api-deployment.yaml
|
- filestream.yaml
|
||||||
- pdm-deployment.yaml
|
- frontend.yaml
|
||||||
- filestream-deployment.yaml
|
- pdm.yaml
|
||||||
- frontend-deployment.yaml
|
- redis-deployment.yaml
|
||||||
- api-service.yaml
|
- redis-service.yaml
|
||||||
- pdm-service.yaml
|
|
||||||
- filestream-service.yaml
|
|
||||||
- frontend-service.yaml
|
|
||||||
|
|||||||
@ -5,3 +5,4 @@ metadata:
|
|||||||
name: documentations
|
name: documentations
|
||||||
labels:
|
labels:
|
||||||
istio-injection: enabled
|
istio-injection: enabled
|
||||||
|
security.deckhouse.io/pod-policy: privileged
|
||||||
|
|||||||
@ -1,181 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: pdm-api
|
|
||||||
namespace: documentations
|
|
||||||
labels:
|
|
||||||
app: pdm-api
|
|
||||||
service: pdm-api
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: pdm-api
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: pdm-api
|
|
||||||
service: pdm-api
|
|
||||||
annotations:
|
|
||||||
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
|
||||||
vault.hashicorp.com/agent-init-first: "true"
|
|
||||||
vault.hashicorp.com/agent-inject: "true"
|
|
||||||
vault.hashicorp.com/agent-pre-populate-only: "true"
|
|
||||||
vault.hashicorp.com/auth-path: auth/kubernetes
|
|
||||||
vault.hashicorp.com/role: documentations
|
|
||||||
vault.hashicorp.com/agent-inject-secret-documentations-postgresql: secrets/data/postgresql/apps/documentations
|
|
||||||
vault.hashicorp.com/agent-inject-template-documentations-postgresql: |-
|
|
||||||
{{- with secret "secrets/data/postgresql/apps/documentations" -}}
|
|
||||||
POSTGRES_ADDRESS=postgresql.documentations.svc.cluster.local
|
|
||||||
POSTGRES_PORT=5432
|
|
||||||
POSTGRES_DB=documentations_db
|
|
||||||
POSTGRES_USER={{ index .Data.data "username" }}
|
|
||||||
POSTGRES_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-documentations-common: secrets/data/vault/common/django_auth
|
|
||||||
vault.hashicorp.com/agent-inject-template-documentations-common: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
|
||||||
DJANGO_BASIC_AUTH={{ index .Data.data "key" }}
|
|
||||||
RELEASES_TOKEN={{ index .Data.data "documentations_releases_token" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-documentations-s3-account-json: secrets/data/vault/common/django_auth
|
|
||||||
vault.hashicorp.com/agent-inject-template-documentations-s3-account-json: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
|
||||||
{{ index .Data.data "documentations_s3_service_account_json" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-documentations-rsa-public: secrets/data/vault/common/rsa_keys
|
|
||||||
vault.hashicorp.com/agent-inject-template-documentations-rsa-public: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
|
||||||
{{ index .Data.data "public_key" }}
|
|
||||||
{{- end -}}
|
|
||||||
spec:
|
|
||||||
serviceAccountName: documentations-vault
|
|
||||||
containers:
|
|
||||||
- name: pdm-api
|
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/pdmv2:prod_38958427
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
command: ["/bin/sh", "-ec"]
|
|
||||||
args:
|
|
||||||
- |
|
|
||||||
set -a
|
|
||||||
[ -f /vault/secrets/documentations-postgresql ] && . /vault/secrets/documentations-postgresql
|
|
||||||
[ -f /vault/secrets/documentations-common ] && . /vault/secrets/documentations-common
|
|
||||||
[ -f /vault/secrets/documentations-rsa-public ] && export PUBLIC_KEY="$(cat /vault/secrets/documentations-rsa-public)"
|
|
||||||
set +a
|
|
||||||
exec ./httpserver
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 8080
|
|
||||||
protocol: TCP
|
|
||||||
env:
|
|
||||||
- name: USE_EXPERIMENTAL
|
|
||||||
value: "true"
|
|
||||||
- name: POSTGRES_POOL_SIZE
|
|
||||||
value: "20"
|
|
||||||
- name: TRANSMITTALS_BASE_URL
|
|
||||||
value: mock
|
|
||||||
- name: API_ADDRESS
|
|
||||||
value: 0.0.0.0:8080
|
|
||||||
- name: API_ADDRESS_FILE
|
|
||||||
value: 0.0.0.0:8080
|
|
||||||
- name: BUCKET_NAME
|
|
||||||
value: attachments-storage
|
|
||||||
- name: API_HOST_PREFIX
|
|
||||||
value: /
|
|
||||||
- name: APP_NAME
|
|
||||||
value: pdm_v2
|
|
||||||
- name: APP_VERSION
|
|
||||||
value: 0.0.1
|
|
||||||
- name: ENABLE_PERMISSIONS_FILTER
|
|
||||||
value: "1"
|
|
||||||
- name: PERMISSIONS_FILTER_COMPANIES
|
|
||||||
value: '[1]'
|
|
||||||
- name: TRANSMITTALS_ENABLE
|
|
||||||
value: "false"
|
|
||||||
- name: DRAWINGS_INTERNAL_URL
|
|
||||||
value: http://drawings-api-service.drawings.svc.cluster.local:80
|
|
||||||
- name: ATTACHMENTS_URL
|
|
||||||
value: http://attachments-service.attachments.svc.cluster.local:8000
|
|
||||||
- name: BIM_API_V2_URL
|
|
||||||
value: http://backend-service.bim.svc.cluster.local:8000/
|
|
||||||
- name: BIM_V2_HOST
|
|
||||||
value: http://backend-service.bim.svc.cluster.local:8000/
|
|
||||||
- name: CACHE_CLEANUP_INTERVAL
|
|
||||||
value: 60s
|
|
||||||
- name: CACHE_DEFAULT_EXPIRATION
|
|
||||||
value: 60s
|
|
||||||
- name: DJANGO_HOST
|
|
||||||
value: http://backend-svc.django.svc.cluster.local:80
|
|
||||||
- name: DJANGO_ORIGINATOR
|
|
||||||
value: docs_prod
|
|
||||||
- name: DOCUMENTATION_URL
|
|
||||||
value: http://backend-api-svc.documentations.svc.cluster.local:80/
|
|
||||||
- name: EAV_URL
|
|
||||||
value: http://backend-svc.eav.svc.cluster.local:80
|
|
||||||
- name: ENABLE_OBSERVABILITY
|
|
||||||
value: "false"
|
|
||||||
- name: ENABLE_S3
|
|
||||||
value: "1"
|
|
||||||
- name: ENABLE_SSL
|
|
||||||
value: "0"
|
|
||||||
- name: ENVIRONMENT
|
|
||||||
value: prod
|
|
||||||
- name: FLOWS_URL
|
|
||||||
value: http://backend-svc.flows.svc.cluster.local:80
|
|
||||||
- name: HEIGHT_THUMB_ATTACHMENTS
|
|
||||||
value: "300"
|
|
||||||
- name: HEIGHT_THUMB_STATES
|
|
||||||
value: "73"
|
|
||||||
- name: HTTP_PORT
|
|
||||||
value: "8080"
|
|
||||||
- name: INSPECTIONS_URL
|
|
||||||
value: http://inspections-service.inspections.svc.cluster.local:80
|
|
||||||
- name: LOG_LEVEL
|
|
||||||
value: INFO
|
|
||||||
- name: NOTES_URL
|
|
||||||
- name: OBSERVABILITY_COLLECTOR_ENDPOINT
|
|
||||||
value: temp
|
|
||||||
- name: READ_WRITE_TIMEOUT_FILE_STREAM
|
|
||||||
value: 6h
|
|
||||||
- name: RELEASES_URL
|
|
||||||
value: https://gitlab.com
|
|
||||||
- name: REMARKS_URL
|
|
||||||
value: http://remarks-static-service.remarks.svc.cluster.local:8080/remarks
|
|
||||||
- name: RESOURCES_URL
|
|
||||||
value: http://backend-svc.resources.svc.cluster.local:80
|
|
||||||
- name: S3_SERVICE_ACCOUNT
|
|
||||||
value: /vault/secrets/documentations-s3-account-json
|
|
||||||
- name: STATES_URL
|
|
||||||
value: http://backend-svc.workspaces.svc.cluster.local:80/
|
|
||||||
- name: SUBSCRIPTIONS_URL
|
|
||||||
value: http://backend-svc.subscriptions.svc.cluster.local:80
|
|
||||||
- name: SYSTEM_LOG_URL
|
|
||||||
value: http://api-service.system-log.svc.cluster.local:80
|
|
||||||
- name: TARGET_URL
|
|
||||||
value: http://backend-svc.django.svc.cluster.local:80
|
|
||||||
- name: USE_CACHE_IN_FILE_STREAMER
|
|
||||||
value: "1"
|
|
||||||
- name: USE_SUBSCRIPTIONS
|
|
||||||
value: "false"
|
|
||||||
- name: WIDTH_THUMB_ATTACHMENTS
|
|
||||||
value: "300"
|
|
||||||
- name: WIDTH_THUMB_STATES
|
|
||||||
value: "120"
|
|
||||||
- name: WORKFLOWS_IMAGES_VERSION
|
|
||||||
value: master
|
|
||||||
- name: WORKFLOW_IMAGES_VERSION
|
|
||||||
value: master
|
|
||||||
- name: WORKFLOW_URL
|
|
||||||
value: http://backend-svc.processing.svc.cluster.local:80/
|
|
||||||
- name: WORKSPACE_BUNDLE_VERSION
|
|
||||||
value: v1
|
|
||||||
- name: WORKSPACE_URL
|
|
||||||
value: http://backend-svc.workspaces.svc.cluster.local:80/
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: "25m"
|
|
||||||
memory: 128Mi
|
|
||||||
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: regcred
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: pdm-svc
|
|
||||||
namespace: documentations
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: pdm-api
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 80
|
|
||||||
targetPort: 8080
|
|
||||||
protocol: TCP
|
|
||||||
278
apps/documentations/base/pdm.yaml
Normal file
278
apps/documentations/base/pdm.yaml
Normal file
@ -0,0 +1,278 @@
|
|||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: pdm-api
|
||||||
|
namespace: documentations
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: "0.1.9"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
enabled: true
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: documentations-vault
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: pdm-api
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
port:
|
||||||
|
_default: 8080
|
||||||
|
command:
|
||||||
|
_default: ["/bin/sh", "-ec"]
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/documentations-postgresql ] && . /vault/secrets/documentations-postgresql
|
||||||
|
[ -f /vault/secrets/documentations-common ] && . /vault/secrets/documentations-common
|
||||||
|
[ -f /vault/secrets/documentations-rsa-public ] && export PUBLIC_KEY="$(cat /vault/secrets/documentations-rsa-public)"
|
||||||
|
set +a
|
||||||
|
exec ./httpserver
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: false
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/pdmv2:prod_38958427
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: pdm-svc
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
|
targetPort:
|
||||||
|
_default: 8080
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
envs:
|
||||||
|
- name: USE_EXPERIMENTAL
|
||||||
|
value:
|
||||||
|
_default: "true"
|
||||||
|
- name: POSTGRES_POOL_SIZE
|
||||||
|
value:
|
||||||
|
_default: "20"
|
||||||
|
- name: TRANSMITTALS_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: mock
|
||||||
|
- name: API_ADDRESS
|
||||||
|
value:
|
||||||
|
_default: 0.0.0.0:8080
|
||||||
|
- name: API_ADDRESS_FILE
|
||||||
|
value:
|
||||||
|
_default: 0.0.0.0:8080
|
||||||
|
- name: BUCKET_NAME
|
||||||
|
value:
|
||||||
|
_default: attachments-storage
|
||||||
|
- name: API_HOST_PREFIX
|
||||||
|
value:
|
||||||
|
_default: /
|
||||||
|
- name: APP_NAME
|
||||||
|
value:
|
||||||
|
_default: pdm_v2
|
||||||
|
- name: APP_VERSION
|
||||||
|
value:
|
||||||
|
_default: "0.0.1"
|
||||||
|
- name: ENABLE_PERMISSIONS_FILTER
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: PERMISSIONS_FILTER_COMPANIES
|
||||||
|
value:
|
||||||
|
_default: "[1]"
|
||||||
|
- name: TRANSMITTALS_ENABLE
|
||||||
|
value:
|
||||||
|
_default: "false"
|
||||||
|
- name: DRAWINGS_INTERNAL_URL
|
||||||
|
value:
|
||||||
|
_default: http://drawings-api-service.drawings.svc.cluster.local:80
|
||||||
|
- name: ATTACHMENTS_URL
|
||||||
|
value:
|
||||||
|
_default: http://attachments-service.attachments.svc.cluster.local:8000
|
||||||
|
- name: BIM_API_V2_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-service.bim.svc.cluster.local:8000/
|
||||||
|
- name: BIM_V2_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-service.bim.svc.cluster.local:8000/
|
||||||
|
- name: CACHE_CLEANUP_INTERVAL
|
||||||
|
value:
|
||||||
|
_default: 60s
|
||||||
|
- name: CACHE_DEFAULT_EXPIRATION
|
||||||
|
value:
|
||||||
|
_default: 60s
|
||||||
|
- name: DJANGO_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.django.svc.cluster.local:80
|
||||||
|
- name: DJANGO_ORIGINATOR
|
||||||
|
value:
|
||||||
|
_default: docs_prod
|
||||||
|
- name: DOCUMENTATION_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-api-svc.documentations.svc.cluster.local:80/
|
||||||
|
- name: EAV_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.eav.svc.cluster.local:80
|
||||||
|
- name: ENABLE_OBSERVABILITY
|
||||||
|
value:
|
||||||
|
_default: "false"
|
||||||
|
- name: ENABLE_S3
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: ENABLE_SSL
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: ENVIRONMENT
|
||||||
|
value:
|
||||||
|
_default: prod
|
||||||
|
- name: FLOWS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.flows.svc.cluster.local:80
|
||||||
|
- name: HEIGHT_THUMB_ATTACHMENTS
|
||||||
|
value:
|
||||||
|
_default: "300"
|
||||||
|
- name: HEIGHT_THUMB_STATES
|
||||||
|
value:
|
||||||
|
_default: "73"
|
||||||
|
- name: HTTP_PORT
|
||||||
|
value:
|
||||||
|
_default: "8080"
|
||||||
|
- name: INSPECTIONS_URL
|
||||||
|
value:
|
||||||
|
_default: http://inspections-service.inspections.svc.cluster.local:80
|
||||||
|
- name: LOG_LEVEL
|
||||||
|
value:
|
||||||
|
_default: INFO
|
||||||
|
- name: NOTES_URL
|
||||||
|
value:
|
||||||
|
_default: ""
|
||||||
|
- name: OBSERVABILITY_COLLECTOR_ENDPOINT
|
||||||
|
value:
|
||||||
|
_default: temp
|
||||||
|
- name: READ_WRITE_TIMEOUT_FILE_STREAM
|
||||||
|
value:
|
||||||
|
_default: 6h
|
||||||
|
- name: RELEASES_URL
|
||||||
|
value:
|
||||||
|
_default: https://gitlab.com
|
||||||
|
- name: REMARKS_URL
|
||||||
|
value:
|
||||||
|
_default: http://remarks-static-service.remarks.svc.cluster.local:8080/remarks
|
||||||
|
- name: RESOURCES_URL
|
||||||
|
value:
|
||||||
|
_default: http://iam-backend.iam.svc.cluster.local:8000
|
||||||
|
- name: S3_SERVICE_ACCOUNT
|
||||||
|
value:
|
||||||
|
_default: /vault/secrets/documentations-s3-account-json
|
||||||
|
- name: STATES_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.workspaces.svc.cluster.local:80/
|
||||||
|
- name: SUBSCRIPTIONS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.subscriptions.svc.cluster.local:80
|
||||||
|
- name: SYSTEM_LOG_URL
|
||||||
|
value:
|
||||||
|
_default: http://api-service.system-log.svc.cluster.local:80
|
||||||
|
- name: TARGET_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.django.svc.cluster.local:80
|
||||||
|
- name: USE_CACHE_IN_FILE_STREAMER
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: USE_SUBSCRIPTIONS
|
||||||
|
value:
|
||||||
|
_default: "false"
|
||||||
|
- name: WIDTH_THUMB_ATTACHMENTS
|
||||||
|
value:
|
||||||
|
_default: "300"
|
||||||
|
- name: WIDTH_THUMB_STATES
|
||||||
|
value:
|
||||||
|
_default: "120"
|
||||||
|
- name: WORKFLOWS_IMAGES_VERSION
|
||||||
|
value:
|
||||||
|
_default: master
|
||||||
|
- name: WORKFLOW_IMAGES_VERSION
|
||||||
|
value:
|
||||||
|
_default: master
|
||||||
|
- name: RELEASES_TOKEN
|
||||||
|
value:
|
||||||
|
_default: "mock"
|
||||||
|
- name: WORKFLOW_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.processing.svc.cluster.local:80/
|
||||||
|
- name: WORKSPACE_BUNDLE_VERSION
|
||||||
|
value:
|
||||||
|
_default: v1
|
||||||
|
- name: WORKSPACE_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.workspaces.svc.cluster.local:80/
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
||||||
|
vault.hashicorp.com/agent-init-first: "true"
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: documentations
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-postgresql: secrets/data/apps/documentations/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-postgresql: |-
|
||||||
|
{{- with secret "secrets/data/apps/documentations/postgres" -}}
|
||||||
|
POSTGRES_ADDRESS={{ index .Data.data "host" }}
|
||||||
|
POSTGRES_PORT={{ index .Data.data "port" }}
|
||||||
|
POSTGRES_DB={{ index .Data.data "database" }}
|
||||||
|
POSTGRES_USER={{ index .Data.data "username" }}
|
||||||
|
POSTGRES_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-common: secrets/data/vault/common/django_auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-common: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
||||||
|
DJANGO_BASIC_AUTH={{ index .Data.data "key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-s3-account-json: secrets/data/vault/common/django_auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-s3-account-json: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
||||||
|
{{ index .Data.data "documentations_s3_service_account_json" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-documentations-rsa-public: secrets/data/vault/common/rsa_keys
|
||||||
|
vault.hashicorp.com/agent-inject-template-documentations-rsa-public: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
{{- end -}}
|
||||||
@ -1,5 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: documentations-vault
|
|
||||||
namespace: documentations
|
|
||||||
6
apps/documentations/d8-ugmk-prod/kustomization.yaml
Normal file
6
apps/documentations/d8-ugmk-prod/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: documentations
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
@ -1,110 +1,161 @@
|
|||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
metadata:
|
metadata:
|
||||||
name: documentations-api
|
name: documentations-api
|
||||||
namespace: documentations
|
namespace: documentations
|
||||||
spec:
|
spec:
|
||||||
replicas: 4
|
values:
|
||||||
template:
|
services:
|
||||||
spec:
|
backend:
|
||||||
containers:
|
deployment:
|
||||||
- name: documentations-api
|
replicaCount:
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/documentations:prod_54880e92
|
_default: 4
|
||||||
env:
|
image:
|
||||||
- name: PUBLIC_LINK_HOST
|
name:
|
||||||
value: https://document-link.sarex.dsinv.ru
|
_default: cr.yandex/crp3ccidau046kdj8g9q/documentations:prod_54880e92
|
||||||
- name: POSTGRES_ADDRESS
|
envs:
|
||||||
value: postgres-service
|
- name: PUBLIC_LINK_HOST
|
||||||
- name: POSTGRES_PORT
|
value:
|
||||||
value: '5432'
|
_default: https://document-link.sarex.dsinv.ru
|
||||||
- name: POSTGRES_DB
|
- name: POSTGRES_ADDRESS
|
||||||
value: documentations
|
value:
|
||||||
- name: POSTGRES_POOL_SIZE
|
_default: postgres-service
|
||||||
value: '20'
|
- name: POSTGRES_PORT
|
||||||
- name: LAST_MASTER_BIM
|
value:
|
||||||
value: '36311'
|
_default: "5432"
|
||||||
- name: API_ADDRESS
|
- name: POSTGRES_DB
|
||||||
value: 0.0.0.0:8080
|
value:
|
||||||
- name: API_ADDRESS_FILE
|
_default: documentations
|
||||||
value: 0.0.0.0:8080
|
- name: POSTGRES_POOL_SIZE
|
||||||
- name: ENABLE_SQL_QUERY
|
value:
|
||||||
value: '0'
|
_default: "20"
|
||||||
- name: ENABLE_SSL
|
- name: LAST_MASTER_BIM
|
||||||
value: '0'
|
value:
|
||||||
- name: ENABLE_MAILGUN
|
_default: "36311"
|
||||||
value: 'false'
|
- name: API_ADDRESS
|
||||||
- name: ENABLE_SMTP
|
value:
|
||||||
value: 'true'
|
_default: 0.0.0.0:8080
|
||||||
- name: ENABLE_S3
|
- name: API_ADDRESS_FILE
|
||||||
value: '1'
|
value:
|
||||||
- name: USE_BIM_INSERTER
|
_default: 0.0.0.0:8080
|
||||||
value: '0'
|
- name: ENABLE_SQL_QUERY
|
||||||
- name: CONTAINER_REGISTRY
|
value:
|
||||||
value: cr.yandex/crp3ccidau046kdj8g9q
|
_default: "0"
|
||||||
- name: ENVIRONMENT
|
- name: ENABLE_SSL
|
||||||
value: production
|
value:
|
||||||
- name: HOST
|
_default: "0"
|
||||||
value: http://documentations-service.documentations.svc.cluster.local:8080
|
- name: ENABLE_MAILGUN
|
||||||
- name: FILE_STREAM_HOST
|
value:
|
||||||
value: sarex.dsinv.ru
|
_default: "false"
|
||||||
- name: DOCUMENTATION_URL
|
- name: ENABLE_SMTP
|
||||||
value: http://documentations-service.documentations.svc.cluster.local:8080/
|
value:
|
||||||
- name: WORKFLOW_URL
|
_default: "true"
|
||||||
value: http://workflows-service.workflow.svc.cluster.local:8000/
|
- name: ENABLE_S3
|
||||||
- name: WORKSPACE_URL
|
value:
|
||||||
value: http://workspaces-service.workspaces.svc.cluster.local:8000/
|
_default: "1"
|
||||||
- name: BIM_API_URL
|
- name: USE_BIM_INSERTER
|
||||||
value: http://bim-api-service.bim.svc.cluster.local:8080/
|
value:
|
||||||
- name: BIM_API_V2_URL
|
_default: "0"
|
||||||
value: http://backend-service.bim.svc.cluster.local:8000/
|
- name: CONTAINER_REGISTRY
|
||||||
- name: WORKSPACE_BUNDLE_VERSION
|
value:
|
||||||
value: v1
|
_default: cr.yandex/crp3ccidau046kdj8g9q
|
||||||
- name: SYSTEM_LOG_URL
|
- name: ENVIRONMENT
|
||||||
value: http://api-service.system-log.svc.cluster.local:8000
|
value:
|
||||||
- name: DJANGO_HOST
|
_default: production
|
||||||
value: http://backend.django.svc.cluster.local:8000
|
- name: HOST
|
||||||
- name: MARKS_PROCESSING_URL
|
value:
|
||||||
value: http://marks-service.documentations.svc.cluster.local:8000
|
_default: http://documentations-service.documentations.svc.cluster.local:8080
|
||||||
- name: NAMESPACE
|
- name: FILE_STREAM_HOST
|
||||||
value: documentations
|
value:
|
||||||
- name: DOCUMENT_PUBLIC_LINK_JWT_EXPIRATION_MINUTES
|
_default: sarex.dsinv.ru
|
||||||
value: '5'
|
- name: DOCUMENTATION_URL
|
||||||
- name: DJANGO_ORIGINATOR
|
value:
|
||||||
value: docs_prod
|
_default: http://documentations-service.documentations.svc.cluster.local:8080/
|
||||||
- name: WORKFLOW_IMAGES_VERSION
|
- name: WORKFLOW_URL
|
||||||
value: master
|
value:
|
||||||
- name: WORKSPACE_V2_EXTERNAL_URL
|
_default: http://workflows-service.workflow.svc.cluster.local:8000/
|
||||||
value: https://sarex.dsinv.ru/workspaces-v2/
|
- name: WORKSPACE_URL
|
||||||
- name: WORKFLOWS_IMAGES_VERSION
|
value:
|
||||||
value: master
|
_default: http://workspaces-service.workspaces.svc.cluster.local:8000/
|
||||||
- name: FLOWS_URL
|
- name: BIM_API_URL
|
||||||
value: http://backend-service.flows.svc.cluster.local:8000
|
value:
|
||||||
- name: S3_SERVICE_ACCOUNT
|
_default: http://bim-api-service.bim.svc.cluster.local:8080/
|
||||||
value: /etc/sarex/yc-s3-storage/yc-s3-service-account.json
|
- name: BIM_API_V2_URL
|
||||||
- name: READ_WRITE_TIMEOUT_FILE_STREAM
|
value:
|
||||||
value: 6h
|
_default: http://backend-service.bim.svc.cluster.local:8000/
|
||||||
- name: CACHE_DEFAULT_EXPIRATION
|
- name: WORKSPACE_BUNDLE_VERSION
|
||||||
value: 60s
|
value:
|
||||||
- name: CACHE_CLEANUP_INTERVAL
|
_default: v1
|
||||||
value: 60s
|
- name: SYSTEM_LOG_URL
|
||||||
- name: USE_CACHE_IN_FILE_STREAMER
|
value:
|
||||||
value: '1'
|
_default: http://api-service.system-log.svc.cluster.local:8000
|
||||||
- name: IS_CONVERTED_PDF_UPLOADING_TO_S3
|
- name: DJANGO_HOST
|
||||||
value: 'false'
|
value:
|
||||||
- name: TRACER_USE
|
_default: http://backend.django.svc.cluster.local:8000
|
||||||
value: '0'
|
- name: MARKS_PROCESSING_URL
|
||||||
- name: TRACER_HOST
|
value:
|
||||||
value: signoz-otel-collector-external.signoz.svc.cluster.local:4317
|
_default: http://marks-service.documentations.svc.cluster.local:8000
|
||||||
- name: SERVICE_NAME
|
- name: NAMESPACE
|
||||||
value: documentations-api.documentations-prod
|
value:
|
||||||
- name: SERVICE_NAME_FILESTREAM
|
_default: documentations
|
||||||
value: filestream-api.documentations-prod
|
- name: DOCUMENT_PUBLIC_LINK_JWT_EXPIRATION_MINUTES
|
||||||
- name: TRACER_USE_INSECURE
|
value:
|
||||||
value: '1'
|
_default: "5"
|
||||||
- name: DELETE_S3D_AFTER_MESHOPT
|
- name: DJANGO_ORIGINATOR
|
||||||
value: 'true'
|
value:
|
||||||
- name: CONVERT_DWG_TO_GEOJSON
|
_default: docs_prod
|
||||||
value: 'false'
|
- name: WORKFLOW_IMAGES_VERSION
|
||||||
- name: CONVERT_DXF_TO_GEOJSON
|
value:
|
||||||
value: 'false'
|
_default: master
|
||||||
|
- name: WORKSPACE_V2_EXTERNAL_URL
|
||||||
|
value:
|
||||||
|
_default: https://sarex.dsinv.ru/workspaces-v2/
|
||||||
|
- name: WORKFLOWS_IMAGES_VERSION
|
||||||
|
value:
|
||||||
|
_default: master
|
||||||
|
- name: FLOWS_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-service.flows.svc.cluster.local:8000
|
||||||
|
- name: S3_SERVICE_ACCOUNT
|
||||||
|
value:
|
||||||
|
_default: /etc/sarex/yc-s3-storage/yc-s3-service-account.json
|
||||||
|
- name: READ_WRITE_TIMEOUT_FILE_STREAM
|
||||||
|
value:
|
||||||
|
_default: 6h
|
||||||
|
- name: CACHE_DEFAULT_EXPIRATION
|
||||||
|
value:
|
||||||
|
_default: 60s
|
||||||
|
- name: CACHE_CLEANUP_INTERVAL
|
||||||
|
value:
|
||||||
|
_default: 60s
|
||||||
|
- name: USE_CACHE_IN_FILE_STREAMER
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: IS_CONVERTED_PDF_UPLOADING_TO_S3
|
||||||
|
value:
|
||||||
|
_default: "false"
|
||||||
|
- name: TRACER_USE
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: TRACER_HOST
|
||||||
|
value:
|
||||||
|
_default: signoz-otel-collector-external.signoz.svc.cluster.local:4317
|
||||||
|
- name: SERVICE_NAME
|
||||||
|
value:
|
||||||
|
_default: documentations-api.documentations-prod
|
||||||
|
- name: SERVICE_NAME_FILESTREAM
|
||||||
|
value:
|
||||||
|
_default: filestream-api.documentations-prod
|
||||||
|
- name: TRACER_USE_INSECURE
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: DELETE_S3D_AFTER_MESHOPT
|
||||||
|
value:
|
||||||
|
_default: "true"
|
||||||
|
- name: CONVERT_DWG_TO_GEOJSON
|
||||||
|
value:
|
||||||
|
_default: "false"
|
||||||
|
- name: CONVERT_DXF_TO_GEOJSON
|
||||||
|
value:
|
||||||
|
_default: "false"
|
||||||
|
|||||||
@ -1,74 +1,107 @@
|
|||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
metadata:
|
metadata:
|
||||||
name: documentations-filestream
|
name: documentations-filestream
|
||||||
namespace: documentations
|
namespace: documentations
|
||||||
spec:
|
spec:
|
||||||
replicas: 3
|
values:
|
||||||
template:
|
services:
|
||||||
spec:
|
backend:
|
||||||
containers:
|
deployment:
|
||||||
- name: documentations-filestream
|
replicaCount:
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/documentations-api-files:prod_54880e92
|
_default: 3
|
||||||
env:
|
image:
|
||||||
- name: POSTGRES_ADDRESS
|
name:
|
||||||
value: postgres-service
|
_default: cr.yandex/crp3ccidau046kdj8g9q/documentations-api-files:prod_54880e92
|
||||||
- name: POSTGRES_PORT
|
envs:
|
||||||
value: '5432'
|
- name: POSTGRES_ADDRESS
|
||||||
- name: POSTGRES_DB
|
value:
|
||||||
value: documentations
|
_default: postgres-service
|
||||||
- name: POSTGRES_POOL_SIZE
|
- name: POSTGRES_PORT
|
||||||
value: '20'
|
value:
|
||||||
- name: API_ADDRESS
|
_default: "5432"
|
||||||
value: 0.0.0.0:8080
|
- name: POSTGRES_DB
|
||||||
- name: API_ADDRESS_FILE
|
value:
|
||||||
value: 0.0.0.0:8080
|
_default: documentations
|
||||||
- name: ENABLE_SQL_QUERY
|
- name: POSTGRES_POOL_SIZE
|
||||||
value: '1'
|
value:
|
||||||
- name: ENABLE_SSL
|
_default: "20"
|
||||||
value: '0'
|
- name: API_ADDRESS
|
||||||
- name: ENABLE_S3
|
value:
|
||||||
value: '1'
|
_default: 0.0.0.0:8080
|
||||||
- name: CONTAINER_REGISTRY
|
- name: API_ADDRESS_FILE
|
||||||
value: cr.yandex/crp3ccidau046kdj8g9q
|
value:
|
||||||
- name: ENVIRONMENT
|
_default: 0.0.0.0:8080
|
||||||
value: production
|
- name: ENABLE_SQL_QUERY
|
||||||
- name: HOST
|
value:
|
||||||
value: http://documentations-service.documentations.svc.cluster.local:8080
|
_default: "1"
|
||||||
- name: FILE_STREAM_HOST
|
- name: ENABLE_SSL
|
||||||
value: sarex.dsinv.ru
|
value:
|
||||||
- name: DOCUMENTATION_URL
|
_default: "0"
|
||||||
value: http://documentations-service.documentations.svc.cluster.local:8080/
|
- name: ENABLE_S3
|
||||||
- name: WORKFLOW_URL
|
value:
|
||||||
value: http://workflows-service.workflow.svc.cluster.local:8000/
|
_default: "1"
|
||||||
- name: WORKSPACE_URL
|
- name: CONTAINER_REGISTRY
|
||||||
value: http://workspaces-service.workspaces.svc.cluster.local:8000/
|
value:
|
||||||
- name: BIM_API_URL
|
_default: cr.yandex/crp3ccidau046kdj8g9q
|
||||||
value: http://bim-api-service.bim.svc.cluster.local:8080/
|
- name: ENVIRONMENT
|
||||||
- name: BIM_API_V2_URL
|
value:
|
||||||
value: http://backend-service.bim.svc.cluster.local:8000/
|
_default: production
|
||||||
- name: WORKSPACE_BUNDLE_VERSION
|
- name: HOST
|
||||||
value: v1
|
value:
|
||||||
- name: DJANGO_HOST
|
_default: http://documentations-service.documentations.svc.cluster.local:8080
|
||||||
value: http://backend.django.svc.cluster.local:8000
|
- name: FILE_STREAM_HOST
|
||||||
- name: NAMESPACE
|
value:
|
||||||
value: sarex-documentations
|
_default: sarex.dsinv.ru
|
||||||
- name: DJANGO_ORIGINATOR
|
- name: DOCUMENTATION_URL
|
||||||
value: docs_prod
|
value:
|
||||||
- name: WORKFLOW_IMAGES_VERSION
|
_default: http://documentations-service.documentations.svc.cluster.local:8080/
|
||||||
value: master
|
- name: WORKFLOW_URL
|
||||||
- name: WORKFLOWS_IMAGES_VERSION
|
value:
|
||||||
value: master
|
_default: http://workflows-service.workflow.svc.cluster.local:8000/
|
||||||
- name: DOCUMENT_PUBLIC_LINK_JWT_EXPIRATION_MINUTES
|
- name: WORKSPACE_URL
|
||||||
value: '5'
|
value:
|
||||||
- name: S3_SERVICE_ACCOUNT
|
_default: http://workspaces-service.workspaces.svc.cluster.local:8000/
|
||||||
value: /etc/sarex/yc-s3-storage/yc-s3-service-account.json
|
- name: BIM_API_URL
|
||||||
- name: READ_WRITE_TIMEOUT_FILE_STREAM
|
value:
|
||||||
value: 6h
|
_default: http://bim-api-service.bim.svc.cluster.local:8080/
|
||||||
- name: CACHE_DEFAULT_EXPIRATION
|
- name: BIM_API_V2_URL
|
||||||
value: 60s
|
value:
|
||||||
- name: CACHE_CLEANUP_INTERVAL
|
_default: http://backend-service.bim.svc.cluster.local:8000/
|
||||||
value: 60s
|
- name: WORKSPACE_BUNDLE_VERSION
|
||||||
- name: USE_CACHE_IN_FILE_STREAMER
|
value:
|
||||||
value: '1'
|
_default: v1
|
||||||
|
- name: DJANGO_HOST
|
||||||
|
value:
|
||||||
|
_default: http://backend.django.svc.cluster.local:8000
|
||||||
|
- name: NAMESPACE
|
||||||
|
value:
|
||||||
|
_default: sarex-documentations
|
||||||
|
- name: DJANGO_ORIGINATOR
|
||||||
|
value:
|
||||||
|
_default: docs_prod
|
||||||
|
- name: WORKFLOW_IMAGES_VERSION
|
||||||
|
value:
|
||||||
|
_default: master
|
||||||
|
- name: WORKFLOWS_IMAGES_VERSION
|
||||||
|
value:
|
||||||
|
_default: master
|
||||||
|
- name: DOCUMENT_PUBLIC_LINK_JWT_EXPIRATION_MINUTES
|
||||||
|
value:
|
||||||
|
_default: "5"
|
||||||
|
- name: S3_SERVICE_ACCOUNT
|
||||||
|
value:
|
||||||
|
_default: /etc/sarex/yc-s3-storage/yc-s3-service-account.json
|
||||||
|
- name: READ_WRITE_TIMEOUT_FILE_STREAM
|
||||||
|
value:
|
||||||
|
_default: 6h
|
||||||
|
- name: CACHE_DEFAULT_EXPIRATION
|
||||||
|
value:
|
||||||
|
_default: 60s
|
||||||
|
- name: CACHE_CLEANUP_INTERVAL
|
||||||
|
value:
|
||||||
|
_default: 60s
|
||||||
|
- name: USE_CACHE_IN_FILE_STREAMER
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
metadata:
|
metadata:
|
||||||
name: frontend
|
name: frontend
|
||||||
namespace: documentations
|
namespace: documentations
|
||||||
spec:
|
spec:
|
||||||
template:
|
values:
|
||||||
spec:
|
services:
|
||||||
containers:
|
frontend:
|
||||||
- name: frontend
|
image:
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/documentation-frontend-app:brusnika_b80d28d4
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/documentation-frontend-app:brusnika_b80d28d4
|
||||||
|
|||||||
@ -10,17 +10,17 @@ resources:
|
|||||||
patches:
|
patches:
|
||||||
- path: documentations-api.yaml
|
- path: documentations-api.yaml
|
||||||
target:
|
target:
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
name: documentations-api
|
name: documentations-api
|
||||||
- path: documentations-filestream.yaml
|
- path: documentations-filestream.yaml
|
||||||
target:
|
target:
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
name: documentations-filestream
|
name: documentations-filestream
|
||||||
- path: frontend.yaml
|
- path: frontend.yaml
|
||||||
target:
|
target:
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
name: frontend
|
name: frontend
|
||||||
- path: pdm-api.yaml
|
- path: pdm-api.yaml
|
||||||
target:
|
target:
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
name: pdm-api
|
name: pdm-api
|
||||||
|
|||||||
@ -1,120 +1,173 @@
|
|||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
metadata:
|
metadata:
|
||||||
name: pdm-api
|
name: pdm-api
|
||||||
namespace: documentations
|
namespace: documentations
|
||||||
spec:
|
spec:
|
||||||
replicas: 3
|
values:
|
||||||
template:
|
services:
|
||||||
spec:
|
backend:
|
||||||
containers:
|
deployment:
|
||||||
- name: pdm-api
|
replicaCount:
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/pdmv2:prod_542e5343
|
_default: 3
|
||||||
env:
|
image:
|
||||||
- name: OBSERVABILITY_COLLECTOR_ENDPOINT
|
name:
|
||||||
value: temp
|
_default: cr.yandex/crp3ccidau046kdj8g9q/pdmv2:prod_542e5343
|
||||||
- name: USE_SUBSCRIPTIONS
|
envs:
|
||||||
value: 'false'
|
- name: OBSERVABILITY_COLLECTOR_ENDPOINT
|
||||||
- name: RELEASES_URL
|
value:
|
||||||
value: https://gitlab.com
|
_default: temp
|
||||||
- name: APP_NAME
|
- name: USE_SUBSCRIPTIONS
|
||||||
value: pdm_v2
|
value:
|
||||||
- name: APP_VERSION
|
_default: "false"
|
||||||
value: 0.0.1
|
- name: RELEASES_URL
|
||||||
- name: LOG_LEVEL
|
value:
|
||||||
value: INFO
|
_default: https://gitlab.com
|
||||||
- name: HTTP_PORT
|
- name: APP_NAME
|
||||||
value: '8080'
|
value:
|
||||||
- name: POSTGRES_ADDRESS
|
_default: pdm_v2
|
||||||
value: postgres-service.documentations.svc.cluster.local
|
- name: APP_VERSION
|
||||||
- name: POSTGRES_PORT
|
value:
|
||||||
value: '5432'
|
_default: "0.0.1"
|
||||||
- name: POSTGRES_DB
|
- name: LOG_LEVEL
|
||||||
value: documentations
|
value:
|
||||||
- name: POSTGRES_POOL_SIZE
|
_default: INFO
|
||||||
value: '20'
|
- name: HTTP_PORT
|
||||||
- name: API_ADDRESS
|
value:
|
||||||
value: 0.0.0.0:8080
|
_default: "8080"
|
||||||
- name: API_ADDRESS_FILE
|
- name: POSTGRES_ADDRESS
|
||||||
value: 0.0.0.0:8080
|
value:
|
||||||
- name: ENABLE_OBSERVABILITY
|
_default: postgres-service.documentations.svc.cluster.local
|
||||||
value: 'false'
|
- name: POSTGRES_PORT
|
||||||
- name: ENABLE_SSL
|
value:
|
||||||
value: '0'
|
_default: "5432"
|
||||||
- name: ENABLE_S3
|
- name: POSTGRES_DB
|
||||||
value: '1'
|
value:
|
||||||
- name: DOCUMENTATION_URL
|
_default: documentations
|
||||||
value: http://documentations-service.documentations.svc.cluster.local:8080/
|
- name: POSTGRES_POOL_SIZE
|
||||||
- name: WORKFLOW_URL
|
value:
|
||||||
value: http://workflows-service.workflow.svc.cluster.local:8000/
|
_default: "20"
|
||||||
- name: WORKSPACE_URL
|
- name: API_ADDRESS
|
||||||
value: http://workspaces-service.workspaces.svc.cluster.local:8000
|
value:
|
||||||
- name: BIM_API_V2_URL
|
_default: 0.0.0.0:8080
|
||||||
value: http://backend-service.bim.svc.cluster.local:8000/
|
- name: API_ADDRESS_FILE
|
||||||
- name: BIM_V2_HOST
|
value:
|
||||||
value: http://backend-service.bim.svc.cluster.local:8000/
|
_default: 0.0.0.0:8080
|
||||||
- name: WORKSPACE_BUNDLE_VERSION
|
- name: ENABLE_OBSERVABILITY
|
||||||
value: v1
|
value:
|
||||||
- name: DJANGO_HOST
|
_default: "false"
|
||||||
value: http://backend.django.svc.cluster.local:8000
|
- name: ENABLE_SSL
|
||||||
- name: NAMESPACE
|
value:
|
||||||
value: documentations
|
_default: "0"
|
||||||
- name: DJANGO_ORIGINATOR
|
- name: ENABLE_S3
|
||||||
value: docs_prod
|
value:
|
||||||
- name: FLOWS_URL
|
_default: "1"
|
||||||
value: http://backend-service.flows.svc.cluster.local:8000
|
- name: DOCUMENTATION_URL
|
||||||
- name: RESOURCES_URL
|
value:
|
||||||
value: http://resources-service.resources.svc.cluster.local:8000
|
_default: http://documentations-service.documentations.svc.cluster.local:8080/
|
||||||
- name: REMARKS_URL
|
- name: WORKFLOW_URL
|
||||||
value: http://remarks-static-service.remarks.svc.cluster.local:8080/remarks
|
value:
|
||||||
- name: ATTACHMENTS_URL
|
_default: http://workflows-service.workflow.svc.cluster.local:8000/
|
||||||
value: http://attachments-service.attachments.svc.cluster.local:80
|
- name: WORKSPACE_URL
|
||||||
- name: WORKFLOW_IMAGES_VERSION
|
value:
|
||||||
value: master
|
_default: http://workspaces-service.workspaces.svc.cluster.local:8000
|
||||||
- name: WORKFLOWS_IMAGES_VERSION
|
- name: BIM_API_V2_URL
|
||||||
value: master
|
value:
|
||||||
- name: WORKFLOWS_IMAGES_VERSION
|
_default: http://backend-service.bim.svc.cluster.local:8000/
|
||||||
value: master
|
- name: BIM_V2_HOST
|
||||||
- name: INSPECTIONS_URL
|
value:
|
||||||
value: http://inspections-service.inspections
|
_default: http://backend-service.bim.svc.cluster.local:8000/
|
||||||
- name: STATES_URL
|
- name: WORKSPACE_BUNDLE_VERSION
|
||||||
value: http://workspaces-service.workspaces.svc.cluster.local:8000/
|
value:
|
||||||
- name: WIDTH_THUMB_STATES
|
_default: v1
|
||||||
value: '120'
|
- name: DJANGO_HOST
|
||||||
- name: HEIGHT_THUMB_STATES
|
value:
|
||||||
value: '73'
|
_default: http://backend.django.svc.cluster.local:8000
|
||||||
- name: WIDTH_THUMB_ATTACHMENTS
|
- name: NAMESPACE
|
||||||
value: '300'
|
value:
|
||||||
- name: HEIGHT_THUMB_ATTACHMENTS
|
_default: documentations
|
||||||
value: '300'
|
- name: DJANGO_ORIGINATOR
|
||||||
- name: ENABLE_PERMISSIONS_FILTER
|
value:
|
||||||
value: '1'
|
_default: docs_prod
|
||||||
- name: PERMISSIONS_FILTER_COMPANIES
|
- name: FLOWS_URL
|
||||||
value: '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]'
|
value:
|
||||||
- name: SUBSCRIPTIONS_URL
|
_default: http://backend-service.flows.svc.cluster.local:8000
|
||||||
value: http://sarex-subscriptions-service.subscriptions
|
- name: RESOURCES_URL
|
||||||
- name: SYSTEM_LOG_URL
|
value:
|
||||||
value: http://api-service.system-log.svc.cluster.local:8000
|
_default: http://resources-service.resources.svc.cluster.local:8000
|
||||||
- name: API_HOST_PREFIX
|
- name: REMARKS_URL
|
||||||
value: /gateway
|
value:
|
||||||
- name: TARGET_URL
|
_default: http://remarks-static-service.remarks.svc.cluster.local:8080/remarks
|
||||||
value: http://backend.django.svc.cluster.local:8000
|
- name: ATTACHMENTS_URL
|
||||||
- name: EAV_URL
|
value:
|
||||||
value: http://eav-service.eav.svc.cluster.local:8000
|
_default: http://attachments-service.attachments.svc.cluster.local:80
|
||||||
- name: NOTES_URL
|
- name: WORKFLOW_IMAGES_VERSION
|
||||||
value: http://backend-service.notes.svc.cluster.local:8000
|
value:
|
||||||
- name: S3_SERVICE_ACCOUNT
|
_default: master
|
||||||
value: /etc/sarex/yc-s3-storage/yc-s3-service-account.json
|
- name: WORKFLOWS_IMAGES_VERSION
|
||||||
- name: READ_WRITE_TIMEOUT_FILE_STREAM
|
value:
|
||||||
value: 6h
|
_default: master
|
||||||
- name: CACHE_DEFAULT_EXPIRATION
|
- name: INSPECTIONS_URL
|
||||||
value: 60s
|
value:
|
||||||
- name: CACHE_CLEANUP_INTERVAL
|
_default: http://inspections-service.inspections
|
||||||
value: 60s
|
- name: STATES_URL
|
||||||
- name: USE_CACHE_IN_FILE_STREAMER
|
value:
|
||||||
value: '1'
|
_default: http://workspaces-service.workspaces.svc.cluster.local:8000/
|
||||||
- name: ENVIRONMENT
|
- name: WIDTH_THUMB_STATES
|
||||||
value: prod
|
value:
|
||||||
- name: TRANSMITTALS_BASE_URL
|
_default: "120"
|
||||||
value: http://transmittal-service.transmittals.svc.cluster.local:80
|
- name: HEIGHT_THUMB_STATES
|
||||||
|
value:
|
||||||
|
_default: "73"
|
||||||
|
- name: WIDTH_THUMB_ATTACHMENTS
|
||||||
|
value:
|
||||||
|
_default: "300"
|
||||||
|
- name: HEIGHT_THUMB_ATTACHMENTS
|
||||||
|
value:
|
||||||
|
_default: "300"
|
||||||
|
- name: ENABLE_PERMISSIONS_FILTER
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: PERMISSIONS_FILTER_COMPANIES
|
||||||
|
value:
|
||||||
|
_default: "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"
|
||||||
|
- name: SUBSCRIPTIONS_URL
|
||||||
|
value:
|
||||||
|
_default: http://sarex-subscriptions-service.subscriptions
|
||||||
|
- name: SYSTEM_LOG_URL
|
||||||
|
value:
|
||||||
|
_default: http://api-service.system-log.svc.cluster.local:8000
|
||||||
|
- name: API_HOST_PREFIX
|
||||||
|
value:
|
||||||
|
_default: /gateway
|
||||||
|
- name: TARGET_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend.django.svc.cluster.local:8000
|
||||||
|
- name: EAV_URL
|
||||||
|
value:
|
||||||
|
_default: http://eav-service.eav.svc.cluster.local:8000
|
||||||
|
- name: NOTES_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-service.notes.svc.cluster.local:8000
|
||||||
|
- name: S3_SERVICE_ACCOUNT
|
||||||
|
value:
|
||||||
|
_default: /etc/sarex/yc-s3-storage/yc-s3-service-account.json
|
||||||
|
- name: READ_WRITE_TIMEOUT_FILE_STREAM
|
||||||
|
value:
|
||||||
|
_default: 6h
|
||||||
|
- name: CACHE_DEFAULT_EXPIRATION
|
||||||
|
value:
|
||||||
|
_default: 60s
|
||||||
|
- name: CACHE_CLEANUP_INTERVAL
|
||||||
|
value:
|
||||||
|
_default: 60s
|
||||||
|
- name: USE_CACHE_IN_FILE_STREAMER
|
||||||
|
value:
|
||||||
|
_default: "1"
|
||||||
|
- name: ENVIRONMENT
|
||||||
|
value:
|
||||||
|
_default: prod
|
||||||
|
- name: TRANSMITTALS_BASE_URL
|
||||||
|
value:
|
||||||
|
_default: http://transmittal-service.transmittals.svc.cluster.local:80
|
||||||
|
|||||||
@ -4,6 +4,4 @@ kind: Kustomization
|
|||||||
resources:
|
resources:
|
||||||
- ../base
|
- ../base
|
||||||
- postgresql.yaml
|
- postgresql.yaml
|
||||||
- redis-deployment.yaml
|
|
||||||
- redis-service.yaml
|
|
||||||
patches: []
|
patches: []
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
| Локально (manage.py / uWSGI) | Переменные окружения процесса (`.env` нужно экспортировать вручную) |
|
| Локально (manage.py / uWSGI) | Переменные окружения процесса (`.env` нужно экспортировать вручную) |
|
||||||
| Локально (docker-compose) | `docker-compose.yml`: блок `environment` сервиса `backend` + образ `postgres` (timescaledb-postgis) |
|
| Локально (docker-compose) | `docker-compose.yml`: блок `environment` сервиса `backend` + образ `postgres` (timescaledb-postgis) |
|
||||||
| Kubernetes (Helm, репозиторий приложения) | `.helm/values-<env>.yaml`: блоки `backend.deployment.envs` (обычные значения) и `backend.deployment.secrets` (из k8s-секретов через `secretKeyRef`); шаблон `templates/server.yaml`, роутинг — `templates/mesh-config.yaml` (Istio VirtualService) |
|
| Kubernetes (Helm, репозиторий приложения) | `.helm/values-<env>.yaml`: блоки `backend.deployment.envs` (обычные значения) и `backend.deployment.secrets` (из k8s-секретов через `secretKeyRef`); шаблон `templates/server.yaml`, роутинг — `templates/mesh-config.yaml` (Istio VirtualService) |
|
||||||
| Kubernetes (infra, Flux/Kustomize) | `infra/iac/apps/eav/base/backend-deployment.yaml`: секреты инъектируются Vault-агентом (`vault.hashicorp.com/agent-inject-*`) и экспортируются в окружение в `args`; настройки `production.py` монтируются из `django-configmap` |
|
| Kubernetes (infra, Flux/Kustomize) | `infra/iac/apps/eav/base/helmrelease.yaml` (universal-chart): секреты инъектируются Vault-агентом (`vault.hashicorp.com/agent-inject-*`) и экспортируются в окружение в `args`; настройки `production.py` монтируются из `django-configmap` |
|
||||||
| CI/CD (GitLab) | `.gitlab-ci.yml`: общие шаблоны `generic/common-ci`, переменные пайплайна в `workflow.rules` |
|
| CI/CD (GitLab) | `.gitlab-ci.yml`: общие шаблоны `generic/common-ci`, переменные пайплайна в `workflow.rules` |
|
||||||
|
|
||||||
Способы запуска процессов:
|
Способы запуска процессов:
|
||||||
@ -153,7 +153,7 @@
|
|||||||
|
|
||||||
## Переменные в infra-манифесте (Flux/Kustomize, `infra/iac/apps/eav`)
|
## Переменные в infra-манифесте (Flux/Kustomize, `infra/iac/apps/eav`)
|
||||||
|
|
||||||
В отличие от Helm-чарта приложения, боевой деплой Sarex использует Vault-инъекцию (`base/backend-deployment.yaml`). Секреты рендерятся Vault-агентом в файлы `/vault/secrets/*` и экспортируются в окружение в `args` контейнера перед запуском `entrypoint.sh`:
|
В отличие от Helm-чарта приложения, боевой деплой Sarex использует Vault-инъекцию (`base/helmrelease.yaml`, чарт `universal-chart`). Секреты рендерятся Vault-агентом в файлы `/vault/secrets/*` и экспортируются в окружение в `args` контейнера перед запуском `entrypoint.sh`:
|
||||||
|
|
||||||
| Переменная(ые) | Источник (Vault path) |
|
| Переменная(ые) | Источник (Vault path) |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
|
|||||||
@ -1,117 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: backend
|
|
||||||
namespace: eav
|
|
||||||
labels:
|
|
||||||
app: backend
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: backend
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: backend
|
|
||||||
annotations:
|
|
||||||
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
|
||||||
vault.hashicorp.com/agent-init-first: "true"
|
|
||||||
vault.hashicorp.com/agent-inject: "true"
|
|
||||||
vault.hashicorp.com/agent-pre-populate-only: "true"
|
|
||||||
vault.hashicorp.com/auth-path: auth/kubernetes
|
|
||||||
vault.hashicorp.com/role: eav
|
|
||||||
vault.hashicorp.com/agent-inject-secret-eav-db: secrets/data/postgresql/apps/eav
|
|
||||||
vault.hashicorp.com/agent-inject-template-eav-db: |-
|
|
||||||
{{- with secret "secrets/data/postgresql/apps/eav" -}}
|
|
||||||
DJANGO_POSTGRES_HOST=postgresql.eav.svc.cluster.local
|
|
||||||
DJANGO_POSTGRES_PORT=5432
|
|
||||||
DJANGO_POSTGRES_DATABASE=eav_db
|
|
||||||
DJANGO_POSTGRES_USER={{ index .Data.data "username" }}
|
|
||||||
DJANGO_POSTGRES_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-eav-s3: secrets/data/minio/apps/eav
|
|
||||||
vault.hashicorp.com/agent-inject-template-eav-s3: |-
|
|
||||||
{{- with secret "secrets/data/minio/apps/eav" -}}
|
|
||||||
YC_S3_ENDPOINT_URL={{ index .Data.data.client "endpoint" }}
|
|
||||||
YC_S3_BUCKET_NAME=eav
|
|
||||||
YC_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
|
||||||
YC_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-eav-jwt-private: secrets/data/vault/common/rsa_keys
|
|
||||||
vault.hashicorp.com/agent-inject-template-eav-jwt-private: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
|
||||||
{{ index .Data.data "private_key" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-eav-jwt-public: secrets/data/vault/common/rsa_keys
|
|
||||||
vault.hashicorp.com/agent-inject-template-eav-jwt-public: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
|
||||||
{{ index .Data.data "public_key" }}
|
|
||||||
{{- end -}}
|
|
||||||
spec:
|
|
||||||
serviceAccountName: eav-vault
|
|
||||||
volumes:
|
|
||||||
- name: django-configmap
|
|
||||||
configMap:
|
|
||||||
name: django-configmap
|
|
||||||
items:
|
|
||||||
- key: production.py
|
|
||||||
path: production.py
|
|
||||||
defaultMode: 420
|
|
||||||
|
|
||||||
containers:
|
|
||||||
- name: backend
|
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/eav:prod_0fb73247
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
command: ["/bin/sh", "-ec"]
|
|
||||||
args:
|
|
||||||
- |
|
|
||||||
set -a
|
|
||||||
[ -f /vault/secrets/eav-db ] && . /vault/secrets/eav-db
|
|
||||||
[ -f /vault/secrets/eav-s3 ] && . /vault/secrets/eav-s3
|
|
||||||
[ -f /vault/secrets/eav-jwt-private ] && export JWT_PRIVATE_KEY="$(cat /vault/secrets/eav-jwt-private)"
|
|
||||||
[ -f /vault/secrets/eav-jwt-public ] && export JWT_PUBLIC_KEY="$(cat /vault/secrets/eav-jwt-public)"
|
|
||||||
set +a
|
|
||||||
exec /server/entrypoint.sh
|
|
||||||
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 8000
|
|
||||||
protocol: TCP
|
|
||||||
|
|
||||||
env:
|
|
||||||
- name: KAFKA_ENABLED
|
|
||||||
value: "False"
|
|
||||||
- name: ASSETS_TOPIC
|
|
||||||
value: sarex
|
|
||||||
- name: DJANGO_SETTINGS_MODULE
|
|
||||||
value: config.settings.production
|
|
||||||
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 25m
|
|
||||||
memory: 100Mi
|
|
||||||
|
|
||||||
volumeMounts:
|
|
||||||
- name: django-configmap
|
|
||||||
mountPath: /server/config/settings/production.py
|
|
||||||
subPath: production.py
|
|
||||||
|
|
||||||
livenessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: 8000
|
|
||||||
initialDelaySeconds: 20
|
|
||||||
periodSeconds: 30
|
|
||||||
timeoutSeconds: 3
|
|
||||||
failureThreshold: 5
|
|
||||||
|
|
||||||
readinessProbe:
|
|
||||||
tcpSocket:
|
|
||||||
port: 8000
|
|
||||||
initialDelaySeconds: 10
|
|
||||||
periodSeconds: 10
|
|
||||||
timeoutSeconds: 3
|
|
||||||
failureThreshold: 6
|
|
||||||
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: regcred
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: backend-svc
|
|
||||||
namespace: eav
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: backend
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 80
|
|
||||||
targetPort: 8000
|
|
||||||
protocol: TCP
|
|
||||||
176
apps/eav/base/helmrelease.yaml
Normal file
176
apps/eav/base/helmrelease.yaml
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: backend
|
||||||
|
namespace: eav
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: "0.1.9"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
enabled: true
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: eav-vault
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: backend
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
command:
|
||||||
|
_default: ["/bin/sh", "-ec"]
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/eav-db ] && . /vault/secrets/eav-db
|
||||||
|
[ -f /vault/secrets/eav-s3 ] && . /vault/secrets/eav-s3
|
||||||
|
[ -f /vault/secrets/eav-jwt-private ] && export JWT_PRIVATE_KEY="$(cat /vault/secrets/eav-jwt-private)"
|
||||||
|
[ -f /vault/secrets/eav-jwt-public ] && export JWT_PUBLIC_KEY="$(cat /vault/secrets/eav-jwt-public)"
|
||||||
|
set +a
|
||||||
|
exec /server/entrypoint.sh
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 100Mi
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
type:
|
||||||
|
_default: tcpSocket
|
||||||
|
tcpSocket:
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
initialDelaySeconds:
|
||||||
|
_default: 20
|
||||||
|
periodSeconds:
|
||||||
|
_default: 30
|
||||||
|
timeoutSeconds:
|
||||||
|
_default: 3
|
||||||
|
failureThreshold:
|
||||||
|
_default: 5
|
||||||
|
readiness:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
type:
|
||||||
|
_default: tcpSocket
|
||||||
|
tcpSocket:
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
initialDelaySeconds:
|
||||||
|
_default: 10
|
||||||
|
periodSeconds:
|
||||||
|
_default: 10
|
||||||
|
timeoutSeconds:
|
||||||
|
_default: 3
|
||||||
|
failureThreshold:
|
||||||
|
_default: 6
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/eav:prod_0fb73247
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: backend-svc
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
|
targetPort:
|
||||||
|
_default: 8000
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- name: django-configmap
|
||||||
|
mountPath:
|
||||||
|
_default: /server/config/settings/production.py
|
||||||
|
subPath:
|
||||||
|
_default: production.py
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: django-configmap
|
||||||
|
items:
|
||||||
|
- key: production.py
|
||||||
|
path:
|
||||||
|
_default: production.py
|
||||||
|
envs:
|
||||||
|
- name: KAFKA_ENABLED
|
||||||
|
value:
|
||||||
|
_default: "False"
|
||||||
|
- name: ASSETS_TOPIC
|
||||||
|
value:
|
||||||
|
_default: sarex
|
||||||
|
- name: DJANGO_SETTINGS_MODULE
|
||||||
|
value:
|
||||||
|
_default: config.settings.production
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
||||||
|
vault.hashicorp.com/agent-init-first: "true"
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: eav
|
||||||
|
vault.hashicorp.com/agent-inject-secret-eav-db: secrets/data/apps/eav/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-eav-db: |-
|
||||||
|
{{- with secret "secrets/data/apps/eav/postgres" -}}
|
||||||
|
DJANGO_POSTGRES_HOST={{ index .Data.data "host" }}
|
||||||
|
DJANGO_POSTGRES_PORT={{ index .Data.data "port" }}
|
||||||
|
DJANGO_POSTGRES_DATABASE={{ index .Data.data "database" }}
|
||||||
|
DJANGO_POSTGRES_USER={{ index .Data.data "username" }}
|
||||||
|
DJANGO_POSTGRES_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-eav-s3: secrets/data/minio/apps/eav
|
||||||
|
vault.hashicorp.com/agent-inject-template-eav-s3: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/eav" -}}
|
||||||
|
YC_S3_ENDPOINT_URL={{ index .Data.data.client "endpoint" }}
|
||||||
|
YC_S3_BUCKET_NAME=eav
|
||||||
|
YC_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||||
|
YC_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-eav-jwt-private: secrets/data/vault/common/rsa_keys
|
||||||
|
vault.hashicorp.com/agent-inject-template-eav-jwt-private: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
||||||
|
{{ index .Data.data "private_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-eav-jwt-public: secrets/data/vault/common/rsa_keys
|
||||||
|
vault.hashicorp.com/agent-inject-template-eav-jwt-public: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/rsa_keys" -}}
|
||||||
|
{{ index .Data.data "public_key" }}
|
||||||
|
{{- end -}}
|
||||||
@ -4,7 +4,5 @@ kind: Kustomization
|
|||||||
namespace: eav
|
namespace: eav
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
- serviceaccount.yaml
|
- helmrelease.yaml
|
||||||
- backend-deployment.yaml
|
|
||||||
- backend-service.yaml
|
|
||||||
- django-configmap.yaml
|
- django-configmap.yaml
|
||||||
|
|||||||
@ -5,3 +5,4 @@ metadata:
|
|||||||
name: eav
|
name: eav
|
||||||
labels:
|
labels:
|
||||||
istio-injection: enabled
|
istio-injection: enabled
|
||||||
|
security.deckhouse.io/pod-policy: privileged
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: eav-vault
|
|
||||||
namespace: eav
|
|
||||||
6
apps/eav/d8-ugmk-prod/kustomization.yaml
Normal file
6
apps/eav/d8-ugmk-prod/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: eav
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
@ -1,27 +1,35 @@
|
|||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
metadata:
|
metadata:
|
||||||
name: backend
|
name: backend
|
||||||
namespace: eav
|
namespace: eav
|
||||||
spec:
|
spec:
|
||||||
template:
|
values:
|
||||||
spec:
|
services:
|
||||||
containers:
|
backend:
|
||||||
- name: backend
|
image:
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/eav:prod_ddce2b51
|
name:
|
||||||
env:
|
_default: cr.yandex/crp3ccidau046kdj8g9q/eav:prod_ddce2b51
|
||||||
- name: DJANGO_SETTINGS_MODULE
|
envs:
|
||||||
value: config.settings.production
|
- name: DJANGO_SETTINGS_MODULE
|
||||||
- name: ASSETS_TOPIC
|
value:
|
||||||
value: sarex
|
_default: config.settings.production
|
||||||
- name: KAFKA_SSL_CAFILE
|
- name: ASSETS_TOPIC
|
||||||
value: /usr/local/share/ca-certificates/ca.crt
|
value:
|
||||||
- name: DJANGO_POSTGRES_HOST
|
_default: sarex
|
||||||
value: postgres-service
|
- name: KAFKA_SSL_CAFILE
|
||||||
- name: DJANGO_POSTGRES_DATABASE
|
value:
|
||||||
value: eav_db
|
_default: /usr/local/share/ca-certificates/ca.crt
|
||||||
- name: YC_S3_ENDPOINT_URL
|
- name: DJANGO_POSTGRES_HOST
|
||||||
value: http://minio-service.minio.svc.cluster.local:9000
|
value:
|
||||||
- name: YC_S3_BUCKET_NAME
|
_default: postgres-service
|
||||||
value: eav
|
- name: DJANGO_POSTGRES_DATABASE
|
||||||
|
value:
|
||||||
|
_default: eav_db
|
||||||
|
- name: YC_S3_ENDPOINT_URL
|
||||||
|
value:
|
||||||
|
_default: http://minio-service.minio.svc.cluster.local:9000
|
||||||
|
- name: YC_S3_BUCKET_NAME
|
||||||
|
value:
|
||||||
|
_default: eav
|
||||||
|
|||||||
@ -7,5 +7,5 @@ resources:
|
|||||||
patches:
|
patches:
|
||||||
- path: backend.yaml
|
- path: backend.yaml
|
||||||
target:
|
target:
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
name: backend
|
name: backend
|
||||||
|
|||||||
@ -7,5 +7,5 @@ resources:
|
|||||||
patches:
|
patches:
|
||||||
- path: replicas.yaml
|
- path: replicas.yaml
|
||||||
target:
|
target:
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
name: backend
|
name: backend
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
kind: Deployment
|
kind: HelmRelease
|
||||||
metadata:
|
metadata:
|
||||||
name: backend
|
name: backend
|
||||||
namespace: eav
|
namespace: eav
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
values:
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
deployment:
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
|||||||
214
apps/iam/base/backend.yaml
Normal file
214
apps/iam/base/backend.yaml
Normal file
@ -0,0 +1,214 @@
|
|||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: iam-backend
|
||||||
|
namespace: iam
|
||||||
|
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: "0.1.9"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: iam-vault
|
||||||
|
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/iams:contour_dada80a8
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
name:
|
||||||
|
_default: iam-backend
|
||||||
|
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
production: 4
|
||||||
|
|
||||||
|
port:
|
||||||
|
_default: 8080
|
||||||
|
|
||||||
|
command:
|
||||||
|
_default: ["/bin/sh", "-ec"]
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/iam-db ] && . /vault/secrets/iam-db
|
||||||
|
[ -f /vault/secrets/iam-zitadel ] && . /vault/secrets/iam-zitadel
|
||||||
|
[ -f /vault/secrets/iam-kafka ] && . /vault/secrets/iam-kafka
|
||||||
|
[ -f /vault/secrets/iam-s3 ] && . /vault/secrets/iam-s3
|
||||||
|
set +a
|
||||||
|
exec ./server
|
||||||
|
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: false
|
||||||
|
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
name:
|
||||||
|
_default: iam-backend
|
||||||
|
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
|
||||||
|
targetPort:
|
||||||
|
_default: 8080
|
||||||
|
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
|
||||||
|
labels:
|
||||||
|
monitoring: prometheus
|
||||||
|
|
||||||
|
envs:
|
||||||
|
- name: ENVIRONMENT
|
||||||
|
value:
|
||||||
|
_default: "prod"
|
||||||
|
|
||||||
|
- name: LOG_LEVEL
|
||||||
|
value:
|
||||||
|
_default: "debug"
|
||||||
|
|
||||||
|
- name: AUTH_ENABLED
|
||||||
|
value:
|
||||||
|
_default: "true"
|
||||||
|
|
||||||
|
- name: HTTP_PORT
|
||||||
|
value:
|
||||||
|
_default: "8080"
|
||||||
|
|
||||||
|
- name: HTTP_READ_BUFFER_SIZE
|
||||||
|
value:
|
||||||
|
_default: "131072"
|
||||||
|
|
||||||
|
- name: DB_MIGRATIONS_PATH
|
||||||
|
value:
|
||||||
|
_default: "migrations"
|
||||||
|
|
||||||
|
- name: ZITADEL_ENABLED
|
||||||
|
value:
|
||||||
|
_default: "false"
|
||||||
|
|
||||||
|
- name: ZITADEL_HOST
|
||||||
|
value:
|
||||||
|
_default: "https://login.sarex.io"
|
||||||
|
|
||||||
|
- name: ZITADEL_ORG_RULES_FILE
|
||||||
|
value:
|
||||||
|
_default: "config/zitadel/org-rules-prod.json"
|
||||||
|
|
||||||
|
- name: S3_ENABLED
|
||||||
|
value:
|
||||||
|
_default: "true"
|
||||||
|
|
||||||
|
- name: S3_ENDPOINT_URL
|
||||||
|
value:
|
||||||
|
_default: "https://storage.yandexcloud.net"
|
||||||
|
|
||||||
|
- name: S3_BUCKET_NAME
|
||||||
|
value:
|
||||||
|
_default: "sarex-media-storage"
|
||||||
|
|
||||||
|
- name: S3_REGION
|
||||||
|
value:
|
||||||
|
_default: "ru-central1"
|
||||||
|
|
||||||
|
- name: S3_PRESIGN_EXPIRES
|
||||||
|
value:
|
||||||
|
_default: "1h"
|
||||||
|
|
||||||
|
- name: KAFKA_ENABLED
|
||||||
|
value:
|
||||||
|
_default: "false"
|
||||||
|
|
||||||
|
- name: KAFKA_SSL_CAFILE
|
||||||
|
value:
|
||||||
|
_default: "/etc/ca-certificates/Yandex/ca-cert"
|
||||||
|
|
||||||
|
- name: KAFKA_TOPIC_LEGACY_AMS_SYNC
|
||||||
|
value:
|
||||||
|
_default: "ams-sync"
|
||||||
|
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: "4317,4318,9411,8200"
|
||||||
|
vault.hashicorp.com/agent-init-first: "true"
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: iam
|
||||||
|
vault.hashicorp.com/agent-inject-secret-iam-db: secrets/data/apps/iam/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-iam-db: |-
|
||||||
|
{{- with secret "secrets/data/apps/iam/postgres" -}}
|
||||||
|
DB_DSN=postgres://{{ index .Data.data "username" }}:{{ index .Data.data "password" }}@{{ index .Data.data "host" }}:{{ index .Data.data "port" }}/{{ index .Data.data "database" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-iam-zitadel: secrets/data/apps/iam/zitadel
|
||||||
|
vault.hashicorp.com/agent-inject-template-iam-zitadel: |-
|
||||||
|
{{- with secret "secrets/data/apps/iam/zitadel" -}}
|
||||||
|
ZITADEL_ACCESS_TOKEN={{ index .Data.data "access_token" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-iam-kafka: secrets/data/kafka/apps/iam
|
||||||
|
vault.hashicorp.com/agent-inject-template-iam-kafka: |-
|
||||||
|
{{- with secret "secrets/data/kafka/apps/iam" -}}
|
||||||
|
KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
||||||
|
KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
||||||
|
KAFKA_BROKERS={{ index .Data.data.auth "bootstrap_servers" }}
|
||||||
|
KAFKA_SASL_PLAIN_USERNAME={{ index .Data.data "username" }}
|
||||||
|
KAFKA_SASL_PLAIN_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-iam-s3: secrets/data/minio/apps/iam
|
||||||
|
vault.hashicorp.com/agent-inject-template-iam-s3: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/iam" -}}
|
||||||
|
S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||||
|
S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
commitSha: ""
|
||||||
|
gitlabUri: ""
|
||||||
|
gitlabJobUrl: ""
|
||||||
|
owner: ""
|
||||||
7
apps/iam/base/kustomization.yaml
Normal file
7
apps/iam/base/kustomization.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: iam
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- backend.yaml
|
||||||
@ -1,7 +1,8 @@
|
|||||||
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
name: notes
|
name: iam
|
||||||
labels:
|
labels:
|
||||||
istio-injection: disabled
|
istio-injection: enabled
|
||||||
security.deckhouse.io/pod-policy: privileged
|
security.deckhouse.io/pod-policy: privileged
|
||||||
6
apps/iam/d8-ugmk-prod/kustomization.yaml
Normal file
6
apps/iam/d8-ugmk-prod/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: iam
|
||||||
|
resources:
|
||||||
|
- ../base
|
||||||
@ -1,120 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: backend
|
|
||||||
namespace: notes
|
|
||||||
labels:
|
|
||||||
app: backend
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: backend
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: backend
|
|
||||||
service: main
|
|
||||||
annotations:
|
|
||||||
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
|
||||||
vault.hashicorp.com/agent-init-first: "true"
|
|
||||||
vault.hashicorp.com/agent-inject: "true"
|
|
||||||
vault.hashicorp.com/agent-pre-populate-only: "true"
|
|
||||||
vault.hashicorp.com/auth-path: auth/kubernetes
|
|
||||||
vault.hashicorp.com/role: notes
|
|
||||||
vault.hashicorp.com/agent-inject-secret-notes-db: secrets/data/postgresql/apps/notes
|
|
||||||
vault.hashicorp.com/agent-inject-template-notes-db: |-
|
|
||||||
{{- with secret "secrets/data/postgresql/apps/notes" -}}
|
|
||||||
PG_HOST=postgresql.notes.svc.cluster.local
|
|
||||||
PG_PORT=5432
|
|
||||||
PG_DB=notes_db
|
|
||||||
PG_LOGIN={{ index .Data.data "username" }}
|
|
||||||
PG_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-notes-django-auth: secrets/data/vault/common/django_auth
|
|
||||||
vault.hashicorp.com/agent-inject-template-notes-django-auth: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
|
||||||
DJANGO_TOKEN={{ index .Data.data "key" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-notes-rabbitmq: secrets/data/rabbitmq/apps/notes
|
|
||||||
vault.hashicorp.com/agent-inject-template-notes-rabbitmq: |-
|
|
||||||
{{- with secret "secrets/data/rabbitmq/apps/notes" -}}
|
|
||||||
NOTES_RABBITMQ_VHOST={{ index .Data.data "vhost" }}
|
|
||||||
NOTES_RABBITMQ_USERNAME={{ index .Data.data "username" }}
|
|
||||||
NOTES_RABBITMQ_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
NOTES_RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
|
|
||||||
NOTES_RABBITMQ_PORT=5672
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-notes-s3: secrets/data/minio/apps/notes
|
|
||||||
vault.hashicorp.com/agent-inject-template-notes-s3: |-
|
|
||||||
{{- with secret "secrets/data/minio/apps/notes" -}}
|
|
||||||
NOTES_S3_ENDPOINT={{ index .Data.data.client "endpoint" }}
|
|
||||||
NOTES_S3_REGION={{ index .Data.data.client "region" }}
|
|
||||||
NOTES_S3_BUCKET=notes
|
|
||||||
NOTES_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
|
||||||
NOTES_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-notes-kafka: secrets/data/kafka/apps/notes
|
|
||||||
vault.hashicorp.com/agent-inject-template-notes-kafka: |-
|
|
||||||
{{- with secret "secrets/data/kafka/apps/notes" -}}
|
|
||||||
NOTES_KAFKA_BOOTSTRAP_SERVERS={{ index .Data.data.auth "bootstrap_servers" }}
|
|
||||||
NOTES_KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
|
||||||
NOTES_KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
|
||||||
NOTES_KAFKA_USERNAME={{ index .Data.data "username" }}
|
|
||||||
NOTES_KAFKA_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
{{- end -}}
|
|
||||||
spec:
|
|
||||||
serviceAccountName: notes-vault
|
|
||||||
containers:
|
|
||||||
- name: main
|
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/notes-backend:production_81366854
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
command: ["/bin/bash", "-ec"]
|
|
||||||
args:
|
|
||||||
- |
|
|
||||||
set -a
|
|
||||||
[ -f /vault/secrets/notes-db ] && . /vault/secrets/notes-db
|
|
||||||
[ -f /vault/secrets/notes-django-auth ] && . /vault/secrets/notes-django-auth
|
|
||||||
[ -f /vault/secrets/notes-rabbitmq ] && . /vault/secrets/notes-rabbitmq
|
|
||||||
[ -f /vault/secrets/notes-s3 ] && . /vault/secrets/notes-s3
|
|
||||||
[ -f /vault/secrets/notes-kafka ] && . /vault/secrets/notes-kafka
|
|
||||||
set +a
|
|
||||||
exec /bin/bash /opt/entrypoint.sh
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 8000
|
|
||||||
protocol: TCP
|
|
||||||
env:
|
|
||||||
- name: PG_SSL_MODE
|
|
||||||
value: verify-full
|
|
||||||
- name: DJANGO_HOST
|
|
||||||
value: https://lk.sarex.io
|
|
||||||
- name: BASE_HOST
|
|
||||||
value: https://api.sarex.io/notes
|
|
||||||
- name: TIMEOUT
|
|
||||||
value: "120"
|
|
||||||
- name: FAAS_SERVICE
|
|
||||||
value: https://api.sarex.io/lambdas
|
|
||||||
- name: WORKSPACE_URL
|
|
||||||
value: https://api.sarex.io/workspaces/api/v1
|
|
||||||
- name: WORKFLOW_HOST
|
|
||||||
value: https://api.sarex.io/workflows/api/v1
|
|
||||||
- name: WORKFLOW_TAG
|
|
||||||
value: stable
|
|
||||||
- name: RESOURCE_URL
|
|
||||||
value: https://api.sarex.io/resources/api/v1
|
|
||||||
- name: SYNC_RESOURCE_ID
|
|
||||||
value: "0"
|
|
||||||
- name: ENABLE_ND
|
|
||||||
value: "0"
|
|
||||||
- name: ATTACHMENT_HOST
|
|
||||||
value: http://attachments-service.attachments.svc.cluster.local:80/api/v1
|
|
||||||
- name: PG_PORT
|
|
||||||
value: "5432"
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: "25m"
|
|
||||||
memory: 128Mi
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: regcred
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: backend-service
|
|
||||||
namespace: notes
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: backend
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 8000
|
|
||||||
targetPort: 8000
|
|
||||||
protocol: TCP
|
|
||||||
177
apps/notes/base/backend.yaml
Normal file
177
apps/notes/base/backend.yaml
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: backend
|
||||||
|
namespace: notes
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: "0.1.9"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
enabled: true
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: notes-vault
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: backend
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
command:
|
||||||
|
_default: ["/bin/bash", "-c"]
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/notes-db ] && source /vault/secrets/notes-db
|
||||||
|
[ -f /vault/secrets/notes-django-auth ] && source /vault/secrets/notes-django-auth
|
||||||
|
[ -f /vault/secrets/notes-rabbitmq ] && source /vault/secrets/notes-rabbitmq
|
||||||
|
[ -f /vault/secrets/notes-s3 ] && source /vault/secrets/notes-s3
|
||||||
|
[ -f /vault/secrets/notes-kafka ] && source /vault/secrets/notes-kafka
|
||||||
|
set +a
|
||||||
|
/bin/bash /opt/entrypoint.sh
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: false
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/notes-backend:production_81366854
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: backend-service
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
targetPort:
|
||||||
|
_default: 8000
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
envs:
|
||||||
|
- name: PG_SSL_MODE
|
||||||
|
value:
|
||||||
|
_default: verify-full
|
||||||
|
- name: DJANGO_HOST
|
||||||
|
value:
|
||||||
|
_default: https://lk.sarex.io
|
||||||
|
- name: BASE_HOST
|
||||||
|
value:
|
||||||
|
_default: https://api.sarex.io/notes
|
||||||
|
- name: TIMEOUT
|
||||||
|
value:
|
||||||
|
_default: "120"
|
||||||
|
- name: FAAS_SERVICE
|
||||||
|
value:
|
||||||
|
_default: https://api.sarex.io/lambdas
|
||||||
|
- name: WORKSPACE_URL
|
||||||
|
value:
|
||||||
|
_default: https://api.sarex.io/workspaces/api/v1
|
||||||
|
- name: WORKFLOW_HOST
|
||||||
|
value:
|
||||||
|
_default: https://api.sarex.io/workflows/api/v1
|
||||||
|
- name: WORKFLOW_TAG
|
||||||
|
value:
|
||||||
|
_default: stable
|
||||||
|
- name: RESOURCE_URL
|
||||||
|
value:
|
||||||
|
_default: https://api.sarex.io/resources/api/v1
|
||||||
|
- name: SYNC_RESOURCE_ID
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: ENABLE_ND
|
||||||
|
value:
|
||||||
|
_default: "0"
|
||||||
|
- name: ATTACHMENT_HOST
|
||||||
|
value:
|
||||||
|
_default: http://attachments-service.attachments.svc.cluster.local:80/api/v1
|
||||||
|
- name: PG_PORT
|
||||||
|
value:
|
||||||
|
_default: "5432"
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
||||||
|
vault.hashicorp.com/agent-init-first: "true"
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: notes
|
||||||
|
vault.hashicorp.com/agent-inject-secret-notes-db: secrets/data/apps/notes/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-notes-db: |-
|
||||||
|
{{- with secret "secrets/data/apps/notes/postgres" -}}
|
||||||
|
PG_HOST={{ index .Data.data "host" }}
|
||||||
|
PG_PORT={{ index .Data.data "port" }}
|
||||||
|
PG_DB={{ index .Data.data "database" }}
|
||||||
|
PG_LOGIN={{ index .Data.data "username" }}
|
||||||
|
PG_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-notes-django-auth: secrets/data/vault/common/django_auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-notes-django-auth: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
||||||
|
DJANGO_TOKEN={{ index .Data.data "key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-notes-rabbitmq: secrets/data/rabbitmq/apps/notes
|
||||||
|
vault.hashicorp.com/agent-inject-template-notes-rabbitmq: |-
|
||||||
|
{{- with secret "secrets/data/rabbitmq/apps/notes" -}}
|
||||||
|
NOTES_RABBITMQ_VHOST={{ index .Data.data "vhost" }}
|
||||||
|
NOTES_RABBITMQ_USERNAME={{ index .Data.data "username" }}
|
||||||
|
NOTES_RABBITMQ_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
NOTES_RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
|
||||||
|
NOTES_RABBITMQ_PORT=5672
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-notes-s3: secrets/data/minio/apps/notes
|
||||||
|
vault.hashicorp.com/agent-inject-template-notes-s3: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/notes" -}}
|
||||||
|
NOTES_S3_ENDPOINT={{ index .Data.data.client "endpoint" }}
|
||||||
|
NOTES_S3_REGION={{ index .Data.data.client "region" }}
|
||||||
|
NOTES_S3_BUCKET=notes
|
||||||
|
NOTES_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||||
|
NOTES_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-notes-kafka: secrets/data/kafka/apps/notes
|
||||||
|
vault.hashicorp.com/agent-inject-template-notes-kafka: |-
|
||||||
|
{{- with secret "secrets/data/kafka/apps/notes" -}}
|
||||||
|
NOTES_KAFKA_BOOTSTRAP_SERVERS={{ index .Data.data.auth "bootstrap_servers" }}
|
||||||
|
NOTES_KAFKA_SECURITY_PROTOCOL={{ index .Data.data.auth "security_protocol" }}
|
||||||
|
NOTES_KAFKA_SASL_MECHANISM={{ index .Data.data.auth "sasl_mechanism" }}
|
||||||
|
NOTES_KAFKA_USERNAME={{ index .Data.data "username" }}
|
||||||
|
NOTES_KAFKA_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
@ -1,58 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: frontend
|
|
||||||
namespace: notes
|
|
||||||
labels:
|
|
||||||
app: frontend
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: frontend
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: frontend
|
|
||||||
service: frontend
|
|
||||||
spec:
|
|
||||||
volumes:
|
|
||||||
- name: nginx-configmap
|
|
||||||
configMap:
|
|
||||||
name: nginx-configmap
|
|
||||||
items:
|
|
||||||
- key: nginx.conf
|
|
||||||
path: nginx.conf
|
|
||||||
containers:
|
|
||||||
- name: frontend
|
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/notes-frontend:production_0cb0909f
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 80
|
|
||||||
protocol: TCP
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 25m
|
|
||||||
memory: 100Mi
|
|
||||||
volumeMounts:
|
|
||||||
- name: nginx-configmap
|
|
||||||
mountPath: /etc/nginx/nginx.conf
|
|
||||||
subPath: nginx.conf
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /ping
|
|
||||||
port: 80
|
|
||||||
initialDelaySeconds: 10
|
|
||||||
periodSeconds: 10
|
|
||||||
failureThreshold: 10
|
|
||||||
readinessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /ping
|
|
||||||
port: 80
|
|
||||||
initialDelaySeconds: 10
|
|
||||||
periodSeconds: 10
|
|
||||||
failureThreshold: 20
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: regcred
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: frontend-service
|
|
||||||
namespace: notes
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: frontend
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 80
|
|
||||||
targetPort: 80
|
|
||||||
protocol: TCP
|
|
||||||
86
apps/notes/base/frontend.yaml
Normal file
86
apps/notes/base/frontend.yaml
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: frontend
|
||||||
|
namespace: notes
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: "0.1.9"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
frontend:
|
||||||
|
enabled: true
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: frontend
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 100Mi
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: false
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/notes-frontend:production_0cb0909f
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: frontend-service
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
|
targetPort:
|
||||||
|
_default: 80
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
volumes:
|
||||||
|
_default:
|
||||||
|
- name: nginx-configmap
|
||||||
|
mountPath:
|
||||||
|
_default: /etc/nginx/nginx.conf
|
||||||
|
subPath:
|
||||||
|
_default: nginx.conf
|
||||||
|
readOnly:
|
||||||
|
_default: true
|
||||||
|
configMap:
|
||||||
|
name:
|
||||||
|
_default: nginx-configmap
|
||||||
|
items:
|
||||||
|
- key: nginx.conf
|
||||||
|
path: nginx.conf
|
||||||
|
defaultMode: 420
|
||||||
@ -3,10 +3,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: notes
|
namespace: notes
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
|
||||||
- serviceaccount.yaml
|
|
||||||
- backend-deployment.yaml
|
|
||||||
- backend-service.yaml
|
|
||||||
- frontend-deployment.yaml
|
|
||||||
- frontend-service.yaml
|
|
||||||
- nginx-configmap.yaml
|
- nginx-configmap.yaml
|
||||||
|
- backend.yaml
|
||||||
|
- frontend.yaml
|
||||||
|
- namespace.yaml
|
||||||
|
|||||||
@ -5,3 +5,6 @@ metadata:
|
|||||||
name: notes
|
name: notes
|
||||||
labels:
|
labels:
|
||||||
istio-injection: enabled
|
istio-injection: enabled
|
||||||
|
security.deckhouse.io/pod-policy: privileged
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: notes-vault
|
|
||||||
namespace: notes
|
|
||||||
@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
|
namespace: notes
|
||||||
resources:
|
resources:
|
||||||
- ../base
|
- ../base
|
||||||
patches:
|
patches:
|
||||||
- path: namespace.yaml
|
- path: patch.yaml
|
||||||
target:
|
target:
|
||||||
kind: Namespace
|
kind: HelmRelease
|
||||||
name: notes
|
name: frontend
|
||||||
- path: patch.yaml
|
|
||||||
|
|||||||
@ -1,99 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: rfi-backend-api
|
|
||||||
namespace: rfi
|
|
||||||
labels:
|
|
||||||
app: rfi-backend-api
|
|
||||||
service: api
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: rfi-backend-api
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: rfi-backend-api
|
|
||||||
service: api
|
|
||||||
annotations:
|
|
||||||
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
|
||||||
vault.hashicorp.com/agent-init-first: "true"
|
|
||||||
vault.hashicorp.com/agent-inject: "true"
|
|
||||||
vault.hashicorp.com/agent-pre-populate-only: "true"
|
|
||||||
vault.hashicorp.com/auth-path: auth/kubernetes
|
|
||||||
vault.hashicorp.com/role: rfi
|
|
||||||
vault.hashicorp.com/agent-inject-secret-rfi-db: secrets/data/postgresql/apps/rfi
|
|
||||||
vault.hashicorp.com/agent-inject-template-rfi-db: |-
|
|
||||||
{{- with secret "secrets/data/postgresql/apps/rfi" -}}
|
|
||||||
DB_HOST=postgresql.rfi.svc.cluster.local
|
|
||||||
DB_PORT=5432
|
|
||||||
DB_NAME=rfi_db
|
|
||||||
DB_USER={{ index .Data.data "username" }}
|
|
||||||
DB_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-rfi-s3: secrets/data/minio/apps/rfi
|
|
||||||
vault.hashicorp.com/agent-inject-template-rfi-s3: |-
|
|
||||||
{{- with secret "secrets/data/minio/apps/rfi" -}}
|
|
||||||
YC_S3_ENDPOINT_URL={{ index .Data.data.client "endpoint" }}
|
|
||||||
YC_S3_BUCKET_NAME=rfi
|
|
||||||
YC_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
|
||||||
YC_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-rfi-rabbitmq: secrets/data/rabbitmq/apps/rfi
|
|
||||||
vault.hashicorp.com/agent-inject-template-rfi-rabbitmq: |-
|
|
||||||
{{- with secret "secrets/data/rabbitmq/apps/rfi" -}}
|
|
||||||
RABBITMQ_VHOST={{ index .Data.data "vhost" }}
|
|
||||||
RABBITMQ_USERNAME={{ index .Data.data "username" }}
|
|
||||||
RABBITMQ_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
RABBITMQ_PORT=5672
|
|
||||||
RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-rfi-django-auth: secrets/data/vault/common/django_auth
|
|
||||||
vault.hashicorp.com/agent-inject-template-rfi-django-auth: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
|
||||||
DJANGO_SECRET_KEY={{ index .Data.data "key" }}
|
|
||||||
SAREX_BACKEND_AUTH={{ index .Data.data "key" }}
|
|
||||||
{{- end -}}
|
|
||||||
spec:
|
|
||||||
serviceAccountName: rfi-vault
|
|
||||||
containers:
|
|
||||||
- name: api
|
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/rfi-backend:production_d1e2e80d
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
command: ["/bin/sh", "-ec"]
|
|
||||||
args:
|
|
||||||
- |
|
|
||||||
set -a
|
|
||||||
[ -f /vault/secrets/rfi-db ] && . /vault/secrets/rfi-db
|
|
||||||
[ -f /vault/secrets/rfi-s3 ] && . /vault/secrets/rfi-s3
|
|
||||||
[ -f /vault/secrets/rfi-rabbitmq ] && . /vault/secrets/rfi-rabbitmq
|
|
||||||
[ -f /vault/secrets/rfi-django-auth ] && . /vault/secrets/rfi-django-auth
|
|
||||||
set +a
|
|
||||||
exec ./entrypoint.sh
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 8000
|
|
||||||
protocol: TCP
|
|
||||||
env:
|
|
||||||
- name: JWT_AUTH_ENABLE
|
|
||||||
value: "True"
|
|
||||||
- name: NOTIFICATIONS_ENABLE
|
|
||||||
value: "false"
|
|
||||||
- name: NOTIFICATIONS_EMAIL_FROM
|
|
||||||
value: hello@sarex.io
|
|
||||||
- name: NOTIFICATIONS_SERVICE_URL
|
|
||||||
value: https://sarex.contour.infra.sarex.tech/rfi
|
|
||||||
- name: SAREX_BACKEND_URL
|
|
||||||
value: http://backend-svc.django.svc.cluster.local
|
|
||||||
- name: EAV_URL
|
|
||||||
value: http://backend-svc.eav.svc.cluster.local:80
|
|
||||||
- name: GATEWAY_URL
|
|
||||||
value: http://pdm-svc.documentations.svc.cluster.local:80
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: "25m"
|
|
||||||
memory: 128Mi
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: regcred
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: backend-svc
|
|
||||||
namespace: rfi
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: rfi-backend-api
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 80
|
|
||||||
targetPort: 8000
|
|
||||||
protocol: TCP
|
|
||||||
149
apps/rfi/base/backend.yaml
Normal file
149
apps/rfi/base/backend.yaml
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: backend
|
||||||
|
namespace: rfi
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: "0.1.9"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
backend:
|
||||||
|
enabled: true
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: rfi-vault
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: rfi-backend-api
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
command:
|
||||||
|
_default: ["/bin/sh", "-ec"]
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/rfi-db ] && . /vault/secrets/rfi-db
|
||||||
|
[ -f /vault/secrets/rfi-s3 ] && . /vault/secrets/rfi-s3
|
||||||
|
[ -f /vault/secrets/rfi-rabbitmq ] && . /vault/secrets/rfi-rabbitmq
|
||||||
|
[ -f /vault/secrets/rfi-django-auth ] && . /vault/secrets/rfi-django-auth
|
||||||
|
set +a
|
||||||
|
exec ./entrypoint.sh
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: false
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/rfi-backend:production_d1e2e80d
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: backend-svc
|
||||||
|
type:
|
||||||
|
_default: ClusterIP
|
||||||
|
port:
|
||||||
|
_default: 80
|
||||||
|
targetPort:
|
||||||
|
_default: 8000
|
||||||
|
portName:
|
||||||
|
_default: http
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
envs:
|
||||||
|
- name: JWT_AUTH_ENABLE
|
||||||
|
value:
|
||||||
|
_default: "True"
|
||||||
|
- name: NOTIFICATIONS_ENABLE
|
||||||
|
value:
|
||||||
|
_default: "false"
|
||||||
|
- name: NOTIFICATIONS_EMAIL_FROM
|
||||||
|
value:
|
||||||
|
_default: hello@sarex.io
|
||||||
|
- name: NOTIFICATIONS_SERVICE_URL
|
||||||
|
value:
|
||||||
|
_default: https://sarex.contour.infra.sarex.tech/rfi
|
||||||
|
- name: SAREX_BACKEND_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.django.svc.cluster.local
|
||||||
|
- name: EAV_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.eav.svc.cluster.local:80
|
||||||
|
- name: GATEWAY_URL
|
||||||
|
value:
|
||||||
|
_default: http://pdm-svc.documentations.svc.cluster.local:80
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
||||||
|
vault.hashicorp.com/agent-init-first: "true"
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: rfi
|
||||||
|
vault.hashicorp.com/agent-inject-secret-rfi-db: secrets/data/apps/rfi/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-rfi-db: |-
|
||||||
|
{{- with secret "secrets/data/apps/rfi/postgres" -}}
|
||||||
|
DB_HOST={{ index .Data.data "host" }}
|
||||||
|
DB_PORT={{ index .Data.data "port" }}
|
||||||
|
DB_NAME={{ index .Data.data "database" }}
|
||||||
|
DB_USER={{ index .Data.data "username" }}
|
||||||
|
DB_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-rfi-s3: secrets/data/minio/apps/rfi
|
||||||
|
vault.hashicorp.com/agent-inject-template-rfi-s3: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/rfi" -}}
|
||||||
|
YC_S3_ENDPOINT_URL={{ index .Data.data.client "endpoint" }}
|
||||||
|
YC_S3_BUCKET_NAME=rfi
|
||||||
|
YC_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||||
|
YC_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-rfi-rabbitmq: secrets/data/rabbitmq/apps/rfi
|
||||||
|
vault.hashicorp.com/agent-inject-template-rfi-rabbitmq: |-
|
||||||
|
{{- with secret "secrets/data/rabbitmq/apps/rfi" -}}
|
||||||
|
RABBITMQ_VHOST={{ index .Data.data "vhost" }}
|
||||||
|
RABBITMQ_USERNAME={{ index .Data.data "username" }}
|
||||||
|
RABBITMQ_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
RABBITMQ_PORT=5672
|
||||||
|
RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-rfi-django-auth: secrets/data/vault/common/django_auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-rfi-django-auth: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
||||||
|
DJANGO_SECRET_KEY={{ index .Data.data "key" }}
|
||||||
|
SAREX_BACKEND_AUTH={{ index .Data.data "key" }}
|
||||||
|
{{- end -}}
|
||||||
@ -1,99 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: celery
|
|
||||||
namespace: rfi
|
|
||||||
labels:
|
|
||||||
app: celery
|
|
||||||
service: celery
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: celery
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: celery
|
|
||||||
service: celery
|
|
||||||
annotations:
|
|
||||||
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
|
||||||
vault.hashicorp.com/agent-init-first: "true"
|
|
||||||
vault.hashicorp.com/agent-inject: "true"
|
|
||||||
vault.hashicorp.com/agent-pre-populate-only: "true"
|
|
||||||
vault.hashicorp.com/auth-path: auth/kubernetes
|
|
||||||
vault.hashicorp.com/role: rfi
|
|
||||||
vault.hashicorp.com/agent-inject-secret-rfi-db: secrets/data/postgresql/apps/rfi
|
|
||||||
vault.hashicorp.com/agent-inject-template-rfi-db: |-
|
|
||||||
{{- with secret "secrets/data/postgresql/apps/rfi" -}}
|
|
||||||
DB_HOST=postgresql.rfi.svc.cluster.local
|
|
||||||
DB_PORT=5432
|
|
||||||
DB_NAME=rfi_db
|
|
||||||
DB_USER={{ index .Data.data "username" }}
|
|
||||||
DB_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-rfi-s3: secrets/data/minio/apps/rfi
|
|
||||||
vault.hashicorp.com/agent-inject-template-rfi-s3: |-
|
|
||||||
{{- with secret "secrets/data/minio/apps/rfi" -}}
|
|
||||||
YC_S3_ENDPOINT_URL={{ index .Data.data.client "endpoint" }}
|
|
||||||
YC_S3_BUCKET_NAME=rfi
|
|
||||||
YC_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
|
||||||
YC_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-rfi-rabbitmq: secrets/data/rabbitmq/apps/rfi
|
|
||||||
vault.hashicorp.com/agent-inject-template-rfi-rabbitmq: |-
|
|
||||||
{{- with secret "secrets/data/rabbitmq/apps/rfi" -}}
|
|
||||||
RABBITMQ_VHOST={{ index .Data.data "vhost" }}
|
|
||||||
RABBITMQ_USERNAME={{ index .Data.data "username" }}
|
|
||||||
RABBITMQ_PASSWORD={{ index .Data.data "password" }}
|
|
||||||
RABBITMQ_PORT=5672
|
|
||||||
RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
|
|
||||||
{{- end -}}
|
|
||||||
vault.hashicorp.com/agent-inject-secret-rfi-django-auth: secrets/data/vault/common/django_auth
|
|
||||||
vault.hashicorp.com/agent-inject-template-rfi-django-auth: |-
|
|
||||||
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
|
||||||
DJANGO_SECRET_KEY={{ index .Data.data "key" }}
|
|
||||||
SAREX_BACKEND_AUTH={{ index .Data.data "key" }}
|
|
||||||
{{- end -}}
|
|
||||||
spec:
|
|
||||||
serviceAccountName: rfi-vault
|
|
||||||
containers:
|
|
||||||
- name: celery
|
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/rfi-backend:dev4
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
command: ["/bin/sh", "-ec"]
|
|
||||||
args:
|
|
||||||
- |
|
|
||||||
set -a
|
|
||||||
[ -f /vault/secrets/rfi-db ] && . /vault/secrets/rfi-db
|
|
||||||
[ -f /vault/secrets/rfi-s3 ] && . /vault/secrets/rfi-s3
|
|
||||||
[ -f /vault/secrets/rfi-rabbitmq ] && . /vault/secrets/rfi-rabbitmq
|
|
||||||
[ -f /vault/secrets/rfi-django-auth ] && . /vault/secrets/rfi-django-auth
|
|
||||||
set +a
|
|
||||||
exec uv run celery -A config worker -l info
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 8000
|
|
||||||
protocol: TCP
|
|
||||||
env:
|
|
||||||
- name: JWT_AUTH_ENABLE
|
|
||||||
value: "True"
|
|
||||||
- name: NOTIFICATIONS_ENABLE
|
|
||||||
value: "false"
|
|
||||||
- name: NOTIFICATIONS_EMAIL_FROM
|
|
||||||
value: hello@sarex.io
|
|
||||||
- name: NOTIFICATIONS_SERVICE_URL
|
|
||||||
value: https://lk.srx.wb.ru:30443/rfi
|
|
||||||
- name: SAREX_BACKEND_URL
|
|
||||||
value: http://backend-svc.django.svc.cluster.local
|
|
||||||
- name: EAV_URL
|
|
||||||
value: http://backend-svc.eav.svc.cluster.local:80
|
|
||||||
- name: GATEWAY_URL
|
|
||||||
value: http://pdm-api.documentations.svc.cluster.local:8080
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: "25m"
|
|
||||||
memory: 128Mi
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: regcred
|
|
||||||
139
apps/rfi/base/celery.yaml
Normal file
139
apps/rfi/base/celery.yaml
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
---
|
||||||
|
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||||
|
kind: HelmRelease
|
||||||
|
metadata:
|
||||||
|
name: celery
|
||||||
|
namespace: rfi
|
||||||
|
spec:
|
||||||
|
interval: 10m
|
||||||
|
chart:
|
||||||
|
spec:
|
||||||
|
chart: universal-chart
|
||||||
|
version: "0.1.9"
|
||||||
|
sourceRef:
|
||||||
|
kind: HelmRepository
|
||||||
|
name: yc-oci-charts
|
||||||
|
namespace: flux-system
|
||||||
|
interval: 10m
|
||||||
|
install:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
upgrade:
|
||||||
|
remediation:
|
||||||
|
retries: 3
|
||||||
|
values:
|
||||||
|
global:
|
||||||
|
env: _default
|
||||||
|
services:
|
||||||
|
celery:
|
||||||
|
enabled: true
|
||||||
|
serviceAccount:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: rfi-vault
|
||||||
|
deployment:
|
||||||
|
enabled: true
|
||||||
|
name:
|
||||||
|
_default: celery
|
||||||
|
replicaCount:
|
||||||
|
_default: 1
|
||||||
|
port:
|
||||||
|
_default: 8000
|
||||||
|
command:
|
||||||
|
_default: ["/bin/sh", "-ec"]
|
||||||
|
args:
|
||||||
|
_default:
|
||||||
|
- |
|
||||||
|
set -a
|
||||||
|
[ -f /vault/secrets/rfi-db ] && . /vault/secrets/rfi-db
|
||||||
|
[ -f /vault/secrets/rfi-s3 ] && . /vault/secrets/rfi-s3
|
||||||
|
[ -f /vault/secrets/rfi-rabbitmq ] && . /vault/secrets/rfi-rabbitmq
|
||||||
|
[ -f /vault/secrets/rfi-django-auth ] && . /vault/secrets/rfi-django-auth
|
||||||
|
set +a
|
||||||
|
exec uv run celery -A config worker -l info
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu:
|
||||||
|
_default: 25m
|
||||||
|
memory:
|
||||||
|
_default: 128Mi
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: false
|
||||||
|
readiness:
|
||||||
|
enabled: false
|
||||||
|
image:
|
||||||
|
name:
|
||||||
|
_default: cr.yandex/crp3ccidau046kdj8g9q/rfi-backend:dev4
|
||||||
|
pullPolicy:
|
||||||
|
_default: IfNotPresent
|
||||||
|
service:
|
||||||
|
enabled: false
|
||||||
|
imagePullSecrets:
|
||||||
|
enabled:
|
||||||
|
_default: true
|
||||||
|
name:
|
||||||
|
_default: regcred
|
||||||
|
envs:
|
||||||
|
- name: JWT_AUTH_ENABLE
|
||||||
|
value:
|
||||||
|
_default: "True"
|
||||||
|
- name: NOTIFICATIONS_ENABLE
|
||||||
|
value:
|
||||||
|
_default: "false"
|
||||||
|
- name: NOTIFICATIONS_EMAIL_FROM
|
||||||
|
value:
|
||||||
|
_default: hello@sarex.io
|
||||||
|
- name: NOTIFICATIONS_SERVICE_URL
|
||||||
|
value:
|
||||||
|
_default: https://lk.srx.wb.ru:30443/rfi
|
||||||
|
- name: SAREX_BACKEND_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.django.svc.cluster.local
|
||||||
|
- name: EAV_URL
|
||||||
|
value:
|
||||||
|
_default: http://backend-svc.eav.svc.cluster.local:80
|
||||||
|
- name: GATEWAY_URL
|
||||||
|
value:
|
||||||
|
_default: http://pdm-api.documentations.svc.cluster.local:8080
|
||||||
|
podAnnotations:
|
||||||
|
_default:
|
||||||
|
traffic.sidecar.istio.io/excludeOutboundPorts: "8200"
|
||||||
|
vault.hashicorp.com/agent-init-first: "true"
|
||||||
|
vault.hashicorp.com/agent-inject: "true"
|
||||||
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
||||||
|
vault.hashicorp.com/auth-path: auth/kubernetes
|
||||||
|
vault.hashicorp.com/role: rfi
|
||||||
|
vault.hashicorp.com/agent-inject-secret-rfi-db: secrets/data/apps/rfi/postgres
|
||||||
|
vault.hashicorp.com/agent-inject-template-rfi-db: |-
|
||||||
|
{{- with secret "secrets/data/apps/rfi/postgres" -}}
|
||||||
|
DB_HOST={{ index .Data.data "host" }}
|
||||||
|
DB_PORT={{ index .Data.data "port" }}
|
||||||
|
DB_NAME={{ index .Data.data "database" }}
|
||||||
|
DB_USER={{ index .Data.data "username" }}
|
||||||
|
DB_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-rfi-s3: secrets/data/minio/apps/rfi
|
||||||
|
vault.hashicorp.com/agent-inject-template-rfi-s3: |-
|
||||||
|
{{- with secret "secrets/data/minio/apps/rfi" -}}
|
||||||
|
YC_S3_ENDPOINT_URL={{ index .Data.data.client "endpoint" }}
|
||||||
|
YC_S3_BUCKET_NAME=rfi
|
||||||
|
YC_S3_ACCESS_KEY_ID={{ index .Data.data "access_key" }}
|
||||||
|
YC_S3_SECRET_ACCESS_KEY={{ index .Data.data "secret_key" }}
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-rfi-rabbitmq: secrets/data/rabbitmq/apps/rfi
|
||||||
|
vault.hashicorp.com/agent-inject-template-rfi-rabbitmq: |-
|
||||||
|
{{- with secret "secrets/data/rabbitmq/apps/rfi" -}}
|
||||||
|
RABBITMQ_VHOST={{ index .Data.data "vhost" }}
|
||||||
|
RABBITMQ_USERNAME={{ index .Data.data "username" }}
|
||||||
|
RABBITMQ_PASSWORD={{ index .Data.data "password" }}
|
||||||
|
RABBITMQ_PORT=5672
|
||||||
|
RABBITMQ_HOST=rabbitmq.rabbitmq.svc.cluster.local
|
||||||
|
{{- end -}}
|
||||||
|
vault.hashicorp.com/agent-inject-secret-rfi-django-auth: secrets/data/vault/common/django_auth
|
||||||
|
vault.hashicorp.com/agent-inject-template-rfi-django-auth: |-
|
||||||
|
{{- with secret "secrets/data/vault/common/django_auth" -}}
|
||||||
|
DJANGO_SECRET_KEY={{ index .Data.data "key" }}
|
||||||
|
SAREX_BACKEND_AUTH={{ index .Data.data "key" }}
|
||||||
|
{{- end -}}
|
||||||
@ -1,32 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: frontend
|
|
||||||
namespace: rfi
|
|
||||||
labels:
|
|
||||||
app: frontend
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: frontend
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: frontend
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: frontend
|
|
||||||
image: cr.yandex/crp3ccidau046kdj8g9q/rfi-frontend:production_b827756f_wb
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 80
|
|
||||||
protocol: TCP
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
cpu: 25m
|
|
||||||
memory: 100Mi
|
|
||||||
imagePullSecrets:
|
|
||||||
- name: regcred
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user