diff --git a/apps/documentations/wb/cde-api/cde-api-worker-copy.yaml b/apps/documentations/wb/cde-api/cde-api-worker-copy.yaml new file mode 100644 index 0000000..b9b6c5e --- /dev/null +++ b/apps/documentations/wb/cde-api/cde-api-worker-copy.yaml @@ -0,0 +1,382 @@ +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: dockerhub + 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:8000 + - 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_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://bim-backend-v2-service.bim-api.svc.cluster.local:8080 + - 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: wb + - 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.issues.svc.cluster.local:80 + - 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: sarex-vpsql-01.xc.wb.ru + - name: CDE_API_DATABASE__PORT + value: + _default: '5432' + - name: CDE_API_DATABASE__NAME + value: + _default: documentations_db + 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 + - name: CDE_API_S3_BUCKET_NAME + secretName: + _default: cde-api-s3-secret + secretKey: + _default: bucket + 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' + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/wb/cde-api/cde-api-worker-move.yaml b/apps/documentations/wb/cde-api/cde-api-worker-move.yaml new file mode 100644 index 0000000..4c06e97 --- /dev/null +++ b/apps/documentations/wb/cde-api/cde-api-worker-move.yaml @@ -0,0 +1,364 @@ +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: dockerhub + 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:8000 + - 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_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://bim-backend-v2-service.bim-api.svc.cluster.local:8080 + - 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: wb + - 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: sarex-vpsql-01.xc.wb.ru + - name: CDE_API_DATABASE__PORT + value: + _default: '5432' + - name: CDE_API_DATABASE__NAME + value: + _default: documentations_db + 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 + - name: CDE_API_S3_BUCKET_NAME + secretName: + _default: cde-api-s3-secret + secretKey: + _default: bucket + 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' + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/wb/cde-api/cde-api-worker-s32d-create-upload.yaml b/apps/documentations/wb/cde-api/cde-api-worker-s32d-create-upload.yaml new file mode 100644 index 0000000..9f5329c --- /dev/null +++ b/apps/documentations/wb/cde-api/cde-api-worker-s32d-create-upload.yaml @@ -0,0 +1,252 @@ +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: dockerhub + 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_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: sarex-vpsql-01.xc.wb.ru + - name: CDE_API_DATABASE__PORT + value: + _default: '5432' + - name: CDE_API_DATABASE__NAME + value: + _default: documentations_db + 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_S3_BUCKET_NAME + secretName: + _default: cde-api-s3-secret + secretKey: + _default: bucket + 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' + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/wb/cde-api/cde-api-worker-s32d-handle-error.yaml b/apps/documentations/wb/cde-api/cde-api-worker-s32d-handle-error.yaml new file mode 100644 index 0000000..aac5851 --- /dev/null +++ b/apps/documentations/wb/cde-api/cde-api-worker-s32d-handle-error.yaml @@ -0,0 +1,246 @@ +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: dockerhub + 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_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: sarex-vpsql-01.xc.wb.ru + - name: CDE_API_DATABASE__PORT + value: + _default: '5432' + - name: CDE_API_DATABASE__NAME + value: + _default: documentations_db + 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_S3_BUCKET_NAME + secretName: + _default: cde-api-s3-secret + secretKey: + _default: bucket + 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' + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/wb/cde-api/cde-api-worker-s32d-process-workflows.yaml b/apps/documentations/wb/cde-api/cde-api-worker-s32d-process-workflows.yaml new file mode 100644 index 0000000..d5ebb93 --- /dev/null +++ b/apps/documentations/wb/cde-api/cde-api-worker-s32d-process-workflows.yaml @@ -0,0 +1,315 @@ +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: dockerhub + 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_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://bim-backend-v2-service.bim-api.svc.cluster.local:8080 + - 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: wb + - 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: sarex-vpsql-01.xc.wb.ru + - name: CDE_API_DATABASE__PORT + value: + _default: '5432' + - name: CDE_API_DATABASE__NAME + value: + _default: documentations_db + 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_S3_BUCKET_NAME + secretName: + _default: cde-api-s3-secret + secretKey: + _default: bucket + 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' + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/wb/cde-api/cde-api-worker-s32d-publish-documents.yaml b/apps/documentations/wb/cde-api/cde-api-worker-s32d-publish-documents.yaml new file mode 100644 index 0000000..d739ad4 --- /dev/null +++ b/apps/documentations/wb/cde-api/cde-api-worker-s32d-publish-documents.yaml @@ -0,0 +1,261 @@ +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: dockerhub + 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_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:8000 + - 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: sarex-vpsql-01.xc.wb.ru + - name: CDE_API_DATABASE__PORT + value: + _default: '5432' + - name: CDE_API_DATABASE__NAME + value: + _default: documentations_db + 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_S3_BUCKET_NAME + secretName: + _default: cde-api-s3-secret + secretKey: + _default: bucket + 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' + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/wb/cde-api/cde-api.yaml b/apps/documentations/wb/cde-api/cde-api.yaml new file mode 100644 index 0000000..8881c32 --- /dev/null +++ b/apps/documentations/wb/cde-api/cde-api.yaml @@ -0,0 +1,462 @@ +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: dockerhub + envs: + - name: CDE_API_RESOURCES_BASE_URL + value: + _default: http://iams.iam.svc.cluster.local:8080 + - 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-srx.wb.ru + - 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://bim-backend-v2-service.bim-api.svc.cluster.local:8080 + - 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:8000 + - 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: wb + - 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_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: sarex-vpsql-01.xc.wb.ru + - name: CDE_API_DATABASE__PORT + value: + _default: '5432' + - name: CDE_API_DATABASE__NAME + value: + _default: documentations_db + 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 + - name: CDE_API_S3_BUCKET_NAME + secretName: + _default: cde-api-s3-secret + secretKey: + _default: bucket + 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' diff --git a/apps/documentations/wb/cde-api/kustomization.yaml b/apps/documentations/wb/cde-api/kustomization.yaml new file mode 100644 index 0000000..7192441 --- /dev/null +++ b/apps/documentations/wb/cde-api/kustomization.yaml @@ -0,0 +1,14 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: documentations +resources: +- cde-api.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 +- outbox-relay.yaml +- tasks-execution-config.yaml +- virtualservice.yaml diff --git a/apps/documentations/wb/cde-api/outbox-relay.yaml b/apps/documentations/wb/cde-api/outbox-relay.yaml new file mode 100644 index 0000000..4ae2396 --- /dev/null +++ b/apps/documentations/wb/cde-api/outbox-relay.yaml @@ -0,0 +1,137 @@ +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: dockerhub + 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: sarex-vpsql-01.xc.wb.ru + - name: OUTBOX_RELAY_PG__PORT + value: + _default: '5432' + - name: OUTBOX_RELAY_PG__NAME + value: + _default: documentations_db + - 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: wb-prod-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 + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/wb/cde-api/tasks-execution-config.yaml b/apps/documentations/wb/cde-api/tasks-execution-config.yaml new file mode 100644 index 0000000..9c4d9b2 --- /dev/null +++ b/apps/documentations/wb/cde-api/tasks-execution-config.yaml @@ -0,0 +1,66 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: tasks-execution-config-documentation-v2 + namespace: documentations +data: + tasks-execution-config-documentation-v2.json: "{\n \"bim_api_metadata_inserter\"\ + : {\n \"executor\": \"k8s\",\n \"resources\": {\n \"\ + cpu_requests\": \"100m\",\n \"memory_requests\": \"64Mi\"\n \ + \ }\n },\n \"bim_api_metadata_inserter_v2\": {\n \"executor\": \"\ + k8s\",\n \"resources\": {\n \"cpu_requests\": \"100m\",\n \ + \ \"memory_requests\": \"64Mi\"\n }\n },\n \"bim_api_metadata_inserter_v4\"\ + : {\n \"executor\": \"k8s\",\n \"resources\": {\n \"\ + cpu_requests\": \"100m\",\n \"memory_requests\": \"64Mi\"\n \ + \ }\n },\n \"bim_differ\": {\n \"executor\": \"k8s\",\n \"\ + resources\": {\n \"cpu_requests\": \"100m\",\n \"memory_requests\"\ + : \"64Mi\"\n }\n },\n \"bim_updater\": {\n \"executor\": \"\ + k8s\",\n \"resources\": {\n \"cpu_requests\": \"100m\",\n \ + \ \"memory_requests\": \"64Mi\"\n }\n },\n \"convert_to_potree\"\ + : {\n \"executor\": \"k8s\",\n \"resources\": {\n \"\ + cpu_requests\": \"100m\",\n \"memory_requests\": \"64Mi\"\n \ + \ }\n },\n \"docx_to_pdf\": {\n \"executor\": \"k8s\",\n \"\ + resources\": {\n \"cpu_requests\": \"100m\",\n \"memory_requests\"\ + : \"64Mi\"\n }\n },\n \"dwg_to_geojson\": {\n \"executor\"\ + : \"k8s\",\n \"resources\": {\n \"cpu_limits\": \"4\",\n \ + \ \"cpu_requests\": \"100m\",\n \"memory_limits\": \"40Gi\"\ + ,\n \"memory_requests\": \"64Mi\"\n }\n },\n \"e57_to_las\"\ + : {\n \"executor\": \"k8s\",\n \"resources\": {\n \"\ + cpu_requests\": \"100m\",\n \"memory_requests\": \"64Mi\"\n \ + \ }\n },\n \"ifc_converter_job\": {\n \"executor\": \"k8s\",\n \ + \ \"resources\": {\n \"cpu_requests\": \"100m\",\n \ + \ \"memory_requests\": \"64Mi\"\n }\n },\n \"las_merge\": {\n \ + \ \"executor\": \"k8s\",\n \"resources\": {\n \"cpu_requests\"\ + : \"100m\",\n \"memory_requests\": \"64Mi\"\n }\n },\n \ + \ \"mesh_optimizer\": {\n \"executor\": \"k8s\",\n \"resources\"\ + : {\n \"cpu_requests\": \"100m\",\n \"memory_requests\"\ + : \"64Mi\"\n }\n },\n \"mesh_optimizer_v2\": {\n \"executor\"\ + : \"k8s\",\n \"resources\": {\n \"cpu_requests\": \"100m\",\n\ + \ \"memory_requests\": \"64Mi\"\n }\n },\n \"parsing_template\"\ + : {\n \"executor\": \"k8s\",\n \"resources\": {\n \"\ + cpu_requests\": \"100m\",\n \"memory_requests\": \"64Mi\"\n \ + \ }\n },\n \"processing_converter_to_tiles\": {\n \"executor\": \"\ + k8s\",\n \"resources\": {\n \"cpu_requests\": \"100m\",\n \ + \ \"memory_requests\": \"64Mi\"\n }\n },\n \"processing_create_colored_surface_from_geotiff\"\ + : {\n \"executor\": \"k8s\",\n \"resources\": {\n \"\ + cpu_requests\": \"100m\",\n \"memory_requests\": \"64Mi\"\n \ + \ }\n },\n \"rendering_template\": {\n \"executor\": \"k8s\",\n \ + \ \"resources\": {\n \"cpu_requests\": \"100m\",\n \ + \ \"memory_requests\": \"64Mi\"\n }\n },\n \"split_pdf_document\"\ + : {\n \"executor\": \"k8s\",\n \"resources\": {\n \"\ + cpu_requests\": \"100m\",\n \"memory_requests\": \"64Mi\"\n \ + \ }\n },\n \"split_pdf_document_legacy\": {\n \"executor\": \"k8s\"\ + ,\n \"resources\": {\n \"cpu_requests\": \"100m\",\n \ + \ \"memory_requests\": \"64Mi\"\n }\n },\n \"update_orthomosaic_data\"\ + : {\n \"executor\": \"k8s\",\n \"resources\": {\n \"\ + cpu_requests\": \"100m\",\n \"memory_requests\": \"64Mi\"\n \ + \ }\n },\n \"web_hook_caller\": {\n \"executor\": \"k8s\",\n \ + \ \"resources\": {\n \"cpu_requests\": \"100m\",\n \"\ + memory_requests\": \"64Mi\"\n }\n },\n \"xml_to_glb\": {\n \ + \ \"executor\": \"k8s\",\n \"resources\": {\n \"cpu_requests\"\ + : \"100m\",\n \"memory_requests\": \"64Mi\"\n }\n },\n \ + \ \"document_converter\": {\n \"executor\": \"k8s\",\n \"resources\"\ + : {\n \"cpu_requests\": \"100m\",\n \"memory_requests\"\ + : \"64Mi\"\n }\n },\n \"sparkjs_converter_wrapper\": {\n \"\ + executor\": \"k8s\",\n \"resources\": {\n \"cpu_requests\":\ + \ \"100m\",\n \"memory_requests\": \"64Mi\"\n }\n }\n}\n" diff --git a/apps/documentations/wb/cde-api/virtualservice.yaml b/apps/documentations/wb/cde-api/virtualservice.yaml new file mode 100644 index 0000000..f4e87a5 --- /dev/null +++ b/apps/documentations/wb/cde-api/virtualservice.yaml @@ -0,0 +1,54 @@ +apiVersion: networking.istio.io/v1 +kind: VirtualService +metadata: + name: vs-cde-api + namespace: documentations +spec: + hosts: + - srx.wb.ru + - lk.srx.wb.ru + gateways: + - istio-system/main-gateway + http: + - match: + - uri: + prefix: /documentations/v2/ + rewrite: + uri: /external/v2/ + corsPolicy: &id001 + allowOrigins: + - exact: https://srx.wb.ru + - exact: https://lk.srx.wb.ru + - exact: https://document-link-srx.wb.ru + 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/wb/kustomization.yaml b/apps/documentations/wb/kustomization.yaml index e8899c2..ad2499f 100644 --- a/apps/documentations/wb/kustomization.yaml +++ b/apps/documentations/wb/kustomization.yaml @@ -12,3 +12,4 @@ resources: - frontend-static.yaml - redis.yaml - stamp-verification.yaml + - cde-api diff --git a/apps/premises/wb/backend.yaml b/apps/premises/wb/backend.yaml new file mode 100644 index 0000000..213f3a7 --- /dev/null +++ b/apps/premises/wb/backend.yaml @@ -0,0 +1,141 @@ +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 "$DATABASE_HOST" -p "$DATABASE_PORT"; do sleep 2; done + env: + - name: DATABASE_HOST + valueFrom: + secretKeyRef: + name: premises-config + key: DATABASE_HOST + - name: DATABASE_PORT + valueFrom: + secretKeyRef: + name: premises-config + key: DATABASE_PORT + - 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-wb + - name: SRX_SDK_IAM_ROUTE + value: http://iams.iam.svc.cluster.local:8080 + 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 + volumes: + - name: kafka-compat + configMap: + name: premises-kafka-compat + - name: patched-code + emptyDir: {} diff --git a/apps/premises/wb/kafka-compat-configmap.yaml b/apps/premises/wb/kafka-compat-configmap.yaml new file mode 100644 index 0000000..1f5cda3 --- /dev/null +++ b/apps/premises/wb/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/wb/kustomization.yaml b/apps/premises/wb/kustomization.yaml new file mode 100644 index 0000000..76e1abf --- /dev/null +++ b/apps/premises/wb/kustomization.yaml @@ -0,0 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: premises +resources: +- namespace.yaml +- backend.yaml +- service.yaml +- kafka-compat-configmap.yaml +- virtualservice.yaml diff --git a/apps/premises/wb/namespace.yaml b/apps/premises/wb/namespace.yaml new file mode 100644 index 0000000..520b2cc --- /dev/null +++ b/apps/premises/wb/namespace.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: premises + labels: + istio-injection: disabled diff --git a/apps/premises/wb/service.yaml b/apps/premises/wb/service.yaml new file mode 100644 index 0000000..b9a8fa5 --- /dev/null +++ b/apps/premises/wb/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/premises/wb/virtualservice.yaml b/apps/premises/wb/virtualservice.yaml new file mode 100644 index 0000000..2a12ee9 --- /dev/null +++ b/apps/premises/wb/virtualservice.yaml @@ -0,0 +1,22 @@ +apiVersion: networking.istio.io/v1 +kind: VirtualService +metadata: + name: vs-premises-api + namespace: premises +spec: + hosts: + - srx.wb.ru + - lk.srx.wb.ru + gateways: + - istio-system/main-gateway + http: + - match: + - uri: + prefix: /premises/api/ + rewrite: + uri: /api/ + route: + - destination: + host: backend-svc.premises.svc.cluster.local + port: + number: 80 diff --git a/clusters/wb/kustomization.yaml b/clusters/wb/kustomization.yaml index ecff1fb..9757ff0 100644 --- a/clusters/wb/kustomization.yaml +++ b/clusters/wb/kustomization.yaml @@ -32,4 +32,5 @@ resources: - ../../apps/subscriptions/wb - ../../apps/system-log/wb - ../../apps/transmittal/wb - - ../../apps/bi/wb \ No newline at end of file + - ../../apps/bi/wb + - ../../apps/premises/wb