diff --git a/apps/attachments/brusnika-stage/backend.yaml b/apps/attachments/brusnika-stage/backend.yaml index bcae509..7908561 100644 --- a/apps/attachments/brusnika-stage/backend.yaml +++ b/apps/attachments/brusnika-stage/backend.yaml @@ -30,12 +30,22 @@ spec: env: _default services: - backend: + attachments: enabled: true + tolerations: + - key: + _default: dedicated + operator: + _default: Equal + value: + _default: processing-light + effect: + _default: NoSchedule + image: name: - _default: cr.yandex/crp3ccidau046kdj8g9q/att9:dev + _default: cr.yandex/crp3ccidau046kdj8g9q/attachments:production_6dbb4dce pullPolicy: _default: IfNotPresent @@ -54,11 +64,30 @@ spec: port: _default: 8000 + command: + _default: ["/bin/bash", "/opt/attachments/entrypoint.sh"] + probes: liveness: enabled: false readiness: - enabled: false + enabled: true + httpGet: + path: + _default: /openapi.json + port: + _default: 8000 + + volumes: + _default: + - name: yc-s3 + mountPath: + _default: /etc/sarex/yc-s3-storage + readOnly: + _default: true + secret: + secretName: + _default: yc-s3 service: enabled: true @@ -143,4 +172,4 @@ spec: commitSha: "" gitlabUri: "" gitlabJobUrl: "" - owner: "" \ No newline at end of file + owner: "" diff --git a/apps/control-interface/brusnika-stage/admin-frontend.yaml b/apps/control-interface/brusnika-stage/admin-frontend.yaml new file mode 100644 index 0000000..0fdc43f --- /dev/null +++ b/apps/control-interface/brusnika-stage/admin-frontend.yaml @@ -0,0 +1,94 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: admin-frontend + namespace: django + +spec: + interval: 10m + + chart: + spec: + chart: universal-chart + version: "0.1.7" + sourceRef: + kind: HelmRepository + name: yc-oci-charts + namespace: flux-system + interval: 10m + + install: + remediation: + retries: 1 + + upgrade: + remediation: + retries: 1 + + values: + global: + env: _default + + services: + admin-frontend: + enabled: true + + image: + name: + _default: cr.yandex/crp3ccidau046kdj8g9q/admin-frontend:uralkal_4d0a3684 + pullPolicy: + _default: IfNotPresent + + deployment: + enabled: true + + name: + _default: admin-frontend + + replicaCount: + _default: 1 + + port: + _default: 80 + + resources: + requests: + cpu: + _default: 100m + memory: + _default: 100Mi + + probes: + liveness: + enabled: false + readiness: + enabled: false + + service: + enabled: true + + name: + _default: admin-frontend-svc + + type: + _default: ClusterIP + + port: + _default: 8080 + + targetPort: + _default: 80 + + portName: + _default: http + + imagePullSecrets: + enabled: + _default: true + name: + _default: regcred + + commitSha: "" + gitlabUri: "" + gitlabJobUrl: "" + owner: "" diff --git a/apps/control-interface/brusnika-stage/kustomization.yaml b/apps/control-interface/brusnika-stage/kustomization.yaml index 64ff6c5..0f01c8f 100644 --- a/apps/control-interface/brusnika-stage/kustomization.yaml +++ b/apps/control-interface/brusnika-stage/kustomization.yaml @@ -4,3 +4,4 @@ kind: Kustomization namespace: django resources: - helmrelease.yaml + - admin-frontend.yaml diff --git a/apps/django/brusnika-stage/sarex-frontend.yaml b/apps/django/brusnika-stage/sarex-frontend.yaml index 3463263..6c5dd56 100644 --- a/apps/django/brusnika-stage/sarex-frontend.yaml +++ b/apps/django/brusnika-stage/sarex-frontend.yaml @@ -35,7 +35,7 @@ spec: image: name: - _default: cr.yandex/crp3ccidau046kdj8g9q/sarex-frontend-dev:contour_5.30.1 + _default: cr.yandex/crp3ccidau046kdj8g9q/sarex-frontend-dev:contour_5.37.0 pullPolicy: _default: IfNotPresent diff --git a/apps/documentations/brusnika-stage/api.yaml b/apps/documentations/brusnika-stage/api.yaml index 9ab8794..9bbbb4c 100644 --- a/apps/documentations/brusnika-stage/api.yaml +++ b/apps/documentations/brusnika-stage/api.yaml @@ -114,7 +114,11 @@ spec: - name: CDE_API_ENABLED value: - _default: "false" + _default: "true" + + - name: CDE_API_URL + value: + _default: "http://cde-api.documentations.svc.cluster.local:8000" - name: POSTGRES_DB value: diff --git a/apps/documentations/brusnika-stage/cde-api-virtualservice.yaml b/apps/documentations/brusnika-stage/cde-api-virtualservice.yaml new file mode 100644 index 0000000..4e74feb --- /dev/null +++ b/apps/documentations/brusnika-stage/cde-api-virtualservice.yaml @@ -0,0 +1,52 @@ +apiVersion: networking.istio.io/v1 +kind: VirtualService +metadata: + name: vs-cde-api + namespace: documentations +spec: + hosts: + - test.sarex.brusnika.tech + gateways: + - ingress-nginx/main-gateway + http: + - match: + - uri: + prefix: /documentations/v2/ + rewrite: + uri: /external/v2/ + corsPolicy: &id001 + allowOrigins: + - exact: https://test.sarex.brusnika.tech + - exact: https://document-link.test.sarex.brusnika.tech + allowMethods: + - GET + - POST + - PUT + - DELETE + - PATCH + - OPTIONS + - HEAD + allowHeaders: + - Authorization + - Content-Type + - Identity + - Range + - Cache-control + allowCredentials: true + maxAge: 24h + route: + - destination: + host: cde-api.documentations.svc.cluster.local + port: + number: 8000 + - match: + - uri: + prefix: /cde/app/ + rewrite: + uri: /app/ + corsPolicy: *id001 + route: + - destination: + host: cde-api.documentations.svc.cluster.local + port: + number: 8000 diff --git a/apps/documentations/brusnika-stage/cde-api-worker-copy.yaml b/apps/documentations/brusnika-stage/cde-api-worker-copy.yaml new file mode 100644 index 0000000..00013dc --- /dev/null +++ b/apps/documentations/brusnika-stage/cde-api-worker-copy.yaml @@ -0,0 +1,389 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: cde-api-worker-copy + namespace: documentations +spec: + interval: 10m + chart: + spec: + chart: universal-chart + version: 0.1.7 + 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: + worker-copy: + enabled: true + deployment: + enabled: true + name: + _default: worker-copy + replicaCount: + _default: 1 + revisionHistoryLimit: + _default: 5 + resources: + requests: + cpu: + _default: 100m + memory: + _default: 64Mi + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + image: + name: + _default: cr.yandex/crp3ccidau046kdj8g9q/cde-api-worker-copy:production_19194531 + pullPolicy: + _default: IfNotPresent + service: + enabled: false + imagePullSecrets: + enabled: + _default: true + name: + _default: regcred + envs: + - name: CDE_API_EAV_HOST + value: + _default: http://eav-service.eav.svc.cluster.local:8000 + - name: CDE_API_APP_NAME + value: + _default: worker-copy + - name: CDE_API_LOG_LEVEL + value: + _default: info + - name: CDE_API_OBSERVABILITY_ENABLE + value: + _default: 'false' + - name: CDE_API_S3_MAX_SINGLE_UPLOAD_SIZE + value: + _default: '5368709120' + - name: CDE_API_S3_MAX_PART_SIZE + value: + _default: '524288000' + - name: CDE_API_S3_UPLOAD_STALL_TIMEOUT + value: + _default: 10m + - name: CDE_API_SYSTEMLOG_BASE_URL + value: + _default: http://api-service.system-log.svc.cluster.local:80 + - name: CDE_API_SYSTEMLOG_TIMEOUT_MS + value: + _default: '10000' + - name: CDE_API_DATABASE__SSLMODE + value: + _default: disable + - name: CDE_API_DATABASE__INSECURE_SKIP_TLS + value: + _default: 'false' + - name: CDE_API_DATABASE_MAX_CONN_LIFETIME + value: + _default: 30m + - name: CDE_API_DATABASE_MAX_CONN_IDLE_TIME + value: + _default: 10m + - name: CDE_API_DATABASE_HEALTH_CHECK_PERIOD + value: + _default: 30s + - name: CDE_API_DATABASE_POOL_SIZE + value: + _default: '3' + - name: CDE_API_REDIS__SSL + value: + _default: 'false' + - name: CDE_API_REDIS__POOL_SIZE + value: + _default: '5' + - name: CDE_API_REDIS__MIN_IDLE_CONNS + value: + _default: '1' + - name: CDE_API_REDIS__DIAL_TIMEOUT_MS + value: + _default: '5000' + - name: CDE_API_REDIS__READ_TIMEOUT_MS + value: + _default: '3000' + - name: CDE_API_REDIS__WRITE_TIMEOUT_MS + value: + _default: '3000' + - name: CDE_API_REDIS__DEFAULT_TTL_MINUTES + value: + _default: '10' + - name: CDE_API_REDIS__PERMISSION_CACHE_ENABLED + value: + _default: 'false' + - name: CDE_API_S3_USE_SSL + value: + _default: 'false' + - name: CDE_API_S3_BUCKET_LOOKUP + value: + _default: auto + - name: CDE_API_S3_INSECURE_SKIP_TLS + value: + _default: 'false' + - name: CDE_API_S3_CHECK_BUCKET + value: + _default: 'false' + - name: CDE_API_S3_BUCKET_NAME + value: + _default: documentations + - name: CDE_API_ZEEBE_USE_PLAINTEXT + value: + _default: 'true' + - name: CDE_API_MAILER_BASE_URL + value: + _default: http://mailer-service.mailer:8000 + - name: CDE_API_MAILER_FROM_EMAIL + value: + _default: noreply@sarex.io + - name: CDE_API_WORKFLOW_BASE_URL + value: + _default: http://workflows-api-service.workflow.svc.cluster.local:8000 + - name: CDE_API_WORKFLOW_RETRY_COUNT + value: + _default: '3' + - name: CDE_API_WORKFLOW_TIMEOUT_MS + value: + _default: '30000' + - name: CDE_API_BIMAPI_URL + value: + _default: http://backend-service.bim.svc.cluster.local:8000 + - name: CDE_API_BIMAPI_V2_URL + value: + _default: http://backend-service.bim.svc.cluster.local:8000 + - name: CDE_API_BIMAPI_RETRY_COUNT + value: + _default: '3' + - name: CDE_API_BIMAPI_TIMEOUT_MS + value: + _default: '30000' + - name: CDE_API_BIMAPI_TIMEOUT_V2_MS + value: + _default: '300000' + - name: CDE_API_CONTAINER_REGISTRY + value: + _default: cr.yandex/crp3ccidau046kdj8g9q + - name: CDE_API_WORKFLOWS_IMAGES_VERSION + value: + _default: master + - name: CDE_API_DJANGO_HOST + value: + _default: http://backend.django.svc.cluster.local:8000 + - name: CDE_API_ENVIRONMENT + value: + _default: stage + - name: CDE_API_CONVERTED_PDF_TO_S3 + value: + _default: 'true' + - name: CDE_API_CONVERT_DXF_TO_GEOJSON + value: + _default: 'true' + - name: CDE_API_CONVERT_DWG_TO_GEOJSON + value: + _default: 'true' + - name: CDE_API_USE_BIMV1_FOR_BIMV2 + value: + _default: 'false' + - name: CDE_API_LAST_MASTER_BIM + value: + _default: '2000' + - name: CDE_API_LAST_SLAVE_1_BIM + value: + _default: '2250' + - name: CDE_API_LAST_SLAVE_2_BIM + value: + _default: '15000' + - name: CDE_API_USE_BIM_INSERTER + value: + _default: 'true' + - name: CDE_API_USE_LEGACY_BIM_FLOW + value: + _default: 'true' + - name: CDE_API_DOCUMENTATION_V2_URL + value: + _default: http://documentations-api.documentations.svc.cluster.local:8080 + - name: CDE_API_INTERNAL_URL + value: + _default: http://cde-api.documentations:8000 + - name: CDE_API_FLOWS_URL + value: + _default: http://backend-service.flows.svc.cluster.local:8000 + - name: CDE_API_TRANSMITTALS_URL + value: + _default: http://transmittal-service.transmittal.svc.cluster.local:80 + - name: CDE_API_WORKFLOWS_CONFIG_FILEPATH + value: + _default: /etc/app/tasks_execution_config.json + - name: CDE_API_WORKSPACE_BASE_URL + value: + _default: http://workspaces-service.workspaces.svc.cluster.local:8000 + - name: CDE_API_WORKSPACE_RETRY_COUNT + value: + _default: '3' + - name: CDE_API_WORKSPACE_TIMEOUT_MS + value: + _default: '10000' + - name: CDE_API_RABBITMQ__MARKS_ROUTING_KEY + value: + _default: pdf_markings_input + - name: CDE_API_RABBITMQ__HASHER_ROUTING_KEY + value: + _default: hash.compute.normal + - name: CDE_API_RABBITMQ__HASHER_EXCHANGE + value: + _default: hash.compute + - name: CDE_API_ISSUES_SYNC_ENABLED + value: + _default: 'false' + - name: CDE_API_ISSUES_BASE_URL + value: + _default: http://issues-service.platform:8000 + - name: CDE_API_ISSUES_RETRY_COUNT + value: + _default: '3' + - name: CDE_API_ISSUES_TIMEOUT_MS + value: + _default: '30000' + - name: CDE_API_COPY_WORKER_JOBS + value: + _default: '' + - name: CDE_API_COPY_JOB_TIMEOUT_MINUTES + value: + _default: '30' + - name: CDE_API_COPY_STEP_PARALLELISM + value: + _default: '1' + - name: CDE_API_COPY_S3_PARALLELISM + value: + _default: '1' + - name: CDE_API_REDIS__HOST + value: + _default: redis + - name: CDE_API_REDIS__PORT + value: + _default: '6379' + - name: CDE_API_DATABASE__HOST + value: + _default: 192.168.2.45 + - name: CDE_API_DATABASE__PORT + value: + _default: '5432' + - name: CDE_API_DATABASE__NAME + value: + _default: documentations + secretEnvs: + - name: CDE_API_DATABASE__USER + secretName: + _default: postgres-secret + secretKey: + _default: username + - name: CDE_API_DATABASE__PASSWORD + secretName: + _default: postgres-secret + secretKey: + _default: password + - name: CDE_API_S3_ENDPOINT + secretName: + _default: cde-api-s3-secret + secretKey: + _default: endpoint + - name: CDE_API_S3_ACCESS_KEY + secretName: + _default: cde-api-s3-secret + secretKey: + _default: access_key + - name: CDE_API_S3_SECRET_KEY + secretName: + _default: cde-api-s3-secret + secretKey: + _default: secret_key + - name: CDE_API_ZEEBE_GATEWAY_ADDRESS + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: gateway_address + - name: CDE_API_ZEEBE_CLIENT_ID + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: client_id + - name: CDE_API_ZEEBE_CLIENT_SECRET + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: client_secret + - name: CDE_API_ZEEBE_AUTH_SERVER_URL + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: auth_server_url + - name: CDE_API_RABBITMQ__HOST + secretName: + _default: rabbitmq + secretKey: + _default: host + - name: CDE_API_RABBITMQ__PORT + secretName: + _default: rabbitmq + secretKey: + _default: port + - name: CDE_API_RABBITMQ__USER + secretName: + _default: rabbitmq + secretKey: + _default: username + - name: CDE_API_RABBITMQ__PASSWORD + secretName: + _default: rabbitmq + secretKey: + _default: password + - name: CDE_API_RABBITMQ__VHOST + secretName: + _default: rabbitmq + secretKey: + _default: vhost + volumes: + _default: + - name: tasks-execution-config + mountPath: + _default: /etc/app/tasks_execution_config.json + subPath: + _default: tasks_execution_config.json + readOnly: + _default: true + configMap: + name: + _default: tasks-execution-config-documentation-v2 + items: + - key: tasks-execution-config-documentation-v2.json + path: + _default: tasks_execution_config.json + defaultMode: + _default: '0644' + tolerations: + - key: + _default: dedicated + operator: + _default: Equal + value: + _default: processing-light + effect: + _default: NoSchedule + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/brusnika-stage/cde-api-worker-move.yaml b/apps/documentations/brusnika-stage/cde-api-worker-move.yaml new file mode 100644 index 0000000..5da56c9 --- /dev/null +++ b/apps/documentations/brusnika-stage/cde-api-worker-move.yaml @@ -0,0 +1,371 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: cde-api-worker-move + namespace: documentations +spec: + interval: 10m + chart: + spec: + chart: universal-chart + version: 0.1.7 + 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: + worker-move: + enabled: true + deployment: + enabled: true + name: + _default: worker-move + replicaCount: + _default: 1 + revisionHistoryLimit: + _default: 5 + resources: + requests: + cpu: + _default: 100m + memory: + _default: 64Mi + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + image: + name: + _default: cr.yandex/crp3ccidau046kdj8g9q/cde-api-worker-move:production_19194531 + pullPolicy: + _default: IfNotPresent + service: + enabled: false + imagePullSecrets: + enabled: + _default: true + name: + _default: regcred + envs: + - name: CDE_API_EAV_HOST + value: + _default: http://eav-service.eav.svc.cluster.local:8000 + - name: CDE_API_APP_NAME + value: + _default: worker-move + - name: CDE_API_LOG_LEVEL + value: + _default: info + - name: CDE_API_OBSERVABILITY_ENABLE + value: + _default: 'false' + - name: CDE_API_S3_MAX_SINGLE_UPLOAD_SIZE + value: + _default: '5368709120' + - name: CDE_API_S3_MAX_PART_SIZE + value: + _default: '524288000' + - name: CDE_API_S3_UPLOAD_STALL_TIMEOUT + value: + _default: 10m + - name: CDE_API_SYSTEMLOG_BASE_URL + value: + _default: http://api-service.system-log.svc.cluster.local:80 + - name: CDE_API_SYSTEMLOG_TIMEOUT_MS + value: + _default: '10000' + - name: CDE_API_DATABASE__SSLMODE + value: + _default: disable + - name: CDE_API_DATABASE__INSECURE_SKIP_TLS + value: + _default: 'false' + - name: CDE_API_DATABASE_MAX_CONN_LIFETIME + value: + _default: 30m + - name: CDE_API_DATABASE_MAX_CONN_IDLE_TIME + value: + _default: 10m + - name: CDE_API_DATABASE_HEALTH_CHECK_PERIOD + value: + _default: 30s + - name: CDE_API_DATABASE_POOL_SIZE + value: + _default: '10' + - name: CDE_API_REDIS__SSL + value: + _default: 'false' + - name: CDE_API_REDIS__POOL_SIZE + value: + _default: '5' + - name: CDE_API_REDIS__MIN_IDLE_CONNS + value: + _default: '1' + - name: CDE_API_REDIS__DIAL_TIMEOUT_MS + value: + _default: '5000' + - name: CDE_API_REDIS__READ_TIMEOUT_MS + value: + _default: '3000' + - name: CDE_API_REDIS__WRITE_TIMEOUT_MS + value: + _default: '3000' + - name: CDE_API_REDIS__DEFAULT_TTL_MINUTES + value: + _default: '10' + - name: CDE_API_REDIS__PERMISSION_CACHE_ENABLED + value: + _default: 'false' + - name: CDE_API_S3_USE_SSL + value: + _default: 'false' + - name: CDE_API_S3_BUCKET_LOOKUP + value: + _default: auto + - name: CDE_API_S3_INSECURE_SKIP_TLS + value: + _default: 'false' + - name: CDE_API_S3_CHECK_BUCKET + value: + _default: 'false' + - name: CDE_API_S3_BUCKET_NAME + value: + _default: documentations + - name: CDE_API_ZEEBE_USE_PLAINTEXT + value: + _default: 'true' + - name: CDE_API_MAILER_BASE_URL + value: + _default: http://mailer-service.mailer:8000 + - name: CDE_API_MAILER_FROM_EMAIL + value: + _default: noreply@sarex.io + - name: CDE_API_WORKFLOW_BASE_URL + value: + _default: http://workflows-api-service.workflow.svc.cluster.local:8000 + - name: CDE_API_WORKFLOW_RETRY_COUNT + value: + _default: '3' + - name: CDE_API_WORKFLOW_TIMEOUT_MS + value: + _default: '30000' + - name: CDE_API_BIMAPI_URL + value: + _default: http://backend-service.bim.svc.cluster.local:8000 + - name: CDE_API_BIMAPI_V2_URL + value: + _default: http://backend-service.bim.svc.cluster.local:8000 + - name: CDE_API_BIMAPI_RETRY_COUNT + value: + _default: '3' + - name: CDE_API_BIMAPI_TIMEOUT_MS + value: + _default: '30000' + - name: CDE_API_BIMAPI_TIMEOUT_V2_MS + value: + _default: '300000' + - name: CDE_API_CONTAINER_REGISTRY + value: + _default: cr.yandex/crp3ccidau046kdj8g9q + - name: CDE_API_WORKFLOWS_IMAGES_VERSION + value: + _default: master + - name: CDE_API_DJANGO_HOST + value: + _default: http://backend.django.svc.cluster.local:8000 + - name: CDE_API_ENVIRONMENT + value: + _default: stage + - name: CDE_API_CONVERTED_PDF_TO_S3 + value: + _default: 'true' + - name: CDE_API_CONVERT_DXF_TO_GEOJSON + value: + _default: 'true' + - name: CDE_API_CONVERT_DWG_TO_GEOJSON + value: + _default: 'true' + - name: CDE_API_USE_BIMV1_FOR_BIMV2 + value: + _default: 'false' + - name: CDE_API_LAST_MASTER_BIM + value: + _default: '2000' + - name: CDE_API_LAST_SLAVE_1_BIM + value: + _default: '2250' + - name: CDE_API_LAST_SLAVE_2_BIM + value: + _default: '15000' + - name: CDE_API_USE_BIM_INSERTER + value: + _default: 'true' + - name: CDE_API_USE_LEGACY_BIM_FLOW + value: + _default: 'true' + - name: CDE_API_DOCUMENTATION_V2_URL + value: + _default: http://documentations-api.documentations.svc.cluster.local:8080 + - name: CDE_API_INTERNAL_URL + value: + _default: http://cde-api.documentations:8000 + - name: CDE_API_FLOWS_URL + value: + _default: http://backend-service.flows.svc.cluster.local:8000 + - name: CDE_API_TRANSMITTALS_URL + value: + _default: http://transmittal-service.transmittal.svc.cluster.local:80 + - name: CDE_API_WORKFLOWS_CONFIG_FILEPATH + value: + _default: /etc/app/tasks_execution_config.json + - name: CDE_API_WORKSPACE_BASE_URL + value: + _default: http://workspaces-service.workspaces.svc.cluster.local:8000 + - name: CDE_API_WORKSPACE_RETRY_COUNT + value: + _default: '3' + - name: CDE_API_WORKSPACE_TIMEOUT_MS + value: + _default: '10000' + - name: CDE_API_RABBITMQ__MARKS_ROUTING_KEY + value: + _default: pdf_markings_input + - name: CDE_API_RABBITMQ__HASHER_ROUTING_KEY + value: + _default: hash.compute.normal + - name: CDE_API_RABBITMQ__HASHER_EXCHANGE + value: + _default: hash.compute + - name: CDE_API_MOVE_WORKER_JOBS + value: + _default: '' + - name: CDE_API_MOVE_JOB_TIMEOUT_MINUTES + value: + _default: '30' + - name: CDE_API_REDIS__HOST + value: + _default: redis + - name: CDE_API_REDIS__PORT + value: + _default: '6379' + - name: CDE_API_DATABASE__HOST + value: + _default: 192.168.2.45 + - name: CDE_API_DATABASE__PORT + value: + _default: '5432' + - name: CDE_API_DATABASE__NAME + value: + _default: documentations + secretEnvs: + - name: CDE_API_DATABASE__USER + secretName: + _default: postgres-secret + secretKey: + _default: username + - name: CDE_API_DATABASE__PASSWORD + secretName: + _default: postgres-secret + secretKey: + _default: password + - name: CDE_API_S3_ENDPOINT + secretName: + _default: cde-api-s3-secret + secretKey: + _default: endpoint + - name: CDE_API_S3_ACCESS_KEY + secretName: + _default: cde-api-s3-secret + secretKey: + _default: access_key + - name: CDE_API_S3_SECRET_KEY + secretName: + _default: cde-api-s3-secret + secretKey: + _default: secret_key + - name: CDE_API_ZEEBE_GATEWAY_ADDRESS + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: gateway_address + - name: CDE_API_ZEEBE_CLIENT_ID + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: client_id + - name: CDE_API_ZEEBE_CLIENT_SECRET + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: client_secret + - name: CDE_API_ZEEBE_AUTH_SERVER_URL + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: auth_server_url + - name: CDE_API_RABBITMQ__HOST + secretName: + _default: rabbitmq + secretKey: + _default: host + - name: CDE_API_RABBITMQ__PORT + secretName: + _default: rabbitmq + secretKey: + _default: port + - name: CDE_API_RABBITMQ__USER + secretName: + _default: rabbitmq + secretKey: + _default: username + - name: CDE_API_RABBITMQ__PASSWORD + secretName: + _default: rabbitmq + secretKey: + _default: password + - name: CDE_API_RABBITMQ__VHOST + secretName: + _default: rabbitmq + secretKey: + _default: vhost + volumes: + _default: + - name: tasks-execution-config + mountPath: + _default: /etc/app/tasks_execution_config.json + subPath: + _default: tasks_execution_config.json + readOnly: + _default: true + configMap: + name: + _default: tasks-execution-config-documentation-v2 + items: + - key: tasks-execution-config-documentation-v2.json + path: + _default: tasks_execution_config.json + defaultMode: + _default: '0644' + tolerations: + - key: + _default: dedicated + operator: + _default: Equal + value: + _default: processing-light + effect: + _default: NoSchedule + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/brusnika-stage/cde-api-worker-s32d-create-upload.yaml b/apps/documentations/brusnika-stage/cde-api-worker-s32d-create-upload.yaml new file mode 100644 index 0000000..9a5773d --- /dev/null +++ b/apps/documentations/brusnika-stage/cde-api-worker-s32d-create-upload.yaml @@ -0,0 +1,259 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: cde-api-worker-s32d-create-upload + namespace: documentations +spec: + interval: 10m + chart: + spec: + chart: universal-chart + version: 0.1.7 + 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: + worker-s32d-create-upload: + enabled: true + deployment: + enabled: true + name: + _default: worker-s32d-create-upload + replicaCount: + _default: 1 + revisionHistoryLimit: + _default: 5 + resources: + requests: + cpu: + _default: 200m + memory: + _default: 256Mi + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + image: + name: + _default: cr.yandex/crp3ccidau046kdj8g9q/cde-api-worker-s32d-create-upload:production_19194531 + pullPolicy: + _default: IfNotPresent + service: + enabled: false + imagePullSecrets: + enabled: + _default: true + name: + _default: regcred + envs: + - name: CDE_API_EAV_HOST + value: + _default: http://eav-service.eav.svc.cluster.local:8000 + - name: CDE_API_APP_NAME + value: + _default: worker-s32d-create-upload + - name: CDE_API_LOG_LEVEL + value: + _default: info + - name: CDE_API_OBSERVABILITY_ENABLE + value: + _default: 'false' + - name: CDE_API_S3_MAX_SINGLE_UPLOAD_SIZE + value: + _default: '5368709120' + - name: CDE_API_S3_MAX_PART_SIZE + value: + _default: '524288000' + - name: CDE_API_S3_UPLOAD_STALL_TIMEOUT + value: + _default: 10m + - name: CDE_API_DATABASE__SSLMODE + value: + _default: disable + - name: CDE_API_DATABASE__INSECURE_SKIP_TLS + value: + _default: 'false' + - name: CDE_API_DATABASE_MAX_CONN_LIFETIME + value: + _default: 30m + - name: CDE_API_DATABASE_MAX_CONN_IDLE_TIME + value: + _default: 10m + - name: CDE_API_DATABASE_HEALTH_CHECK_PERIOD + value: + _default: 30s + - name: CDE_API_DATABASE_POOL_SIZE + value: + _default: '3' + - name: CDE_API_REDIS__SSL + value: + _default: 'false' + - name: CDE_API_REDIS__POOL_SIZE + value: + _default: '5' + - name: CDE_API_REDIS__MIN_IDLE_CONNS + value: + _default: '1' + - name: CDE_API_REDIS__DIAL_TIMEOUT_MS + value: + _default: '5000' + - name: CDE_API_REDIS__READ_TIMEOUT_MS + value: + _default: '3000' + - name: CDE_API_REDIS__WRITE_TIMEOUT_MS + value: + _default: '3000' + - name: CDE_API_REDIS__DEFAULT_TTL_MINUTES + value: + _default: '10' + - name: CDE_API_REDIS__PERMISSION_CACHE_ENABLED + value: + _default: 'false' + - name: CDE_API_S3_USE_SSL + value: + _default: 'false' + - name: CDE_API_S3_BUCKET_LOOKUP + value: + _default: auto + - name: CDE_API_S3_INSECURE_SKIP_TLS + value: + _default: 'false' + - name: CDE_API_S3_CHECK_BUCKET + value: + _default: 'false' + - name: CDE_API_S3_BUCKET_NAME + value: + _default: documentations + - name: CDE_API_ZEEBE_USE_PLAINTEXT + value: + _default: 'true' + - name: CDE_API_S32D_READERAT_BLOCK_SIZE_MB + value: + _default: '8' + - name: CDE_API_S32D_READERAT_CACHE_BLOCKS + value: + _default: '8' + - name: CDE_API_S32D_WORKER_CREATE_UPLOAD_TIMEOUT_MIN + value: + _default: '240' + - name: CDE_API_S32D_WORKER_CREATE_UPLOAD_MAX_JOBS + value: + _default: '2' + - name: CDE_API_MAILER_BASE_URL + value: + _default: http://mailer-service.mailer:8000 + - name: CDE_API_MAILER_FROM_EMAIL + value: + _default: noreply@sarex.io + - name: CDE_API_FLOWS_URL + value: + _default: http://backend-service.flows.svc.cluster.local:8000 + - name: CDE_API_TRANSMITTALS_URL + value: + _default: http://transmittal-service.transmittal.svc.cluster.local:80 + - name: CDE_API_WORKFLOWS_CONFIG_FILEPATH + value: + _default: /etc/app/tasks_execution_config.json + - name: CDE_API_REDIS__HOST + value: + _default: redis + - name: CDE_API_REDIS__PORT + value: + _default: '6379' + - name: CDE_API_DATABASE__HOST + value: + _default: 192.168.2.45 + - name: CDE_API_DATABASE__PORT + value: + _default: '5432' + - name: CDE_API_DATABASE__NAME + value: + _default: documentations + secretEnvs: + - name: CDE_API_DATABASE__USER + secretName: + _default: postgres-secret + secretKey: + _default: username + - name: CDE_API_DATABASE__PASSWORD + secretName: + _default: postgres-secret + secretKey: + _default: password + - name: CDE_API_S3_ENDPOINT + secretName: + _default: cde-api-s3-secret + secretKey: + _default: endpoint + - name: CDE_API_S3_ACCESS_KEY + secretName: + _default: cde-api-s3-secret + secretKey: + _default: access_key + - name: CDE_API_S3_SECRET_KEY + secretName: + _default: cde-api-s3-secret + secretKey: + _default: secret_key + - name: CDE_API_ZEEBE_GATEWAY_ADDRESS + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: gateway_address + - name: CDE_API_ZEEBE_CLIENT_ID + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: client_id + - name: CDE_API_ZEEBE_CLIENT_SECRET + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: client_secret + - name: CDE_API_ZEEBE_AUTH_SERVER_URL + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: auth_server_url + volumes: + _default: + - name: tasks-execution-config + mountPath: + _default: /etc/app/tasks_execution_config.json + subPath: + _default: tasks_execution_config.json + readOnly: + _default: true + configMap: + name: + _default: tasks-execution-config-documentation-v2 + items: + - key: tasks-execution-config-documentation-v2.json + path: + _default: tasks_execution_config.json + defaultMode: + _default: '0644' + tolerations: + - key: + _default: dedicated + operator: + _default: Equal + value: + _default: processing-light + effect: + _default: NoSchedule + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/brusnika-stage/cde-api-worker-s32d-handle-error.yaml b/apps/documentations/brusnika-stage/cde-api-worker-s32d-handle-error.yaml new file mode 100644 index 0000000..fc16a16 --- /dev/null +++ b/apps/documentations/brusnika-stage/cde-api-worker-s32d-handle-error.yaml @@ -0,0 +1,253 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: cde-api-worker-s32d-handle-error + namespace: documentations +spec: + interval: 10m + chart: + spec: + chart: universal-chart + version: 0.1.7 + 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: + worker-s32d-handle-error: + enabled: true + deployment: + enabled: true + name: + _default: worker-s32d-handle-error + replicaCount: + _default: 1 + revisionHistoryLimit: + _default: 5 + resources: + requests: + cpu: + _default: 50m + memory: + _default: 64Mi + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + image: + name: + _default: cr.yandex/crp3ccidau046kdj8g9q/cde-api-worker-s32d-handle-error:production_19194531 + pullPolicy: + _default: IfNotPresent + service: + enabled: false + imagePullSecrets: + enabled: + _default: true + name: + _default: regcred + envs: + - name: CDE_API_EAV_HOST + value: + _default: http://eav-service.eav.svc.cluster.local:8000 + - name: CDE_API_APP_NAME + value: + _default: worker-s32d-handle-error + - name: CDE_API_LOG_LEVEL + value: + _default: info + - name: CDE_API_OBSERVABILITY_ENABLE + value: + _default: 'false' + - name: CDE_API_S3_MAX_SINGLE_UPLOAD_SIZE + value: + _default: '5368709120' + - name: CDE_API_S3_MAX_PART_SIZE + value: + _default: '524288000' + - name: CDE_API_S3_UPLOAD_STALL_TIMEOUT + value: + _default: 10m + - name: CDE_API_DATABASE__SSLMODE + value: + _default: disable + - name: CDE_API_DATABASE__INSECURE_SKIP_TLS + value: + _default: 'false' + - name: CDE_API_DATABASE_MAX_CONN_LIFETIME + value: + _default: 30m + - name: CDE_API_DATABASE_MAX_CONN_IDLE_TIME + value: + _default: 10m + - name: CDE_API_DATABASE_HEALTH_CHECK_PERIOD + value: + _default: 30s + - name: CDE_API_DATABASE_POOL_SIZE + value: + _default: '2' + - name: CDE_API_REDIS__SSL + value: + _default: 'false' + - name: CDE_API_REDIS__POOL_SIZE + value: + _default: '3' + - name: CDE_API_REDIS__MIN_IDLE_CONNS + value: + _default: '1' + - name: CDE_API_REDIS__DIAL_TIMEOUT_MS + value: + _default: '5000' + - name: CDE_API_REDIS__READ_TIMEOUT_MS + value: + _default: '3000' + - name: CDE_API_REDIS__WRITE_TIMEOUT_MS + value: + _default: '3000' + - name: CDE_API_REDIS__DEFAULT_TTL_MINUTES + value: + _default: '10' + - name: CDE_API_REDIS__PERMISSION_CACHE_ENABLED + value: + _default: 'false' + - name: CDE_API_S3_USE_SSL + value: + _default: 'false' + - name: CDE_API_S3_BUCKET_LOOKUP + value: + _default: auto + - name: CDE_API_S3_INSECURE_SKIP_TLS + value: + _default: 'false' + - name: CDE_API_S3_CHECK_BUCKET + value: + _default: 'false' + - name: CDE_API_S3_BUCKET_NAME + value: + _default: documentations + - name: CDE_API_ZEEBE_USE_PLAINTEXT + value: + _default: 'true' + - name: CDE_API_S32D_WORKER_HANDLE_ERROR_TIMEOUT_MIN + value: + _default: '10' + - name: CDE_API_S32D_WORKER_HANDLE_ERROR_MAX_JOBS + value: + _default: '4' + - name: CDE_API_MAILER_BASE_URL + value: + _default: http://mailer-service.mailer:8000 + - name: CDE_API_MAILER_FROM_EMAIL + value: + _default: noreply@sarex.io + - name: CDE_API_FLOWS_URL + value: + _default: http://backend-service.flows.svc.cluster.local:8000 + - name: CDE_API_TRANSMITTALS_URL + value: + _default: http://transmittal-service.transmittal.svc.cluster.local:80 + - name: CDE_API_WORKFLOWS_CONFIG_FILEPATH + value: + _default: /etc/app/tasks_execution_config.json + - name: CDE_API_REDIS__HOST + value: + _default: redis + - name: CDE_API_REDIS__PORT + value: + _default: '6379' + - name: CDE_API_DATABASE__HOST + value: + _default: 192.168.2.45 + - name: CDE_API_DATABASE__PORT + value: + _default: '5432' + - name: CDE_API_DATABASE__NAME + value: + _default: documentations + secretEnvs: + - name: CDE_API_DATABASE__USER + secretName: + _default: postgres-secret + secretKey: + _default: username + - name: CDE_API_DATABASE__PASSWORD + secretName: + _default: postgres-secret + secretKey: + _default: password + - name: CDE_API_S3_ENDPOINT + secretName: + _default: cde-api-s3-secret + secretKey: + _default: endpoint + - name: CDE_API_S3_ACCESS_KEY + secretName: + _default: cde-api-s3-secret + secretKey: + _default: access_key + - name: CDE_API_S3_SECRET_KEY + secretName: + _default: cde-api-s3-secret + secretKey: + _default: secret_key + - name: CDE_API_ZEEBE_GATEWAY_ADDRESS + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: gateway_address + - name: CDE_API_ZEEBE_CLIENT_ID + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: client_id + - name: CDE_API_ZEEBE_CLIENT_SECRET + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: client_secret + - name: CDE_API_ZEEBE_AUTH_SERVER_URL + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: auth_server_url + volumes: + _default: + - name: tasks-execution-config + mountPath: + _default: /etc/app/tasks_execution_config.json + subPath: + _default: tasks_execution_config.json + readOnly: + _default: true + configMap: + name: + _default: tasks-execution-config-documentation-v2 + items: + - key: tasks-execution-config-documentation-v2.json + path: + _default: tasks_execution_config.json + defaultMode: + _default: '0644' + tolerations: + - key: + _default: dedicated + operator: + _default: Equal + value: + _default: processing-light + effect: + _default: NoSchedule + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/brusnika-stage/cde-api-worker-s32d-process-workflows.yaml b/apps/documentations/brusnika-stage/cde-api-worker-s32d-process-workflows.yaml new file mode 100644 index 0000000..05f6846 --- /dev/null +++ b/apps/documentations/brusnika-stage/cde-api-worker-s32d-process-workflows.yaml @@ -0,0 +1,322 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: cde-api-worker-s32d-process-workflows + namespace: documentations +spec: + interval: 10m + chart: + spec: + chart: universal-chart + version: 0.1.7 + 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: + worker-s32d-process-workflows: + enabled: true + deployment: + enabled: true + name: + _default: worker-s32d-process-workflows + replicaCount: + _default: 1 + revisionHistoryLimit: + _default: 5 + resources: + requests: + cpu: + _default: 200m + memory: + _default: 256Mi + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + image: + name: + _default: cr.yandex/crp3ccidau046kdj8g9q/cde-api-worker-s32d-process-workflows:production_19194531 + pullPolicy: + _default: IfNotPresent + service: + enabled: false + imagePullSecrets: + enabled: + _default: true + name: + _default: regcred + envs: + - name: CDE_API_EAV_HOST + value: + _default: http://eav-service.eav.svc.cluster.local:8000 + - name: CDE_API_APP_NAME + value: + _default: worker-s32d-process-workflows + - name: CDE_API_LOG_LEVEL + value: + _default: info + - name: CDE_API_OBSERVABILITY_ENABLE + value: + _default: 'false' + - name: CDE_API_S3_MAX_SINGLE_UPLOAD_SIZE + value: + _default: '5368709120' + - name: CDE_API_S3_MAX_PART_SIZE + value: + _default: '524288000' + - name: CDE_API_S3_UPLOAD_STALL_TIMEOUT + value: + _default: 10m + - name: CDE_API_DATABASE__SSLMODE + value: + _default: disable + - name: CDE_API_DATABASE__INSECURE_SKIP_TLS + value: + _default: 'false' + - name: CDE_API_DATABASE_MAX_CONN_LIFETIME + value: + _default: 30m + - name: CDE_API_DATABASE_MAX_CONN_IDLE_TIME + value: + _default: 10m + - name: CDE_API_DATABASE_HEALTH_CHECK_PERIOD + value: + _default: 30s + - name: CDE_API_DATABASE_POOL_SIZE + value: + _default: '3' + - name: CDE_API_REDIS__SSL + value: + _default: 'false' + - name: CDE_API_REDIS__POOL_SIZE + value: + _default: '5' + - name: CDE_API_REDIS__MIN_IDLE_CONNS + value: + _default: '1' + - name: CDE_API_REDIS__DIAL_TIMEOUT_MS + value: + _default: '5000' + - name: CDE_API_REDIS__READ_TIMEOUT_MS + value: + _default: '3000' + - name: CDE_API_REDIS__WRITE_TIMEOUT_MS + value: + _default: '3000' + - name: CDE_API_REDIS__DEFAULT_TTL_MINUTES + value: + _default: '10' + - name: CDE_API_REDIS__PERMISSION_CACHE_ENABLED + value: + _default: 'false' + - name: CDE_API_S3_USE_SSL + value: + _default: 'false' + - name: CDE_API_S3_BUCKET_LOOKUP + value: + _default: auto + - name: CDE_API_S3_INSECURE_SKIP_TLS + value: + _default: 'false' + - name: CDE_API_S3_CHECK_BUCKET + value: + _default: 'false' + - name: CDE_API_S3_BUCKET_NAME + value: + _default: documentations + - name: CDE_API_ZEEBE_USE_PLAINTEXT + value: + _default: 'true' + - name: CDE_API_S32D_WORKER_PROCESS_WORKFLOWS_TIMEOUT_MIN + value: + _default: '480' + - name: CDE_API_S32D_WORKER_PROCESS_WORKFLOWS_MAX_JOBS + value: + _default: '1' + - name: CDE_API_MAILER_BASE_URL + value: + _default: http://mailer-service.mailer:8000 + - name: CDE_API_MAILER_FROM_EMAIL + value: + _default: noreply@sarex.io + - name: CDE_API_WORKFLOW_BASE_URL + value: + _default: http://workflows-api-service.workflow.svc.cluster.local:8000 + - name: CDE_API_WORKFLOW_RETRY_COUNT + value: + _default: '3' + - name: CDE_API_WORKFLOW_TIMEOUT_MS + value: + _default: '30000' + - name: CDE_API_BIMAPI_URL + value: + _default: http://backend-service.bim.svc.cluster.local:8000 + - name: CDE_API_BIMAPI_V2_URL + value: + _default: http://backend-service.bim.svc.cluster.local:8000 + - name: CDE_API_BIMAPI_RETRY_COUNT + value: + _default: '3' + - name: CDE_API_BIMAPI_TIMEOUT_MS + value: + _default: '30000' + - name: CDE_API_BIMAPI_TIMEOUT_V2_MS + value: + _default: '300000' + - name: CDE_API_CONTAINER_REGISTRY + value: + _default: cr.yandex/crp3ccidau046kdj8g9q + - name: CDE_API_WORKFLOWS_IMAGES_VERSION + value: + _default: master + - name: CDE_API_DJANGO_HOST + value: + _default: http://backend.django.svc.cluster.local:8000 + - name: CDE_API_ENVIRONMENT + value: + _default: stage + - name: CDE_API_CONVERTED_PDF_TO_S3 + value: + _default: 'true' + - name: CDE_API_CONVERT_DXF_TO_GEOJSON + value: + _default: 'true' + - name: CDE_API_CONVERT_DWG_TO_GEOJSON + value: + _default: 'true' + - name: CDE_API_USE_BIMV1_FOR_BIMV2 + value: + _default: 'false' + - name: CDE_API_LAST_MASTER_BIM + value: + _default: '2000' + - name: CDE_API_LAST_SLAVE_1_BIM + value: + _default: '2250' + - name: CDE_API_LAST_SLAVE_2_BIM + value: + _default: '15000' + - name: CDE_API_USE_BIM_INSERTER + value: + _default: 'true' + - name: CDE_API_USE_LEGACY_BIM_FLOW + value: + _default: 'true' + - name: CDE_API_DOCUMENTATION_V2_URL + value: + _default: http://documentations-api.documentations.svc.cluster.local:8080 + - name: CDE_API_INTERNAL_URL + value: + _default: http://cde-api.documentations:8000 + - name: CDE_API_FLOWS_URL + value: + _default: http://backend-service.flows.svc.cluster.local:8000 + - name: CDE_API_TRANSMITTALS_URL + value: + _default: http://transmittal-service.transmittal.svc.cluster.local:80 + - name: CDE_API_WORKFLOWS_CONFIG_FILEPATH + value: + _default: /etc/app/tasks_execution_config.json + - name: CDE_API_REDIS__HOST + value: + _default: redis + - name: CDE_API_REDIS__PORT + value: + _default: '6379' + - name: CDE_API_DATABASE__HOST + value: + _default: 192.168.2.45 + - name: CDE_API_DATABASE__PORT + value: + _default: '5432' + - name: CDE_API_DATABASE__NAME + value: + _default: documentations + secretEnvs: + - name: CDE_API_DATABASE__USER + secretName: + _default: postgres-secret + secretKey: + _default: username + - name: CDE_API_DATABASE__PASSWORD + secretName: + _default: postgres-secret + secretKey: + _default: password + - name: CDE_API_S3_ENDPOINT + secretName: + _default: cde-api-s3-secret + secretKey: + _default: endpoint + - name: CDE_API_S3_ACCESS_KEY + secretName: + _default: cde-api-s3-secret + secretKey: + _default: access_key + - name: CDE_API_S3_SECRET_KEY + secretName: + _default: cde-api-s3-secret + secretKey: + _default: secret_key + - name: CDE_API_ZEEBE_GATEWAY_ADDRESS + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: gateway_address + - name: CDE_API_ZEEBE_CLIENT_ID + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: client_id + - name: CDE_API_ZEEBE_CLIENT_SECRET + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: client_secret + - name: CDE_API_ZEEBE_AUTH_SERVER_URL + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: auth_server_url + volumes: + _default: + - name: tasks-execution-config + mountPath: + _default: /etc/app/tasks_execution_config.json + subPath: + _default: tasks_execution_config.json + readOnly: + _default: true + configMap: + name: + _default: tasks-execution-config-documentation-v2 + items: + - key: tasks-execution-config-documentation-v2.json + path: + _default: tasks_execution_config.json + defaultMode: + _default: '0644' + tolerations: + - key: + _default: dedicated + operator: + _default: Equal + value: + _default: processing-light + effect: + _default: NoSchedule + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/brusnika-stage/cde-api-worker-s32d-publish-documents.yaml b/apps/documentations/brusnika-stage/cde-api-worker-s32d-publish-documents.yaml new file mode 100644 index 0000000..d1023f1 --- /dev/null +++ b/apps/documentations/brusnika-stage/cde-api-worker-s32d-publish-documents.yaml @@ -0,0 +1,268 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: cde-api-worker-s32d-publish-documents + namespace: documentations +spec: + interval: 10m + chart: + spec: + chart: universal-chart + version: 0.1.7 + 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: + worker-s32d-publish-documents: + enabled: true + deployment: + enabled: true + name: + _default: worker-s32d-publish-documents + replicaCount: + _default: 1 + revisionHistoryLimit: + _default: 5 + resources: + requests: + cpu: + _default: 100m + memory: + _default: 64Mi + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + image: + name: + _default: cr.yandex/crp3ccidau046kdj8g9q/cde-api-worker-s32d-publish-documents:production_19194531 + pullPolicy: + _default: IfNotPresent + service: + enabled: false + imagePullSecrets: + enabled: + _default: true + name: + _default: regcred + envs: + - name: CDE_API_EAV_HOST + value: + _default: http://eav-service.eav.svc.cluster.local:8000 + - name: CDE_API_APP_NAME + value: + _default: worker-s32d-publish-documents + - name: CDE_API_LOG_LEVEL + value: + _default: info + - name: CDE_API_OBSERVABILITY_ENABLE + value: + _default: 'false' + - name: CDE_API_S3_MAX_SINGLE_UPLOAD_SIZE + value: + _default: '5368709120' + - name: CDE_API_S3_MAX_PART_SIZE + value: + _default: '524288000' + - name: CDE_API_S3_UPLOAD_STALL_TIMEOUT + value: + _default: 10m + - name: CDE_API_DATABASE__SSLMODE + value: + _default: disable + - name: CDE_API_DATABASE__INSECURE_SKIP_TLS + value: + _default: 'false' + - name: CDE_API_DATABASE_MAX_CONN_LIFETIME + value: + _default: 30m + - name: CDE_API_DATABASE_MAX_CONN_IDLE_TIME + value: + _default: 10m + - name: CDE_API_DATABASE_HEALTH_CHECK_PERIOD + value: + _default: 30s + - name: CDE_API_DATABASE_POOL_SIZE + value: + _default: '3' + - name: CDE_API_REDIS__SSL + value: + _default: 'false' + - name: CDE_API_REDIS__POOL_SIZE + value: + _default: '5' + - name: CDE_API_REDIS__MIN_IDLE_CONNS + value: + _default: '1' + - name: CDE_API_REDIS__DIAL_TIMEOUT_MS + value: + _default: '5000' + - name: CDE_API_REDIS__READ_TIMEOUT_MS + value: + _default: '3000' + - name: CDE_API_REDIS__WRITE_TIMEOUT_MS + value: + _default: '3000' + - name: CDE_API_REDIS__DEFAULT_TTL_MINUTES + value: + _default: '10' + - name: CDE_API_REDIS__PERMISSION_CACHE_ENABLED + value: + _default: 'false' + - name: CDE_API_S3_USE_SSL + value: + _default: 'false' + - name: CDE_API_S3_BUCKET_LOOKUP + value: + _default: auto + - name: CDE_API_S3_INSECURE_SKIP_TLS + value: + _default: 'false' + - name: CDE_API_S3_CHECK_BUCKET + value: + _default: 'false' + - name: CDE_API_S3_BUCKET_NAME + value: + _default: documentations + - name: CDE_API_ZEEBE_USE_PLAINTEXT + value: + _default: 'true' + - name: CDE_API_S32D_WORKER_PUBLISH_DOCUMENTS_TIMEOUT_MIN + value: + _default: '10' + - name: CDE_API_S32D_WORKER_PUBLISH_DOCUMENTS_MAX_JOBS + value: + _default: '2' + - name: CDE_API_MAILER_BASE_URL + value: + _default: http://mailer-service.mailer:8000 + - name: CDE_API_MAILER_FROM_EMAIL + value: + _default: noreply@sarex.io + - name: CDE_API_SYSTEMLOG_BASE_URL + value: + _default: http://api-service.system-log.svc.cluster.local:80 + - name: CDE_API_SYSTEMLOG_TIMEOUT_MS + value: + _default: '10000' + - name: CDE_API_FLOWS_URL + value: + _default: http://backend-service.flows.svc.cluster.local:8000 + - name: CDE_API_TRANSMITTALS_URL + value: + _default: http://transmittal-service.transmittal.svc.cluster.local:80 + - name: CDE_API_WORKSPACE_BASE_URL + value: + _default: http://workspaces-service.workspaces.svc.cluster.local:8000 + - name: CDE_API_WORKSPACE_RETRY_COUNT + value: + _default: '3' + - name: CDE_API_WORKSPACE_TIMEOUT_MS + value: + _default: '10000' + - name: CDE_API_WORKFLOWS_CONFIG_FILEPATH + value: + _default: /etc/app/tasks_execution_config.json + - name: CDE_API_REDIS__HOST + value: + _default: redis + - name: CDE_API_REDIS__PORT + value: + _default: '6379' + - name: CDE_API_DATABASE__HOST + value: + _default: 192.168.2.45 + - name: CDE_API_DATABASE__PORT + value: + _default: '5432' + - name: CDE_API_DATABASE__NAME + value: + _default: documentations + secretEnvs: + - name: CDE_API_DATABASE__USER + secretName: + _default: postgres-secret + secretKey: + _default: username + - name: CDE_API_DATABASE__PASSWORD + secretName: + _default: postgres-secret + secretKey: + _default: password + - name: CDE_API_S3_ENDPOINT + secretName: + _default: cde-api-s3-secret + secretKey: + _default: endpoint + - name: CDE_API_S3_ACCESS_KEY + secretName: + _default: cde-api-s3-secret + secretKey: + _default: access_key + - name: CDE_API_S3_SECRET_KEY + secretName: + _default: cde-api-s3-secret + secretKey: + _default: secret_key + - name: CDE_API_ZEEBE_GATEWAY_ADDRESS + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: gateway_address + - name: CDE_API_ZEEBE_CLIENT_ID + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: client_id + - name: CDE_API_ZEEBE_CLIENT_SECRET + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: client_secret + - name: CDE_API_ZEEBE_AUTH_SERVER_URL + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: auth_server_url + volumes: + _default: + - name: tasks-execution-config + mountPath: + _default: /etc/app/tasks_execution_config.json + subPath: + _default: tasks_execution_config.json + readOnly: + _default: true + configMap: + name: + _default: tasks-execution-config-documentation-v2 + items: + - key: tasks-execution-config-documentation-v2.json + path: + _default: tasks_execution_config.json + defaultMode: + _default: '0644' + tolerations: + - key: + _default: dedicated + operator: + _default: Equal + value: + _default: processing-light + effect: + _default: NoSchedule + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/brusnika-stage/cde-api.yaml b/apps/documentations/brusnika-stage/cde-api.yaml new file mode 100644 index 0000000..682c2af --- /dev/null +++ b/apps/documentations/brusnika-stage/cde-api.yaml @@ -0,0 +1,469 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: cde-api + namespace: documentations +spec: + interval: 10m + chart: + spec: + chart: universal-chart + version: 0.1.7 + 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: + cde-api: + enabled: true + deployment: + enabled: true + name: + _default: cde-api + replicaCount: + _default: 1 + revisionHistoryLimit: + _default: 5 + port: + _default: 8000 + resources: + requests: + cpu: + _default: 200m + memory: + _default: 256Mi + probes: + readiness: + enabled: true + type: + _default: tcpSocket + tcpSocket: + port: + _default: 8000 + periodSeconds: + _default: 5 + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + image: + name: + _default: cr.yandex/crp3ccidau046kdj8g9q/cde-api:production_19194531 + pullPolicy: + _default: IfNotPresent + service: + enabled: true + name: + _default: cde-api + type: + _default: ClusterIP + port: + _default: 8000 + targetPort: + _default: 8000 + portName: + _default: http + imagePullSecrets: + enabled: + _default: true + name: + _default: regcred + envs: + - name: CDE_API_RESOURCES_BASE_URL + value: + _default: http://iam-backend.iam.svc.cluster.local:8000 + - name: CDE_API_RESOURCES_TIMEOUT + value: + _default: 10s + - name: CDE_API_APP_NAME + value: + _default: cde-api + - name: CDE_API_LOG_LEVEL + value: + _default: debug + - name: CDE_API_HTTP_PORT + value: + _default: '8000' + - name: CDE_API_HTTP_READ_TIMEOUT + value: + _default: 0s + - name: CDE_API_HTTP_WRITE_TIMEOUT + value: + _default: 0s + - name: CDE_API_HTTP_IDLE_TIMEOUT + value: + _default: 120s + - name: CDE_API_HTTP_READ_BUFFER_SIZE + value: + _default: '96' + - name: CDE_API_OBSERVABILITY_ENABLE + value: + _default: 'false' + - name: CDE_API_S3_MAX_SINGLE_UPLOAD_SIZE + value: + _default: '5368709120' + - name: CDE_API_S3_MAX_PART_SIZE + value: + _default: '524288000' + - name: CDE_API_S3_UPLOAD_STALL_TIMEOUT + value: + _default: 10m + - name: CDE_API_PUBLIC_LINK_HOST + value: + _default: https://document-link.test.sarex.brusnika.tech + - name: CDE_API_WORKFLOW_BASE_URL + value: + _default: http://workflows-api-service.workflow.svc.cluster.local:8000 + - name: CDE_API_WORKFLOW_RETRY_COUNT + value: + _default: '3' + - name: CDE_API_WORKFLOW_RETRY_WAIT_MS + value: + _default: '500' + - name: CDE_API_WORKFLOW_TIMEOUT_MS + value: + _default: '30000' + - name: CDE_API_BIMAPI_URL + value: + _default: http://backend-service.bim.svc.cluster.local:8000 + - name: CDE_API_BIMAPI_V2_URL + value: + _default: http://backend-service.bim.svc.cluster.local:8000 + - name: CDE_API_BIMAPI_RETRY_COUNT + value: + _default: '3' + - name: CDE_API_BIMAPI_RETRY_WAIT_MS + value: + _default: '1000' + - name: CDE_API_BIMAPI_TIMEOUT_MS + value: + _default: '30000' + - name: CDE_API_BIMAPI_TIMEOUT_V2_MS + value: + _default: '300000' + - name: CDE_API_WORKSPACE_BASE_URL + value: + _default: http://workspaces-service.workspaces.svc.cluster.local:8000 + - name: CDE_API_WORKSPACE_RETRY_COUNT + value: + _default: '3' + - name: CDE_API_WORKSPACE_TIMEOUT_MS + value: + _default: '10000' + - name: CDE_API_SYSTEMLOG_BASE_URL + value: + _default: http://api-service.system-log.svc.cluster.local:80 + - name: CDE_API_SYSTEMLOG_TIMEOUT_MS + value: + _default: '10000' + - name: CDE_API_CONTAINER_REGISTRY + value: + _default: cr.yandex/crp3ccidau046kdj8g9q + - name: CDE_API_WORKFLOWS_IMAGES_VERSION + value: + _default: master + - name: CDE_API_DJANGO_HOST + value: + _default: http://backend.django.svc.cluster.local:8000 + - name: CDE_API_ENVIRONMENT + value: + _default: stage + - name: CDE_API_CONVERTED_PDF_TO_S3 + value: + _default: 'true' + - name: CDE_API_CONVERT_DXF_TO_GEOJSON + value: + _default: 'true' + - name: CDE_API_CONVERT_DWG_TO_GEOJSON + value: + _default: 'true' + - name: CDE_API_USE_BIMV1_FOR_BIMV2 + value: + _default: 'false' + - name: CDE_API_EAV_HOST + value: + _default: http://eav-service.eav.svc.cluster.local:8000 + - name: CDE_API_EAV_TIMEOUT_MS + value: + _default: '10000' + - name: CDE_API_DOCUMENTATION_V2_URL + value: + _default: http://documentations-api.documentations.svc.cluster.local:8080 + - name: CDE_API_INTERNAL_URL + value: + _default: http://cde-api.documentations:8000 + - name: CDE_API_COPY_MAX_SYNC_WAIT_MS + value: + _default: '300000' + - name: CDE_API_LAST_MASTER_BIM + value: + _default: '2000' + - name: CDE_API_LAST_SLAVE_1_BIM + value: + _default: '2250' + - name: CDE_API_LAST_SLAVE_2_BIM + value: + _default: '15000' + - name: CDE_API_USE_BIM_INSERTER + value: + _default: 'true' + - name: CDE_API_USE_LEGACY_BIM_FLOW + value: + _default: 'true' + - name: CDE_API_DATABASE_MAX_CONN_LIFETIME + value: + _default: 30m + - name: CDE_API_DATABASE_MAX_CONN_IDLE_TIME + value: + _default: 10m + - name: CDE_API_DATABASE_HEALTH_CHECK_PERIOD + value: + _default: 30s + - name: CDE_API_DATABASE_POOL_SIZE + value: + _default: '2' + - name: CDE_API_DIAGNOSTICS_SLOW_OPERATION_THRESHOLD + value: + _default: 30s + - name: CDE_API_DATABASE__SSLMODE + value: + _default: disable + - name: CDE_API_DATABASE__INSECURE_SKIP_TLS + value: + _default: 'false' + - name: CDE_API_DATABASE_OBSERVABILITY_ENABLE + value: + _default: 'false' + - name: CDE_API_REDIS__DB + value: + _default: '5' + - name: CDE_API_REDIS__SSL + value: + _default: 'false' + - name: CDE_API_REDIS__POOL_SIZE + value: + _default: '10' + - name: CDE_API_REDIS__MIN_IDLE_CONNS + value: + _default: '2' + - name: CDE_API_REDIS__DIAL_TIMEOUT_MS + value: + _default: '5000' + - name: CDE_API_REDIS__READ_TIMEOUT_MS + value: + _default: '3000' + - name: CDE_API_REDIS__WRITE_TIMEOUT_MS + value: + _default: '3000' + - name: CDE_API_REDIS__DEFAULT_TTL_MINUTES + value: + _default: '10' + - name: CDE_API_REDIS__PERMISSION_CACHE_ENABLED + value: + _default: 'false' + - name: CDE_API_S3_BUCKET_NAME + value: + _default: documentations + - name: CDE_API_S3_USE_SSL + value: + _default: 'false' + - name: CDE_API_S3_BUCKET_LOOKUP + value: + _default: auto + - name: CDE_API_S3_INSECURE_SKIP_TLS + value: + _default: 'false' + - name: CDE_API_S3_CHECK_BUCKET + value: + _default: 'false' + - name: CDE_API_S3_CONNECT_TIMEOUT + value: + _default: 10s + - name: CDE_API_S3_TLS_HANDSHAKE_TIMEOUT + value: + _default: 10s + - name: CDE_API_S32D_MAX_ARCHIVE_SIZE_BYTES + value: + _default: '1099511627776' + - name: CDE_API_S32D_MAX_FILES_COUNT + value: + _default: '500' + - name: CDE_API_ZEEBE_USE_PLAINTEXT + value: + _default: 'true' + - name: CDE_API_USERS_BASE_URL + value: + _default: http://backend.django.svc.cluster.local:8000 + - name: CDE_API_DISK_BUCKET_NAMESPACE + value: + _default: documentations + - name: CDE_API_USERS_ORIGINATOR + value: + _default: docs_prod + - name: CDE_API_USERS_TIMEOUT_MS + value: + _default: '10000' + - name: CDE_API_MAILER_BASE_URL + value: + _default: http://mailer-service.mailer:8000 + - name: CDE_API_MAILER_FROM_EMAIL + value: + _default: noreply@sarex.io + - name: CDE_API_MAILER_RETRY_COUNT + value: + _default: '2' + - name: CDE_API_MAILER_TIMEOUT_MS + value: + _default: '10000' + - name: CDE_API_FLOWS_URL + value: + _default: http://backend-service.flows.svc.cluster.local:8000 + - name: CDE_API_TRANSMITTALS_URL + value: + _default: http://transmittal-service.transmittal.svc.cluster.local:80 + - name: CDE_API_WORKFLOWS_CONFIG_FILEPATH + value: + _default: /etc/app/tasks_execution_config.json + - name: CDE_API_RABBITMQ__MARKS_ROUTING_KEY + value: + _default: pdf_markings_input + - name: CDE_API_RABBITMQ__HASHER_ROUTING_KEY + value: + _default: hash.compute.normal + - name: CDE_API_RABBITMQ__HASHER_EXCHANGE + value: + _default: hash.compute + - name: CDE_API_REDIS__HOST + value: + _default: redis + - name: CDE_API_REDIS__PORT + value: + _default: '6379' + - name: CDE_API_DATABASE__HOST + value: + _default: 192.168.2.45 + - name: CDE_API_DATABASE__PORT + value: + _default: '5432' + - name: CDE_API_DATABASE__NAME + value: + _default: documentations + secretEnvs: + - name: CDE_API_PUBLIC_KEY + secretName: + _default: public-key + secretKey: + _default: key + - name: CDE_API_DATABASE__USER + secretName: + _default: postgres-secret + secretKey: + _default: username + - name: CDE_API_DATABASE__PASSWORD + secretName: + _default: postgres-secret + secretKey: + _default: password + - name: CDE_API_S3_ENDPOINT + secretName: + _default: cde-api-s3-secret + secretKey: + _default: endpoint + - name: CDE_API_S3_ACCESS_KEY + secretName: + _default: cde-api-s3-secret + secretKey: + _default: access_key + - name: CDE_API_S3_SECRET_KEY + secretName: + _default: cde-api-s3-secret + secretKey: + _default: secret_key + - name: CDE_API_ZEEBE_GATEWAY_ADDRESS + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: gateway_address + - name: CDE_API_ZEEBE_CLIENT_ID + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: client_id + - name: CDE_API_ZEEBE_CLIENT_SECRET + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: client_secret + - name: CDE_API_ZEEBE_AUTH_SERVER_URL + secretName: + _default: cde-api-zeebe-secret + secretKey: + _default: auth_server_url + - name: CDE_API_USERS_AUTH_TOKEN + secretName: + _default: django-auth + secretKey: + _default: key + - name: CDE_API_RABBITMQ__HOST + secretName: + _default: rabbitmq + secretKey: + _default: host + - name: CDE_API_RABBITMQ__PORT + secretName: + _default: rabbitmq + secretKey: + _default: port + - name: CDE_API_RABBITMQ__USER + secretName: + _default: rabbitmq + secretKey: + _default: username + - name: CDE_API_RABBITMQ__PASSWORD + secretName: + _default: rabbitmq + secretKey: + _default: password + - name: CDE_API_RABBITMQ__VHOST + secretName: + _default: rabbitmq + secretKey: + _default: vhost + volumes: + _default: + - name: tasks-execution-config + mountPath: + _default: /etc/app/tasks_execution_config.json + subPath: + _default: tasks_execution_config.json + readOnly: + _default: true + configMap: + name: + _default: tasks-execution-config-documentation-v2 + items: + - key: tasks-execution-config-documentation-v2.json + path: + _default: tasks_execution_config.json + defaultMode: + _default: '0644' + tolerations: + - key: + _default: dedicated + operator: + _default: Equal + value: + _default: processing-light + effect: + _default: NoSchedule diff --git a/apps/documentations/brusnika-stage/kustomization.yaml b/apps/documentations/brusnika-stage/kustomization.yaml index 247514e..cd6eab4 100644 --- a/apps/documentations/brusnika-stage/kustomization.yaml +++ b/apps/documentations/brusnika-stage/kustomization.yaml @@ -9,3 +9,13 @@ resources: - filestream.yaml - hasher.yaml - pdf-markings-amqp.yaml + - cde-api-virtualservice.yaml + - cde-api-worker-copy.yaml + - cde-api-worker-move.yaml + - cde-api-worker-s32d-create-upload.yaml + - cde-api-worker-s32d-handle-error.yaml + - cde-api-worker-s32d-process-workflows.yaml + - cde-api-worker-s32d-publish-documents.yaml + - cde-api.yaml + - outbox-relay.yaml + - tasks-execution-config.yaml diff --git a/apps/documentations/brusnika-stage/outbox-relay.yaml b/apps/documentations/brusnika-stage/outbox-relay.yaml new file mode 100644 index 0000000..adec546 --- /dev/null +++ b/apps/documentations/brusnika-stage/outbox-relay.yaml @@ -0,0 +1,146 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: outbox-relay + namespace: documentations +spec: + interval: 10m + chart: + spec: + chart: universal-chart + version: 0.1.7 + 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: + outbox-relay: + enabled: true + deployment: + enabled: true + name: + _default: outbox-relay + replicaCount: + _default: 1 + revisionHistoryLimit: + _default: 5 + resources: + requests: + cpu: + _default: 100m + memory: + _default: 128Mi + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + image: + name: + _default: cr.yandex/crp3ccidau046kdj8g9q/outbox-relay:production_3e895e8a + pullPolicy: + _default: IfNotPresent + service: + enabled: false + imagePullSecrets: + enabled: + _default: true + name: + _default: regcred + envs: + - name: OUTBOX_RELAY_APP_NAME + value: + _default: cde-api-outbox-relay + - name: OUTBOX_RELAY_APP_VERSION + value: + _default: 0.1.0 + - name: OUTBOX_RELAY_LOG_LEVEL + value: + _default: info + - name: OUTBOX_RELAY_SOURCE_SERVICE + value: + _default: cde-api + - name: OUTBOX_RELAY_SOURCE_VERSION + value: + _default: 0.1.0 + - name: OUTBOX_RELAY_PG__SSLMODE + value: + _default: disable + - name: OUTBOX_RELAY_PG__POOL_MIN + value: + _default: '1' + - name: OUTBOX_RELAY_PG__POOL_MAX + value: + _default: '3' + - name: OUTBOX_RELAY_PG__TABLE + value: + _default: outbox + - name: OUTBOX_RELAY_PG__HOST + value: + _default: 192.168.2.45 + - name: OUTBOX_RELAY_PG__PORT + value: + _default: '5432' + - name: OUTBOX_RELAY_PG__NAME + value: + _default: documentations + - name: OUTBOX_RELAY_POLL_INTERVAL + value: + _default: 500ms + - name: OUTBOX_RELAY_BATCH_SIZE + value: + _default: '100' + - name: OUTBOX_RELAY_MAX_ATTEMPTS + value: + _default: '8' + - name: OUTBOX_RELAY_INITIAL_BACKOFF + value: + _default: 1s + - name: OUTBOX_RELAY_MAX_BACKOFF + value: + _default: 5m + - name: OUTBOX_RELAY_SHUTDOWN_TIMEOUT + value: + _default: 30s + - name: OUTBOX_RELAY_KAFKA__BROKERS + value: + _default: brusnika-stage-kafka-bootstrap.kafka.svc.cluster.local:9093 + - name: OUTBOX_RELAY_KAFKA__SECURITY_PROTOCOL + value: + _default: SSL + - name: OUTBOX_RELAY_KAFKA__INSECURE_SKIP_VERIFY + value: + _default: 'true' + secretEnvs: + - name: OUTBOX_RELAY_PG__USER + secretName: + _default: postgres-secret + secretKey: + _default: username + - name: OUTBOX_RELAY_PG__PASSWORD + secretName: + _default: postgres-secret + secretKey: + _default: password + tolerations: + - key: + _default: dedicated + operator: + _default: Equal + value: + _default: processing-light + effect: + _default: NoSchedule + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/brusnika-stage/tasks-execution-config.yaml b/apps/documentations/brusnika-stage/tasks-execution-config.yaml new file mode 100644 index 0000000..f4fa140 --- /dev/null +++ b/apps/documentations/brusnika-stage/tasks-execution-config.yaml @@ -0,0 +1,180 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: tasks-execution-config-documentation-v2 + namespace: documentations +data: + tasks-execution-config-documentation-v2.json: | + { + "bim_api_metadata_inserter": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "bim_api_metadata_inserter_v2": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "bim_api_metadata_inserter_v4": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "bim_differ": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "bim_updater": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "convert_to_potree": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "docx_to_pdf": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "dwg_to_geojson": { + "executor": "k8s", + "resources": { + "cpu_limits": "4", + "cpu_requests": "100m", + "memory_limits": "40Gi", + "memory_requests": "64Mi" + } + }, + "e57_to_las": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "ifc_converter_job": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "las_merge": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "mesh_optimizer": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "mesh_optimizer_v2": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "parsing_template": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "processing_converter_to_tiles": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "processing_create_colored_surface_from_geotiff": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "rendering_template": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "split_pdf_document": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "split_pdf_document_legacy": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "update_orthomosaic_data": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "web_hook_caller": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "xml_to_glb": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "document_converter": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + }, + "sparkjs_converter_wrapper": { + "executor": "k8s", + "resources": { + "cpu_requests": "100m", + "memory_requests": "64Mi" + } + } + } diff --git a/apps/iam/brusnika-stage/backend.yaml b/apps/iam/brusnika-stage/backend.yaml index e08e20f..7da8b7a 100644 --- a/apps/iam/brusnika-stage/backend.yaml +++ b/apps/iam/brusnika-stage/backend.yaml @@ -33,9 +33,19 @@ spec: backend: enabled: true + tolerations: + - key: + _default: dedicated + operator: + _default: Equal + value: + _default: processing-light + effect: + _default: NoSchedule + image: name: - _default: cr.yandex/crp3ccidau046kdj8g9q/iams:contour_29754513 + _default: cr.yandex/crp3ccidau046kdj8g9q/iams:contour_d5c05e7e pullPolicy: _default: IfNotPresent @@ -54,11 +64,26 @@ spec: port: _default: 8080 + strategy: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 0 + maxSurge: 1 + probes: liveness: enabled: false readiness: - enabled: false + enabled: true + httpGet: + path: + _default: /api/health + port: + _default: 8080 + periodSeconds: + _default: 5 + timeoutSeconds: + _default: 3 service: enabled: true @@ -174,7 +199,20 @@ spec: value: _default: "ams-sync" + - name: SPICEDB_ENDPOINT + value: + _default: spicedb.spicedb.svc.cluster.local:50051 + + - name: SPICEDB_INSECURE + value: + _default: "true" + secretEnvs: + - name: SPICEDB_TOKEN + secretName: + _default: spicedb-secret + secretKey: grpc-preshared-key + - name: DB_DSN secretName: _default: "iams-secret" @@ -203,4 +241,55 @@ spec: commitSha: "" gitlabUri: "" gitlabJobUrl: "" - owner: "" \ No newline at end of file + owner: "" + postRenderers: + - kustomize: + patches: + - target: + kind: Deployment + name: iam-backend + patch: | + apiVersion: apps/v1 + kind: Deployment + metadata: + name: iam-backend + namespace: iam + spec: + template: + metadata: + annotations: + checksum/spicedb-schema: 72606779239bef9fe18170545d8fb3d70581581048aeea55a390d414197f1ce6 + spec: + initContainers: + - name: spicedb-schema + image: ghcr.io/authzed/zed:v1.2.0 + command: + - /usr/local/bin/zed + args: + - --insecure + - --skip-version-check + - --max-retries + - '60' + - schema + - write + - /schema/iam.zed + env: + - name: ZED_ENDPOINT + value: spicedb.spicedb.svc.cluster.local:50051 + - name: ZED_TOKEN + valueFrom: + secretKeyRef: + name: spicedb-secret + key: grpc-preshared-key + volumeMounts: + - name: spicedb-schema + mountPath: /schema + readOnly: true + resources: + requests: + cpu: 10m + memory: 32Mi + volumes: + - name: spicedb-schema + configMap: + name: iam-spicedb-schema diff --git a/apps/iam/brusnika-stage/kustomization.yaml b/apps/iam/brusnika-stage/kustomization.yaml index bb1ca56..daa510d 100644 --- a/apps/iam/brusnika-stage/kustomization.yaml +++ b/apps/iam/brusnika-stage/kustomization.yaml @@ -3,4 +3,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namespace: iam resources: - - backend.yaml \ No newline at end of file + - backend.yaml + - spicedb-schema.yaml diff --git a/apps/iam/brusnika-stage/spicedb-schema.yaml b/apps/iam/brusnika-stage/spicedb-schema.yaml new file mode 100644 index 0000000..bf4b633 --- /dev/null +++ b/apps/iam/brusnika-stage/spicedb-schema.yaml @@ -0,0 +1,29 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: iam-spicedb-schema + namespace: iam +data: + iam.zed: "definition auth_group {\n\trelation grants: django_permission\n}\n\n//\ + \ Org structure. department \u0431\u0435\u0437 parent \u043C\u0435\u0436\u0434\ + \u0443 department.\ndefinition department {\n\trelation tenant: tenant\n\trelation\ + \ member: user\n\trelation service_account: service_account\n\trelation groups:\ + \ auth_group\n\tpermission group_grants = groups->grants\n}\n\ndefinition django_permission\ + \ {}\n\ndefinition position {\n\trelation tenant: tenant\n\trelation department:\ + \ department\n\trelation holder: user\n\trelation service_account: service_account\n\ + \trelation groups: auth_group\n\trelation scoped_resource: resource\n\tpermission\ + \ group_grants = groups->grants\n}\n\ndefinition resource {\n\trelation tenant:\ + \ tenant\n\trelation parent: resource\n\n\trelation read: service_account | service_account#member\n\ + \trelation write: service_account | service_account#member\n\trelation admin:\ + \ service_account | service_account#member\n\trelation view: service_account |\ + \ service_account#member\n\n\tpermission inherited_read = read + write + admin\ + \ + parent->inherited_read\n\tpermission inherited_write = write + admin + parent->inherited_write\n\ + \tpermission inherited_admin = admin + parent->inherited_admin\n\n\tpermission\ + \ allow_read = inherited_read + view + tenant->unrestricted\n\tpermission allow_write\ + \ = inherited_write\n\tpermission allow_admin = inherited_admin\n}\n\ndefinition\ + \ service_account {\n\trelation direct_member: user\n\tpermission member = direct_member\n\ + }\n\ndefinition tenant {\n\trelation unrestricted: service_account | service_account#member\n\ + }\n\ndefinition user {\n\trelation direct: django_permission\n\trelation member:\ + \ auth_group\n\trelation holder: position\n\trelation department_member: department\n\ + \tpermission global_grant = direct + member->grants + holder->group_grants + department_member->group_grants\n\ + \tpermission resource_position_grant = holder->group_grants\n}\n" diff --git a/apps/premises/brusnika-stage/backend.yaml b/apps/premises/brusnika-stage/backend.yaml new file mode 100644 index 0000000..24dbfb3 --- /dev/null +++ b/apps/premises/brusnika-stage/backend.yaml @@ -0,0 +1,135 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: premises-backend + namespace: premises +spec: + replicas: 1 + selector: + matchLabels: + app: premises-backend + template: + metadata: + labels: + app: premises-backend + annotations: + checksum/kafka-compat: 1cf33f659ec921de79cb8adb7b50901f2dab4748e3c5c871c867f0ca08ec706a + spec: + imagePullSecrets: + - name: regcred + initContainers: + - name: wait-postgres + image: postgres:16 + command: + - sh + - -ec + - until pg_isready -h postgres -p 5432; do sleep 2; done + - name: prepare-kafka-compat + image: cr.yandex/crp3ccidau046kdj8g9q/premises-backend:production_216148a9 + command: + - python + - /compat/patch.py + volumeMounts: + - name: kafka-compat + mountPath: /compat + readOnly: true + - name: patched-code + mountPath: /patched + containers: + - name: backend + image: cr.yandex/crp3ccidau046kdj8g9q/premises-backend:production_216148a9 + ports: + - name: http + containerPort: 8000 + env: + - name: DEBUG + value: 'false' + - name: HTTP_ROOT_PATH + value: /premises + - name: JWT_AUTH_ENABLE + value: 'true' + - name: GUNICORN_WORKERS + value: '2' + - name: FASTSTREAM_WORKERS + value: '3' + - name: DATABASE_POOL_SIZE + value: '5' + - name: KAFKA_EAV_ASSET_TOPIC_NAME + value: assets_broadcast + - name: KAFKA_SSL_CERT + value: '' + - name: S3_BUCKET + value: premises + - name: EXPORT_TTL_MINUTES + value: '30' + - name: EXPORT_MAX_WORKERS + value: '4' + - name: EXPORT_S3_KEY_PREFIX + value: premise-export + - name: ATTACHMENT_MAX_SIZE_BYTES + value: '314572800' + - name: ATTACHMENT_S3_KEY_PREFIX + value: attachment/ + - name: OTEL_ENABLE + value: 'false' + - name: OTEL_URL + value: http://signoz-otel-collector-external.signoz.svc.cluster.local:4317 + - name: OTEL_SERVICE_NAME + value: premises-backend + - name: OTEL_INSECURE + value: 'true' + - name: SRX_SDK_IAM_ENVIRONMENT + value: stage + - name: WORKFLOWS_HOST + value: http://workflows-api-service.workflow.svc.cluster.local:8000 + - name: WORKFLOWS_GENERATION_IMAGE + value: cr.yandex/crp3ccidau046kdj8g9q/rendering-template:master + - name: WORKFLOWS_DOCX_TO_PDF_IMAGE + value: cr.yandex/crp3ccidau046kdj8g9q/docx-to-pdf:latest + - name: WORKFLOWS_CALLBACK_IMAGE + value: cr.yandex/crp3ccidau046kdj8g9q/webhook-caller:master + - name: WORKFLOWS_CALLBACK_HOST + value: http://backend-svc.premises.svc.cluster.local:80 + - name: WORKFLOWS_RESULT_PATH + value: premises-stage + - name: SRX_SDK_IAM_ROUTE + value: http://iam-backend.iam.svc.cluster.local:8000 + envFrom: + - secretRef: + name: premises-config + resources: + requests: + cpu: 100m + memory: 256Mi + readinessProbe: + httpGet: + path: /internal/healthz/ready/ + port: http + initialDelaySeconds: 10 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /internal/healthz/live/ + port: http + initialDelaySeconds: 60 + periodSeconds: 30 + volumeMounts: + - name: patched-code + mountPath: /premises/src/app/api.py + subPath: api.py + readOnly: true + - name: patched-code + mountPath: /premises/src/service/premise/permission.py + subPath: permission.py + readOnly: true + tolerations: + - key: dedicated + operator: Equal + value: processing-light + effect: NoSchedule + volumes: + - name: kafka-compat + configMap: + name: premises-kafka-compat + - name: patched-code + emptyDir: {} diff --git a/apps/premises/brusnika-stage/kafka-compat-configmap.yaml b/apps/premises/brusnika-stage/kafka-compat-configmap.yaml new file mode 100644 index 0000000..1f5cda3 --- /dev/null +++ b/apps/premises/brusnika-stage/kafka-compat-configmap.yaml @@ -0,0 +1,40 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: premises-kafka-compat + namespace: premises +data: + patch.py: | + from pathlib import Path + + source = Path("/premises/src/app/api.py").read_text() + old = " else:\n security = SASLScram512(" + new = " elif config.kafka.username or config.kafka.password:\n security = SASLScram512(" + if source.count(old) != 1: + raise RuntimeError("Unexpected Kafka security configuration in premises image") + patched = source.replace(old, new, 1) + compile(patched, "api.py", "exec") + Path("/patched/api.py").write_text(patched) + + source = Path("/premises/src/service/premise/permission.py").read_text() + old = " config=IAMConfig.from_environment(config.srx_sdk.iam_environment)," + new = " config=iam_config," + if source.count(old) != 1: + raise RuntimeError("Unexpected IAM configuration in premises image") + imports = "from urllib.parse import urlsplit\nfrom srx_sdk.iam.config import IAMHttpConfig\n" + configuration = """ + iam_config = IAMConfig.from_environment(config.srx_sdk.iam_environment) + if config.srx_sdk.iam_route: + iam_url = urlsplit(config.srx_sdk.iam_route) + iam_config.http_config = IAMHttpConfig( + host=iam_url.hostname, + port=iam_url.port or 80, + protocol=iam_url.scheme, + ) + + + """ + patched = imports + source.replace(old, new, 1) + patched = patched.replace("class PremisePermissionService:", configuration + "class PremisePermissionService:", 1) + compile(patched, "permission.py", "exec") + Path("/patched/permission.py").write_text(patched) diff --git a/apps/premises/brusnika-stage/kustomization.yaml b/apps/premises/brusnika-stage/kustomization.yaml new file mode 100644 index 0000000..6840e73 --- /dev/null +++ b/apps/premises/brusnika-stage/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: premises +resources: +- backend.yaml +- service.yaml +- postgresql.yaml +- kafka-compat-configmap.yaml diff --git a/apps/premises/brusnika-stage/postgresql.yaml b/apps/premises/brusnika-stage/postgresql.yaml new file mode 100644 index 0000000..41227d7 --- /dev/null +++ b/apps/premises/brusnika-stage/postgresql.yaml @@ -0,0 +1,80 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: postgres-init + namespace: premises +data: + extensions.sql: 'CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; + + CREATE EXTENSION IF NOT EXISTS pgcrypto; + + ' +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: postgres + namespace: premises +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + app: premises-postgres + template: + metadata: + labels: + app: premises-postgres + spec: + containers: + - name: postgres + image: postgres:16 + ports: + - name: postgres + containerPort: 5432 + envFrom: + - secretRef: + name: postgres-secret + volumeMounts: + - name: data + mountPath: /var/lib/postgresql/data + - name: init + mountPath: /docker-entrypoint-initdb.d + readOnly: true + resources: + requests: + cpu: 100m + memory: 128Mi + readinessProbe: + exec: + command: + - sh + - -ec + - pg_isready -U "$POSTGRES_USER" -d "$POSTGRES_DB" + initialDelaySeconds: 5 + periodSeconds: 5 + volumes: + - name: data + emptyDir: {} + - name: init + configMap: + name: postgres-init + tolerations: + - key: dedicated + operator: Equal + value: processing-light + effect: NoSchedule +--- +apiVersion: v1 +kind: Service +metadata: + name: postgres + namespace: premises +spec: + selector: + app: premises-postgres + ports: + - name: postgres + port: 5432 + targetPort: postgres diff --git a/apps/premises/brusnika-stage/service.yaml b/apps/premises/brusnika-stage/service.yaml new file mode 100644 index 0000000..b9a8fa5 --- /dev/null +++ b/apps/premises/brusnika-stage/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: backend-svc + namespace: premises +spec: + selector: + app: premises-backend + ports: + - name: http + port: 80 + targetPort: http diff --git a/apps/subscriptions/brusnika-stage/backend.yaml b/apps/subscriptions/brusnika-stage/backend.yaml index 84cf818..9567eb4 100644 --- a/apps/subscriptions/brusnika-stage/backend.yaml +++ b/apps/subscriptions/brusnika-stage/backend.yaml @@ -35,7 +35,7 @@ spec: image: name: - _default: cr.yandex/crp3ccidau046kdj8g9q/subscriptions:prod_a50928e1 + _default: cr.yandex/crp3ccidau046kdj8g9q/subscriptions:preprod_bf7013a2 pullPolicy: _default: IfNotPresent diff --git a/apps/transmittal/brusnika-stage/backend.yaml b/apps/transmittal/brusnika-stage/backend.yaml index 2a2214e..daa61e4 100644 --- a/apps/transmittal/brusnika-stage/backend.yaml +++ b/apps/transmittal/brusnika-stage/backend.yaml @@ -33,9 +33,19 @@ spec: backend: enabled: true + tolerations: + - key: + _default: dedicated + operator: + _default: Equal + value: + _default: processing-light + effect: + _default: NoSchedule + image: name: - _default: cr.yandex/crp3ccidau046kdj8g9q/transmittal-api:prod_4e0db600 + _default: cr.yandex/crp3ccidau046kdj8g9q/transmittal-api:production_4e982bad pullPolicy: _default: IfNotPresent diff --git a/apps/transmittal/brusnika-stage/frontend.yaml b/apps/transmittal/brusnika-stage/frontend.yaml index 5457457..80fa3b5 100644 --- a/apps/transmittal/brusnika-stage/frontend.yaml +++ b/apps/transmittal/brusnika-stage/frontend.yaml @@ -33,9 +33,19 @@ spec: frontend: enabled: true + tolerations: + - key: + _default: dedicated + operator: + _default: Equal + value: + _default: processing-light + effect: + _default: NoSchedule + image: name: - _default: cr.yandex/crp3ccidau046kdj8g9q/transmittal-frontend:wb1_dbf61443 + _default: cr.yandex/crp3ccidau046kdj8g9q/transmittal-frontend:contour_c1b275dc pullPolicy: _default: IfNotPresent diff --git a/apps/transmittal/brusnika-stage/worker.yaml b/apps/transmittal/brusnika-stage/worker.yaml index cf5f866..1eb1c63 100644 --- a/apps/transmittal/brusnika-stage/worker.yaml +++ b/apps/transmittal/brusnika-stage/worker.yaml @@ -33,9 +33,19 @@ spec: backend: enabled: true + tolerations: + - key: + _default: dedicated + operator: + _default: Equal + value: + _default: processing-light + effect: + _default: NoSchedule + image: name: - _default: cr.yandex/crp3ccidau046kdj8g9q/transmittal-api:prod_4e0db600 + _default: cr.yandex/crp3ccidau046kdj8g9q/transmittal-api:production_4e982bad pullPolicy: _default: IfNotPresent diff --git a/clusters/brusnika-stage/infrastructure/kustomization.yaml b/clusters/brusnika-stage/infrastructure/kustomization.yaml index d57bd25..fb82b17 100644 --- a/clusters/brusnika-stage/infrastructure/kustomization.yaml +++ b/clusters/brusnika-stage/infrastructure/kustomization.yaml @@ -6,6 +6,7 @@ resources: - ../../../infrastructure/istio-gateway/brusnika-stage - ../../../infrastructure/istio-config/brusnika-stage - ../../../infrastructure/vault/brusnika-stage + - ../../../infrastructure/spicedb/brusnika-stage - ../../../infrastructure/rabbitmq/brusnika-stage - ../../../infrastructure/zitadel/brusnika-stage - ../../../infrastructure/openobserve/brusnika-stage diff --git a/clusters/brusnika-stage/kustomization.yaml b/clusters/brusnika-stage/kustomization.yaml index 26387e0..91b3aee 100644 --- a/clusters/brusnika-stage/kustomization.yaml +++ b/clusters/brusnika-stage/kustomization.yaml @@ -37,4 +37,5 @@ resources: - ../../apps/ams-sync/brusnika-stage - ../../apps/iam/brusnika-stage - ../../apps/auth-flow/brusnika-stage - - ../../apps/bi/brusnika-stage \ No newline at end of file + - ../../apps/bi/brusnika-stage + - ../../apps/premises/brusnika-stage diff --git a/infrastructure/istio-config/brusnika-stage/istio-config.yaml b/infrastructure/istio-config/brusnika-stage/istio-config.yaml index 1ace373..cfdfa8f 100644 --- a/infrastructure/istio-config/brusnika-stage/istio-config.yaml +++ b/infrastructure/istio-config/brusnika-stage/istio-config.yaml @@ -532,6 +532,18 @@ spec: prefix: /res-admin/ service: resources-service.resources.svc.cluster.local port: 8000 + vs-premises-api: + namespace: ingress-nginx + hosts: + - test.sarex.brusnika.tech + gateways: + - ingress-nginx/main-gateway + routes: + - path: + prefix: /premises/api/ + rewrite: /api/ + service: backend-svc.premises.svc.cluster.local + port: 80 inspections-vs: namespace: inspections hosts: @@ -902,6 +914,18 @@ spec: rewrite: /api/ service: backend-service.contracts.svc.cluster.local port: 8000 + vs-admin-frontend: + namespace: ingress-nginx + hosts: + - test.sarex.brusnika.tech + gateways: + - ingress-nginx/main-gateway + routes: + - path: + prefix: /admin-frontend/static/ + rewrite: / + service: admin-frontend-svc.django.svc.cluster.local + port: 8080 vs-srx-admin-frontend: namespace: ingress-nginx hosts: @@ -1164,6 +1188,11 @@ spec: gateways: - ingress-nginx/main-gateway routes: + - path: + prefix: /rfi/admin/ + rewrite: /rfi/admin/ + service: rfi-backend-api-svc.rfi.svc.cluster.local + port: 80 - match: - uri: prefix: /rfi/api/ diff --git a/infrastructure/spicedb/brusnika-stage/kustomization.yaml b/infrastructure/spicedb/brusnika-stage/kustomization.yaml new file mode 100644 index 0000000..a5056bc --- /dev/null +++ b/infrastructure/spicedb/brusnika-stage/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- namespace.yaml +- postgresql.yaml +- spicedb.yaml diff --git a/infrastructure/spicedb/brusnika-stage/namespace.yaml b/infrastructure/spicedb/brusnika-stage/namespace.yaml new file mode 100644 index 0000000..6264487 --- /dev/null +++ b/infrastructure/spicedb/brusnika-stage/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: spicedb diff --git a/infrastructure/spicedb/brusnika-stage/postgresql.yaml b/infrastructure/spicedb/brusnika-stage/postgresql.yaml new file mode 100644 index 0000000..7eb6296 --- /dev/null +++ b/infrastructure/spicedb/brusnika-stage/postgresql.yaml @@ -0,0 +1,79 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: postgres-data + namespace: spicedb +spec: + accessModes: + - ReadWriteOnce + storageClassName: local-path + resources: + requests: + storage: 10Gi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: postgres + namespace: spicedb +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + app: spicedb-postgres + template: + metadata: + labels: + app: spicedb-postgres + spec: + tolerations: + - key: dedicated + operator: Equal + value: processing-light + effect: NoSchedule + containers: + - name: postgres + image: postgres:17.5 + ports: + - name: postgres + containerPort: 5432 + env: + - name: PGDATA + value: /var/lib/postgresql/data/pgdata + envFrom: + - secretRef: + name: postgres-secret + volumeMounts: + - name: data + mountPath: /var/lib/postgresql/data + resources: + requests: + cpu: 100m + memory: 256Mi + readinessProbe: + exec: + command: + - sh + - -ec + - pg_isready -U "$POSTGRES_USER" -d "$POSTGRES_DB" + initialDelaySeconds: 5 + periodSeconds: 5 + volumes: + - name: data + persistentVolumeClaim: + claimName: postgres-data +--- +apiVersion: v1 +kind: Service +metadata: + name: postgres + namespace: spicedb +spec: + selector: + app: spicedb-postgres + ports: + - name: postgres + port: 5432 + targetPort: postgres diff --git a/infrastructure/spicedb/brusnika-stage/spicedb.yaml b/infrastructure/spicedb/brusnika-stage/spicedb.yaml new file mode 100644 index 0000000..f41855f --- /dev/null +++ b/infrastructure/spicedb/brusnika-stage/spicedb.yaml @@ -0,0 +1,60 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: spicedb + namespace: spicedb +spec: + interval: 5m + timeout: 10m + chart: + spec: + chart: spicedb + version: 0.1.4-prod + sourceRef: + kind: HelmRepository + name: yc-oci-charts + namespace: flux-system + interval: 10m + install: + remediation: + retries: 3 + upgrade: + remediation: + retries: 0 + remediateLastFailure: false + values: + replicas: 1 + image: + repository: cr.yandex/crp3ccidau046kdj8g9q/spicedb-prod + tag: v1.54.0 + imagePullSecrets: + - name: regcred + datastore: + mode: external + database: spicedb + username: spicedb + auth: + existingSecret: spicedb-secret + istio: + enabled: false + deploymentName: spicedb + tolerations: + - key: dedicated + operator: Equal + value: processing-light + effect: NoSchedule + resources: + requests: + cpu: 100m + memory: 256Mi + migration: + hook: + enabled: false + postRenderers: + - kustomize: + patches: + - target: + kind: Job + patch: "- op: add\n path: /spec/template/spec/tolerations\n value:\n \ + \ - key: dedicated\n operator: Equal\n value: processing-light\n\ + \ effect: NoSchedule\n"