From 2862c98202d8f765c2f29e4bd77afa66c8d8f32b Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 23 Nov 2026 16:20:47 +0500 Subject: [PATCH] stand: deploy CDE API and six workers at preprod_905f8821 with Vault --- .../stand/cde-api/cde-api-worker-copy.yaml | 399 ++++++++++++++ .../stand/cde-api/cde-api-worker-move.yaml | 381 ++++++++++++++ .../cde-api-worker-s32d-create-upload.yaml | 277 ++++++++++ .../cde-api-worker-s32d-handle-error.yaml | 271 ++++++++++ ...cde-api-worker-s32d-process-workflows.yaml | 340 ++++++++++++ ...cde-api-worker-s32d-publish-documents.yaml | 286 ++++++++++ .../documentations/stand/cde-api/cde-api.yaml | 487 ++++++++++++++++++ .../stand/cde-api/kustomization.yaml | 12 + .../stand/cde-api/tasks-execution-config.yaml | 66 +++ .../stand/cde-api/virtualservice.yaml | 52 ++ apps/documentations/stand/kustomization.yaml | 1 + 11 files changed, 2572 insertions(+) create mode 100644 apps/documentations/stand/cde-api/cde-api-worker-copy.yaml create mode 100644 apps/documentations/stand/cde-api/cde-api-worker-move.yaml create mode 100644 apps/documentations/stand/cde-api/cde-api-worker-s32d-create-upload.yaml create mode 100644 apps/documentations/stand/cde-api/cde-api-worker-s32d-handle-error.yaml create mode 100644 apps/documentations/stand/cde-api/cde-api-worker-s32d-process-workflows.yaml create mode 100644 apps/documentations/stand/cde-api/cde-api-worker-s32d-publish-documents.yaml create mode 100644 apps/documentations/stand/cde-api/cde-api.yaml create mode 100644 apps/documentations/stand/cde-api/kustomization.yaml create mode 100644 apps/documentations/stand/cde-api/tasks-execution-config.yaml create mode 100644 apps/documentations/stand/cde-api/virtualservice.yaml diff --git a/apps/documentations/stand/cde-api/cde-api-worker-copy.yaml b/apps/documentations/stand/cde-api/cde-api-worker-copy.yaml new file mode 100644 index 0000000..ea8f179 --- /dev/null +++ b/apps/documentations/stand/cde-api/cde-api-worker-copy.yaml @@ -0,0 +1,399 @@ +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.9 + sourceRef: + kind: HelmRepository + name: yc-oci-charts + namespace: flux-system + interval: 10m + install: + remediation: + retries: 3 + upgrade: + remediation: + retries: 3 + values: + global: + env: _default + services: + worker-copy: + enabled: true + deployment: + enabled: true + name: + _default: worker-copy + replicaCount: + _default: 1 + revisionHistoryLimit: + _default: 5 + resources: + requests: + cpu: + _default: 25m + memory: + _default: 128Mi + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + command: + _default: + - /bin/sh + - -ec + args: + _default: + - 'set -a + + . /vault/secrets/cde-api-db + + . /vault/secrets/cde-api-s3 + + . /vault/secrets/cde-api-zeebe + + . /vault/secrets/cde-api-rabbitmq + + set +a + + exec /opt/worker + + ' + image: + name: + _default: cr.yandex/crp3ccidau046kdj8g9q/cde-api-worker-copy:preprod_905f8821 + pullPolicy: + _default: IfNotPresent + service: + enabled: false + imagePullSecrets: + enabled: + _default: true + name: + _default: regcred + envs: + - name: CDE_API_EAV_HOST + value: + _default: http://backend-svc.eav.svc.cluster.local:80 + - 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://backend-svc.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: '2' + - 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://backend-svc.processing.svc.cluster.local:80 + - 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-svc.bim.svc.cluster.local:80 + - name: CDE_API_BIMAPI_V2_URL + value: + _default: http://backend-svc.bim.svc.cluster.local:80 + - 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-svc.django.svc.cluster.local:80 + - name: CDE_API_ENVIRONMENT + value: + _default: stand + - 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://backend-api-svc.documentations.svc.cluster.local:80 + - name: CDE_API_INTERNAL_URL + value: + _default: http://cde-api.documentations.svc.cluster.local:8000 + - name: CDE_API_FLOWS_URL + value: + _default: http://backend-svc.flows.svc.cluster.local:80 + - name: CDE_API_TRANSMITTALS_URL + value: + _default: http://backend-svc.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://backend-svc.workspaces.svc.cluster.local:80 + - 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://backend-svc.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.documentations.svc.cluster.local + - name: CDE_API_REDIS__PORT + value: + _default: '6379' + - name: CDE_API_S3_ENDPOINT + value: + _default: minio.storage.svc.cluster.local:9000 + - name: CDE_API_ZEEBE_GATEWAY_ADDRESS + value: + _default: camunda-zeebe-gateway.camunda.svc.cluster.local:26500 + - name: CDE_API_ZEEBE_CLIENT_ID + value: + _default: zeebe + - name: CDE_API_ZEEBE_AUTH_SERVER_URL + value: + _default: http://camunda-keycloak.camunda.svc.cluster.local/auth/realms/camunda-platform/protocol/openid-connect/token + 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' + serviceAccount: + enabled: + _default: false + name: + _default: documentations-vault + podAnnotations: + _default: + sidecar.istio.io/proxyCPU: 25m + sidecar.istio.io/proxyMemory: 128Mi + sidecar.istio.io/proxyCPULimit: '2' + sidecar.istio.io/proxyMemoryLimit: 1Gi + traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411,8200 + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-init-first: 'true' + vault.hashicorp.com/agent-pre-populate-only: 'true' + vault.hashicorp.com/agent-requests-cpu: 25m + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: documentations + vault.hashicorp.com/agent-inject-secret-cde-api-db: secrets/data/apps/documentations/postgres + vault.hashicorp.com/agent-inject-template-cde-api-db: '{{- with secret + "secrets/data/apps/documentations/postgres" -}} + + CDE_API_DATABASE__HOST=''{{ index .Data.data "host" }}'' + + CDE_API_DATABASE__PORT=''{{ index .Data.data "port" }}'' + + CDE_API_DATABASE__NAME=''{{ index .Data.data "database" }}'' + + CDE_API_DATABASE__USER=''{{ index .Data.data "username" }}'' + + CDE_API_DATABASE__PASSWORD=''{{ index .Data.data "password" }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-s3: secrets/data/minio/apps/documentations + vault.hashicorp.com/agent-inject-template-cde-api-s3: '{{- with secret + "secrets/data/minio/apps/documentations" -}} + + CDE_API_S3_ACCESS_KEY=''{{ or (index .Data.data "access_key_id") (index + .Data.data "access_key") }}'' + + CDE_API_S3_SECRET_KEY=''{{ or (index .Data.data "secret_access_key") + (index .Data.data "secret_key") }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-zeebe: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-template-cde-api-zeebe: '{{- with secret + "secrets/data/camunda/identity-components" -}} + + CDE_API_ZEEBE_CLIENT_SECRET=''{{ index .Data.data "zeebe-secret" }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-rabbitmq: secrets/data/rabbitmq/apps/cde + vault.hashicorp.com/agent-inject-template-cde-api-rabbitmq: '{{- with + secret "secrets/data/rabbitmq/apps/cde" -}} + + CDE_API_RABBITMQ__HOST=''{{ index .Data.data "host" }}'' + + CDE_API_RABBITMQ__PORT=''{{ index .Data.data "port" }}'' + + CDE_API_RABBITMQ__USER=''{{ index .Data.data "username" }}'' + + CDE_API_RABBITMQ__PASSWORD=''{{ index .Data.data "password" }}'' + + CDE_API_RABBITMQ__VHOST=''{{ index .Data.data "vhost" }}'' + + {{- end -}}' + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/stand/cde-api/cde-api-worker-move.yaml b/apps/documentations/stand/cde-api/cde-api-worker-move.yaml new file mode 100644 index 0000000..b35c356 --- /dev/null +++ b/apps/documentations/stand/cde-api/cde-api-worker-move.yaml @@ -0,0 +1,381 @@ +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.9 + sourceRef: + kind: HelmRepository + name: yc-oci-charts + namespace: flux-system + interval: 10m + install: + remediation: + retries: 3 + upgrade: + remediation: + retries: 3 + values: + global: + env: _default + services: + worker-move: + enabled: true + deployment: + enabled: true + name: + _default: worker-move + replicaCount: + _default: 1 + revisionHistoryLimit: + _default: 5 + resources: + requests: + cpu: + _default: 25m + memory: + _default: 128Mi + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + command: + _default: + - /bin/sh + - -ec + args: + _default: + - 'set -a + + . /vault/secrets/cde-api-db + + . /vault/secrets/cde-api-s3 + + . /vault/secrets/cde-api-zeebe + + . /vault/secrets/cde-api-rabbitmq + + set +a + + exec /opt/worker + + ' + image: + name: + _default: cr.yandex/crp3ccidau046kdj8g9q/cde-api-worker-move:preprod_905f8821 + pullPolicy: + _default: IfNotPresent + service: + enabled: false + imagePullSecrets: + enabled: + _default: true + name: + _default: regcred + envs: + - name: CDE_API_EAV_HOST + value: + _default: http://backend-svc.eav.svc.cluster.local:80 + - 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://backend-svc.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: '2' + - 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://backend-svc.processing.svc.cluster.local:80 + - 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-svc.bim.svc.cluster.local:80 + - name: CDE_API_BIMAPI_V2_URL + value: + _default: http://backend-svc.bim.svc.cluster.local:80 + - 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-svc.django.svc.cluster.local:80 + - name: CDE_API_ENVIRONMENT + value: + _default: stand + - 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://backend-api-svc.documentations.svc.cluster.local:80 + - name: CDE_API_INTERNAL_URL + value: + _default: http://cde-api.documentations.svc.cluster.local:8000 + - name: CDE_API_FLOWS_URL + value: + _default: http://backend-svc.flows.svc.cluster.local:80 + - name: CDE_API_TRANSMITTALS_URL + value: + _default: http://backend-svc.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://backend-svc.workspaces.svc.cluster.local:80 + - 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.documentations.svc.cluster.local + - name: CDE_API_REDIS__PORT + value: + _default: '6379' + - name: CDE_API_S3_ENDPOINT + value: + _default: minio.storage.svc.cluster.local:9000 + - name: CDE_API_ZEEBE_GATEWAY_ADDRESS + value: + _default: camunda-zeebe-gateway.camunda.svc.cluster.local:26500 + - name: CDE_API_ZEEBE_CLIENT_ID + value: + _default: zeebe + - name: CDE_API_ZEEBE_AUTH_SERVER_URL + value: + _default: http://camunda-keycloak.camunda.svc.cluster.local/auth/realms/camunda-platform/protocol/openid-connect/token + 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' + serviceAccount: + enabled: + _default: false + name: + _default: documentations-vault + podAnnotations: + _default: + sidecar.istio.io/proxyCPU: 25m + sidecar.istio.io/proxyMemory: 128Mi + sidecar.istio.io/proxyCPULimit: '2' + sidecar.istio.io/proxyMemoryLimit: 1Gi + traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411,8200 + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-init-first: 'true' + vault.hashicorp.com/agent-pre-populate-only: 'true' + vault.hashicorp.com/agent-requests-cpu: 25m + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: documentations + vault.hashicorp.com/agent-inject-secret-cde-api-db: secrets/data/apps/documentations/postgres + vault.hashicorp.com/agent-inject-template-cde-api-db: '{{- with secret + "secrets/data/apps/documentations/postgres" -}} + + CDE_API_DATABASE__HOST=''{{ index .Data.data "host" }}'' + + CDE_API_DATABASE__PORT=''{{ index .Data.data "port" }}'' + + CDE_API_DATABASE__NAME=''{{ index .Data.data "database" }}'' + + CDE_API_DATABASE__USER=''{{ index .Data.data "username" }}'' + + CDE_API_DATABASE__PASSWORD=''{{ index .Data.data "password" }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-s3: secrets/data/minio/apps/documentations + vault.hashicorp.com/agent-inject-template-cde-api-s3: '{{- with secret + "secrets/data/minio/apps/documentations" -}} + + CDE_API_S3_ACCESS_KEY=''{{ or (index .Data.data "access_key_id") (index + .Data.data "access_key") }}'' + + CDE_API_S3_SECRET_KEY=''{{ or (index .Data.data "secret_access_key") + (index .Data.data "secret_key") }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-zeebe: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-template-cde-api-zeebe: '{{- with secret + "secrets/data/camunda/identity-components" -}} + + CDE_API_ZEEBE_CLIENT_SECRET=''{{ index .Data.data "zeebe-secret" }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-rabbitmq: secrets/data/rabbitmq/apps/cde + vault.hashicorp.com/agent-inject-template-cde-api-rabbitmq: '{{- with + secret "secrets/data/rabbitmq/apps/cde" -}} + + CDE_API_RABBITMQ__HOST=''{{ index .Data.data "host" }}'' + + CDE_API_RABBITMQ__PORT=''{{ index .Data.data "port" }}'' + + CDE_API_RABBITMQ__USER=''{{ index .Data.data "username" }}'' + + CDE_API_RABBITMQ__PASSWORD=''{{ index .Data.data "password" }}'' + + CDE_API_RABBITMQ__VHOST=''{{ index .Data.data "vhost" }}'' + + {{- end -}}' + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/stand/cde-api/cde-api-worker-s32d-create-upload.yaml b/apps/documentations/stand/cde-api/cde-api-worker-s32d-create-upload.yaml new file mode 100644 index 0000000..16e28e1 --- /dev/null +++ b/apps/documentations/stand/cde-api/cde-api-worker-s32d-create-upload.yaml @@ -0,0 +1,277 @@ +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.9 + sourceRef: + kind: HelmRepository + name: yc-oci-charts + namespace: flux-system + interval: 10m + install: + remediation: + retries: 3 + upgrade: + remediation: + retries: 3 + values: + global: + env: _default + services: + 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: 25m + memory: + _default: 128Mi + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + command: + _default: + - /bin/sh + - -ec + args: + _default: + - 'set -a + + . /vault/secrets/cde-api-db + + . /vault/secrets/cde-api-s3 + + . /vault/secrets/cde-api-zeebe + + set +a + + exec /opt/worker + + ' + image: + name: + _default: cr.yandex/crp3ccidau046kdj8g9q/cde-api-worker-s32d-create-upload:preprod_905f8821 + pullPolicy: + _default: IfNotPresent + service: + enabled: false + imagePullSecrets: + enabled: + _default: true + name: + _default: regcred + envs: + - name: CDE_API_EAV_HOST + value: + _default: http://backend-svc.eav.svc.cluster.local:80 + - 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: '2' + - 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-svc.flows.svc.cluster.local:80 + - name: CDE_API_TRANSMITTALS_URL + value: + _default: http://backend-svc.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.documentations.svc.cluster.local + - name: CDE_API_REDIS__PORT + value: + _default: '6379' + - name: CDE_API_S3_ENDPOINT + value: + _default: minio.storage.svc.cluster.local:9000 + - name: CDE_API_ZEEBE_GATEWAY_ADDRESS + value: + _default: camunda-zeebe-gateway.camunda.svc.cluster.local:26500 + - name: CDE_API_ZEEBE_CLIENT_ID + value: + _default: zeebe + - name: CDE_API_ZEEBE_AUTH_SERVER_URL + value: + _default: http://camunda-keycloak.camunda.svc.cluster.local/auth/realms/camunda-platform/protocol/openid-connect/token + 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' + serviceAccount: + enabled: + _default: false + name: + _default: documentations-vault + podAnnotations: + _default: + sidecar.istio.io/proxyCPU: 25m + sidecar.istio.io/proxyMemory: 128Mi + sidecar.istio.io/proxyCPULimit: '2' + sidecar.istio.io/proxyMemoryLimit: 1Gi + traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411,8200 + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-init-first: 'true' + vault.hashicorp.com/agent-pre-populate-only: 'true' + vault.hashicorp.com/agent-requests-cpu: 25m + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: documentations + vault.hashicorp.com/agent-inject-secret-cde-api-db: secrets/data/apps/documentations/postgres + vault.hashicorp.com/agent-inject-template-cde-api-db: '{{- with secret + "secrets/data/apps/documentations/postgres" -}} + + CDE_API_DATABASE__HOST=''{{ index .Data.data "host" }}'' + + CDE_API_DATABASE__PORT=''{{ index .Data.data "port" }}'' + + CDE_API_DATABASE__NAME=''{{ index .Data.data "database" }}'' + + CDE_API_DATABASE__USER=''{{ index .Data.data "username" }}'' + + CDE_API_DATABASE__PASSWORD=''{{ index .Data.data "password" }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-s3: secrets/data/minio/apps/documentations + vault.hashicorp.com/agent-inject-template-cde-api-s3: '{{- with secret + "secrets/data/minio/apps/documentations" -}} + + CDE_API_S3_ACCESS_KEY=''{{ or (index .Data.data "access_key_id") (index + .Data.data "access_key") }}'' + + CDE_API_S3_SECRET_KEY=''{{ or (index .Data.data "secret_access_key") + (index .Data.data "secret_key") }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-zeebe: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-template-cde-api-zeebe: '{{- with secret + "secrets/data/camunda/identity-components" -}} + + CDE_API_ZEEBE_CLIENT_SECRET=''{{ index .Data.data "zeebe-secret" }}'' + + {{- end -}}' + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/stand/cde-api/cde-api-worker-s32d-handle-error.yaml b/apps/documentations/stand/cde-api/cde-api-worker-s32d-handle-error.yaml new file mode 100644 index 0000000..695e423 --- /dev/null +++ b/apps/documentations/stand/cde-api/cde-api-worker-s32d-handle-error.yaml @@ -0,0 +1,271 @@ +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.9 + sourceRef: + kind: HelmRepository + name: yc-oci-charts + namespace: flux-system + interval: 10m + install: + remediation: + retries: 3 + upgrade: + remediation: + retries: 3 + values: + global: + env: _default + services: + 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: 25m + memory: + _default: 128Mi + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + command: + _default: + - /bin/sh + - -ec + args: + _default: + - 'set -a + + . /vault/secrets/cde-api-db + + . /vault/secrets/cde-api-s3 + + . /vault/secrets/cde-api-zeebe + + set +a + + exec /opt/worker + + ' + image: + name: + _default: cr.yandex/crp3ccidau046kdj8g9q/cde-api-worker-s32d-handle-error:preprod_905f8821 + pullPolicy: + _default: IfNotPresent + service: + enabled: false + imagePullSecrets: + enabled: + _default: true + name: + _default: regcred + envs: + - name: CDE_API_EAV_HOST + value: + _default: http://backend-svc.eav.svc.cluster.local:80 + - 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-svc.flows.svc.cluster.local:80 + - name: CDE_API_TRANSMITTALS_URL + value: + _default: http://backend-svc.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.documentations.svc.cluster.local + - name: CDE_API_REDIS__PORT + value: + _default: '6379' + - name: CDE_API_S3_ENDPOINT + value: + _default: minio.storage.svc.cluster.local:9000 + - name: CDE_API_ZEEBE_GATEWAY_ADDRESS + value: + _default: camunda-zeebe-gateway.camunda.svc.cluster.local:26500 + - name: CDE_API_ZEEBE_CLIENT_ID + value: + _default: zeebe + - name: CDE_API_ZEEBE_AUTH_SERVER_URL + value: + _default: http://camunda-keycloak.camunda.svc.cluster.local/auth/realms/camunda-platform/protocol/openid-connect/token + 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' + serviceAccount: + enabled: + _default: false + name: + _default: documentations-vault + podAnnotations: + _default: + sidecar.istio.io/proxyCPU: 25m + sidecar.istio.io/proxyMemory: 128Mi + sidecar.istio.io/proxyCPULimit: '2' + sidecar.istio.io/proxyMemoryLimit: 1Gi + traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411,8200 + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-init-first: 'true' + vault.hashicorp.com/agent-pre-populate-only: 'true' + vault.hashicorp.com/agent-requests-cpu: 25m + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: documentations + vault.hashicorp.com/agent-inject-secret-cde-api-db: secrets/data/apps/documentations/postgres + vault.hashicorp.com/agent-inject-template-cde-api-db: '{{- with secret + "secrets/data/apps/documentations/postgres" -}} + + CDE_API_DATABASE__HOST=''{{ index .Data.data "host" }}'' + + CDE_API_DATABASE__PORT=''{{ index .Data.data "port" }}'' + + CDE_API_DATABASE__NAME=''{{ index .Data.data "database" }}'' + + CDE_API_DATABASE__USER=''{{ index .Data.data "username" }}'' + + CDE_API_DATABASE__PASSWORD=''{{ index .Data.data "password" }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-s3: secrets/data/minio/apps/documentations + vault.hashicorp.com/agent-inject-template-cde-api-s3: '{{- with secret + "secrets/data/minio/apps/documentations" -}} + + CDE_API_S3_ACCESS_KEY=''{{ or (index .Data.data "access_key_id") (index + .Data.data "access_key") }}'' + + CDE_API_S3_SECRET_KEY=''{{ or (index .Data.data "secret_access_key") + (index .Data.data "secret_key") }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-zeebe: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-template-cde-api-zeebe: '{{- with secret + "secrets/data/camunda/identity-components" -}} + + CDE_API_ZEEBE_CLIENT_SECRET=''{{ index .Data.data "zeebe-secret" }}'' + + {{- end -}}' + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/stand/cde-api/cde-api-worker-s32d-process-workflows.yaml b/apps/documentations/stand/cde-api/cde-api-worker-s32d-process-workflows.yaml new file mode 100644 index 0000000..0492a70 --- /dev/null +++ b/apps/documentations/stand/cde-api/cde-api-worker-s32d-process-workflows.yaml @@ -0,0 +1,340 @@ +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.9 + sourceRef: + kind: HelmRepository + name: yc-oci-charts + namespace: flux-system + interval: 10m + install: + remediation: + retries: 3 + upgrade: + remediation: + retries: 3 + values: + global: + env: _default + services: + 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: 25m + memory: + _default: 128Mi + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + command: + _default: + - /bin/sh + - -ec + args: + _default: + - 'set -a + + . /vault/secrets/cde-api-db + + . /vault/secrets/cde-api-s3 + + . /vault/secrets/cde-api-zeebe + + set +a + + exec /opt/worker + + ' + image: + name: + _default: cr.yandex/crp3ccidau046kdj8g9q/cde-api-worker-s32d-process-workflows:preprod_905f8821 + pullPolicy: + _default: IfNotPresent + service: + enabled: false + imagePullSecrets: + enabled: + _default: true + name: + _default: regcred + envs: + - name: CDE_API_EAV_HOST + value: + _default: http://backend-svc.eav.svc.cluster.local:80 + - 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: '2' + - 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://backend-svc.processing.svc.cluster.local:80 + - 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-svc.bim.svc.cluster.local:80 + - name: CDE_API_BIMAPI_V2_URL + value: + _default: http://backend-svc.bim.svc.cluster.local:80 + - 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-svc.django.svc.cluster.local:80 + - name: CDE_API_ENVIRONMENT + value: + _default: stand + - 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://backend-api-svc.documentations.svc.cluster.local:80 + - name: CDE_API_INTERNAL_URL + value: + _default: http://cde-api.documentations.svc.cluster.local:8000 + - name: CDE_API_FLOWS_URL + value: + _default: http://backend-svc.flows.svc.cluster.local:80 + - name: CDE_API_TRANSMITTALS_URL + value: + _default: http://backend-svc.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.documentations.svc.cluster.local + - name: CDE_API_REDIS__PORT + value: + _default: '6379' + - name: CDE_API_S3_ENDPOINT + value: + _default: minio.storage.svc.cluster.local:9000 + - name: CDE_API_ZEEBE_GATEWAY_ADDRESS + value: + _default: camunda-zeebe-gateway.camunda.svc.cluster.local:26500 + - name: CDE_API_ZEEBE_CLIENT_ID + value: + _default: zeebe + - name: CDE_API_ZEEBE_AUTH_SERVER_URL + value: + _default: http://camunda-keycloak.camunda.svc.cluster.local/auth/realms/camunda-platform/protocol/openid-connect/token + 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' + serviceAccount: + enabled: + _default: false + name: + _default: documentations-vault + podAnnotations: + _default: + sidecar.istio.io/proxyCPU: 25m + sidecar.istio.io/proxyMemory: 128Mi + sidecar.istio.io/proxyCPULimit: '2' + sidecar.istio.io/proxyMemoryLimit: 1Gi + traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411,8200 + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-init-first: 'true' + vault.hashicorp.com/agent-pre-populate-only: 'true' + vault.hashicorp.com/agent-requests-cpu: 25m + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: documentations + vault.hashicorp.com/agent-inject-secret-cde-api-db: secrets/data/apps/documentations/postgres + vault.hashicorp.com/agent-inject-template-cde-api-db: '{{- with secret + "secrets/data/apps/documentations/postgres" -}} + + CDE_API_DATABASE__HOST=''{{ index .Data.data "host" }}'' + + CDE_API_DATABASE__PORT=''{{ index .Data.data "port" }}'' + + CDE_API_DATABASE__NAME=''{{ index .Data.data "database" }}'' + + CDE_API_DATABASE__USER=''{{ index .Data.data "username" }}'' + + CDE_API_DATABASE__PASSWORD=''{{ index .Data.data "password" }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-s3: secrets/data/minio/apps/documentations + vault.hashicorp.com/agent-inject-template-cde-api-s3: '{{- with secret + "secrets/data/minio/apps/documentations" -}} + + CDE_API_S3_ACCESS_KEY=''{{ or (index .Data.data "access_key_id") (index + .Data.data "access_key") }}'' + + CDE_API_S3_SECRET_KEY=''{{ or (index .Data.data "secret_access_key") + (index .Data.data "secret_key") }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-zeebe: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-template-cde-api-zeebe: '{{- with secret + "secrets/data/camunda/identity-components" -}} + + CDE_API_ZEEBE_CLIENT_SECRET=''{{ index .Data.data "zeebe-secret" }}'' + + {{- end -}}' + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/stand/cde-api/cde-api-worker-s32d-publish-documents.yaml b/apps/documentations/stand/cde-api/cde-api-worker-s32d-publish-documents.yaml new file mode 100644 index 0000000..d545ce0 --- /dev/null +++ b/apps/documentations/stand/cde-api/cde-api-worker-s32d-publish-documents.yaml @@ -0,0 +1,286 @@ +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.9 + sourceRef: + kind: HelmRepository + name: yc-oci-charts + namespace: flux-system + interval: 10m + install: + remediation: + retries: 3 + upgrade: + remediation: + retries: 3 + values: + global: + env: _default + services: + 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: 25m + memory: + _default: 128Mi + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + command: + _default: + - /bin/sh + - -ec + args: + _default: + - 'set -a + + . /vault/secrets/cde-api-db + + . /vault/secrets/cde-api-s3 + + . /vault/secrets/cde-api-zeebe + + set +a + + exec /opt/worker + + ' + image: + name: + _default: cr.yandex/crp3ccidau046kdj8g9q/cde-api-worker-s32d-publish-documents:preprod_905f8821 + pullPolicy: + _default: IfNotPresent + service: + enabled: false + imagePullSecrets: + enabled: + _default: true + name: + _default: regcred + envs: + - name: CDE_API_EAV_HOST + value: + _default: http://backend-svc.eav.svc.cluster.local:80 + - 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: '2' + - 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://backend-svc.system-log.svc.cluster.local:80 + - name: CDE_API_SYSTEMLOG_TIMEOUT_MS + value: + _default: '10000' + - name: CDE_API_FLOWS_URL + value: + _default: http://backend-svc.flows.svc.cluster.local:80 + - name: CDE_API_TRANSMITTALS_URL + value: + _default: http://backend-svc.transmittal.svc.cluster.local:80 + - name: CDE_API_WORKSPACE_BASE_URL + value: + _default: http://backend-svc.workspaces.svc.cluster.local:80 + - 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.documentations.svc.cluster.local + - name: CDE_API_REDIS__PORT + value: + _default: '6379' + - name: CDE_API_S3_ENDPOINT + value: + _default: minio.storage.svc.cluster.local:9000 + - name: CDE_API_ZEEBE_GATEWAY_ADDRESS + value: + _default: camunda-zeebe-gateway.camunda.svc.cluster.local:26500 + - name: CDE_API_ZEEBE_CLIENT_ID + value: + _default: zeebe + - name: CDE_API_ZEEBE_AUTH_SERVER_URL + value: + _default: http://camunda-keycloak.camunda.svc.cluster.local/auth/realms/camunda-platform/protocol/openid-connect/token + 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' + serviceAccount: + enabled: + _default: false + name: + _default: documentations-vault + podAnnotations: + _default: + sidecar.istio.io/proxyCPU: 25m + sidecar.istio.io/proxyMemory: 128Mi + sidecar.istio.io/proxyCPULimit: '2' + sidecar.istio.io/proxyMemoryLimit: 1Gi + traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411,8200 + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-init-first: 'true' + vault.hashicorp.com/agent-pre-populate-only: 'true' + vault.hashicorp.com/agent-requests-cpu: 25m + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: documentations + vault.hashicorp.com/agent-inject-secret-cde-api-db: secrets/data/apps/documentations/postgres + vault.hashicorp.com/agent-inject-template-cde-api-db: '{{- with secret + "secrets/data/apps/documentations/postgres" -}} + + CDE_API_DATABASE__HOST=''{{ index .Data.data "host" }}'' + + CDE_API_DATABASE__PORT=''{{ index .Data.data "port" }}'' + + CDE_API_DATABASE__NAME=''{{ index .Data.data "database" }}'' + + CDE_API_DATABASE__USER=''{{ index .Data.data "username" }}'' + + CDE_API_DATABASE__PASSWORD=''{{ index .Data.data "password" }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-s3: secrets/data/minio/apps/documentations + vault.hashicorp.com/agent-inject-template-cde-api-s3: '{{- with secret + "secrets/data/minio/apps/documentations" -}} + + CDE_API_S3_ACCESS_KEY=''{{ or (index .Data.data "access_key_id") (index + .Data.data "access_key") }}'' + + CDE_API_S3_SECRET_KEY=''{{ or (index .Data.data "secret_access_key") + (index .Data.data "secret_key") }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-zeebe: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-template-cde-api-zeebe: '{{- with secret + "secrets/data/camunda/identity-components" -}} + + CDE_API_ZEEBE_CLIENT_SECRET=''{{ index .Data.data "zeebe-secret" }}'' + + {{- end -}}' + dependsOn: + - name: cde-api + namespace: documentations diff --git a/apps/documentations/stand/cde-api/cde-api.yaml b/apps/documentations/stand/cde-api/cde-api.yaml new file mode 100644 index 0000000..26c9d1b --- /dev/null +++ b/apps/documentations/stand/cde-api/cde-api.yaml @@ -0,0 +1,487 @@ +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.9 + sourceRef: + kind: HelmRepository + name: yc-oci-charts + namespace: flux-system + interval: 10m + install: + remediation: + retries: 3 + upgrade: + remediation: + retries: 3 + values: + global: + env: _default + services: + cde-api: + enabled: true + deployment: + enabled: true + name: + _default: cde-api + replicaCount: + _default: 1 + revisionHistoryLimit: + _default: 5 + port: + _default: 8000 + resources: + requests: + cpu: + _default: 25m + memory: + _default: 128Mi + probes: + readiness: + enabled: true + type: + _default: tcpSocket + tcpSocket: + port: + _default: 8000 + periodSeconds: + _default: 5 + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 0 + maxUnavailable: 1 + command: + _default: + - /bin/sh + - -ec + args: + _default: + - 'set -a + + . /vault/secrets/cde-api-db + + . /vault/secrets/cde-api-s3 + + . /vault/secrets/cde-api-zeebe + + . /vault/secrets/cde-api-rabbitmq + + . /vault/secrets/cde-api-users + + CDE_API_PUBLIC_KEY="$(cat /vault/secrets/cde-api-public-key)" + + set +a + + exec /opt/main + + ' + image: + name: + _default: cr.yandex/crp3ccidau046kdj8g9q/cde-api:preprod_905f8821 + 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.stand.sarex.tech + - name: CDE_API_WORKFLOW_BASE_URL + value: + _default: http://backend-svc.processing.svc.cluster.local:80 + - 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-svc.bim.svc.cluster.local:80 + - name: CDE_API_BIMAPI_V2_URL + value: + _default: http://backend-svc.bim.svc.cluster.local:80 + - 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://backend-svc.workspaces.svc.cluster.local:80 + - 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://backend-svc.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-svc.django.svc.cluster.local:80 + - name: CDE_API_ENVIRONMENT + value: + _default: stand + - 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://backend-svc.eav.svc.cluster.local:80 + - name: CDE_API_EAV_TIMEOUT_MS + value: + _default: '10000' + - name: CDE_API_DOCUMENTATION_V2_URL + value: + _default: http://backend-api-svc.documentations.svc.cluster.local:80 + - name: CDE_API_INTERNAL_URL + value: + _default: http://cde-api.documentations.svc.cluster.local: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-svc.django.svc.cluster.local:80 + - name: CDE_API_DISK_BUCKET_NAMESPACE + value: + _default: documentations + - name: CDE_API_USERS_ORIGINATOR + value: + _default: docs_stand + - 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-svc.flows.svc.cluster.local:80 + - name: CDE_API_TRANSMITTALS_URL + value: + _default: http://backend-svc.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.documentations.svc.cluster.local + - name: CDE_API_REDIS__PORT + value: + _default: '6379' + - name: CDE_API_S3_ENDPOINT + value: + _default: minio.storage.svc.cluster.local:9000 + - name: CDE_API_ZEEBE_GATEWAY_ADDRESS + value: + _default: camunda-zeebe-gateway.camunda.svc.cluster.local:26500 + - name: CDE_API_ZEEBE_CLIENT_ID + value: + _default: zeebe + - name: CDE_API_ZEEBE_AUTH_SERVER_URL + value: + _default: http://camunda-keycloak.camunda.svc.cluster.local/auth/realms/camunda-platform/protocol/openid-connect/token + 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' + serviceAccount: + enabled: + _default: false + name: + _default: documentations-vault + podAnnotations: + _default: + sidecar.istio.io/proxyCPU: 25m + sidecar.istio.io/proxyMemory: 128Mi + sidecar.istio.io/proxyCPULimit: '2' + sidecar.istio.io/proxyMemoryLimit: 1Gi + traffic.sidecar.istio.io/excludeOutboundPorts: 4317,4318,9411,8200 + vault.hashicorp.com/agent-inject: 'true' + vault.hashicorp.com/agent-init-first: 'true' + vault.hashicorp.com/agent-pre-populate-only: 'true' + vault.hashicorp.com/agent-requests-cpu: 25m + vault.hashicorp.com/auth-path: auth/kubernetes + vault.hashicorp.com/role: documentations + vault.hashicorp.com/agent-inject-secret-cde-api-db: secrets/data/apps/documentations/postgres + vault.hashicorp.com/agent-inject-template-cde-api-db: '{{- with secret + "secrets/data/apps/documentations/postgres" -}} + + CDE_API_DATABASE__HOST=''{{ index .Data.data "host" }}'' + + CDE_API_DATABASE__PORT=''{{ index .Data.data "port" }}'' + + CDE_API_DATABASE__NAME=''{{ index .Data.data "database" }}'' + + CDE_API_DATABASE__USER=''{{ index .Data.data "username" }}'' + + CDE_API_DATABASE__PASSWORD=''{{ index .Data.data "password" }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-s3: secrets/data/minio/apps/documentations + vault.hashicorp.com/agent-inject-template-cde-api-s3: '{{- with secret + "secrets/data/minio/apps/documentations" -}} + + CDE_API_S3_ACCESS_KEY=''{{ or (index .Data.data "access_key_id") (index + .Data.data "access_key") }}'' + + CDE_API_S3_SECRET_KEY=''{{ or (index .Data.data "secret_access_key") + (index .Data.data "secret_key") }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-zeebe: secrets/data/camunda/identity-components + vault.hashicorp.com/agent-inject-template-cde-api-zeebe: '{{- with secret + "secrets/data/camunda/identity-components" -}} + + CDE_API_ZEEBE_CLIENT_SECRET=''{{ index .Data.data "zeebe-secret" }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-rabbitmq: secrets/data/rabbitmq/apps/cde + vault.hashicorp.com/agent-inject-template-cde-api-rabbitmq: '{{- with + secret "secrets/data/rabbitmq/apps/cde" -}} + + CDE_API_RABBITMQ__HOST=''{{ index .Data.data "host" }}'' + + CDE_API_RABBITMQ__PORT=''{{ index .Data.data "port" }}'' + + CDE_API_RABBITMQ__USER=''{{ index .Data.data "username" }}'' + + CDE_API_RABBITMQ__PASSWORD=''{{ index .Data.data "password" }}'' + + CDE_API_RABBITMQ__VHOST=''{{ index .Data.data "vhost" }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-users: secrets/data/vault/common/django_auth + vault.hashicorp.com/agent-inject-template-cde-api-users: '{{- with secret + "secrets/data/vault/common/django_auth" -}} + + CDE_API_USERS_AUTH_TOKEN=''{{ index .Data.data "key" }}'' + + {{- end -}}' + vault.hashicorp.com/agent-inject-secret-cde-api-public-key: secrets/data/vault/common/rsa_keys + vault.hashicorp.com/agent-inject-template-cde-api-public-key: '{{- with + secret "secrets/data/vault/common/rsa_keys" -}} + + {{ index .Data.data "public_key" }} + + {{- end -}}' diff --git a/apps/documentations/stand/cde-api/kustomization.yaml b/apps/documentations/stand/cde-api/kustomization.yaml new file mode 100644 index 0000000..aa7a622 --- /dev/null +++ b/apps/documentations/stand/cde-api/kustomization.yaml @@ -0,0 +1,12 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- 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 +- tasks-execution-config.yaml +- virtualservice.yaml diff --git a/apps/documentations/stand/cde-api/tasks-execution-config.yaml b/apps/documentations/stand/cde-api/tasks-execution-config.yaml new file mode 100644 index 0000000..9c4d9b2 --- /dev/null +++ b/apps/documentations/stand/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/stand/cde-api/virtualservice.yaml b/apps/documentations/stand/cde-api/virtualservice.yaml new file mode 100644 index 0000000..ce94925 --- /dev/null +++ b/apps/documentations/stand/cde-api/virtualservice.yaml @@ -0,0 +1,52 @@ +apiVersion: networking.istio.io/v1 +kind: VirtualService +metadata: + name: vs-cde-api + namespace: documentations +spec: + hosts: + - sarex.stand.sarex.tech + gateways: + - default/platform-gateway + http: + - match: + - uri: + prefix: /documentations/v2/ + rewrite: + uri: /external/v2/ + corsPolicy: &id001 + allowOrigins: + - exact: https://sarex.stand.sarex.tech + - exact: https://document-link.stand.sarex.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/stand/kustomization.yaml b/apps/documentations/stand/kustomization.yaml index 49f70de..32ccdd9 100644 --- a/apps/documentations/stand/kustomization.yaml +++ b/apps/documentations/stand/kustomization.yaml @@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ../base + - cde-api patches: - path: api.yaml - path: filestream.yaml