---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: backend
  namespace: django
spec:
  values:
    services:
      backend:
        deployment:
          replicaCount:
            _default: 2
        image:
          name:
            _default: cr.yandex/crp3ccidau046kdj8g9q/backend:production_c0c6bbb1
        envs:
          - name: GK_ENCRYPTION_KEY
            value:
              _default: zfDjuszywHSbAhY8KJQbESbpUYN74XTs
          - name: SERVER_DONSTROI_STYLE
            value:
              _default: "True"
          - name: SERVER_API_HOST
            value:
              _default: https://sarex.dsinv.ru
          - name: SERVER_VERIFY_SSL
            value:
              _default: "False"
          - name: SERVER_SUPERSET_HOST
            value:
              _default: https://bi.sarex.dsinv.ru
          - name: GATEWAY_HOST
            value:
              _default: http://pdm-api.documentations.svc.cluster.local:8080
          - name: KC_DEFAULT_COMPANY_NAME
            value:
              _default: Донстрой
          - name: KC_SYNC_USER_GROUPS
            value:
              _default: "0"
          - name: SERVER_ZITADEL_ENABLED
            value:
              _default: "False"
          - name: KC_SYNC_USER_POSITIONS
            value:
              _default: "0"
          - name: KC_SYNC_USER_DEPARTMENTS
            value:
              _default: "0"
          - name: SERVER_CHANGELOG_MODE_CELERY
            value:
              _default: "True"
          - name: SERVER_CHANGELOG_MODE_SYSTEM_LOG
            value:
              _default: "True"
          - name: DJANGO_SETTINGS_MODULE
            value:
              _default: config.settings.production
          - name: CC_PATH
            value:
              _default: /usr/local/bin/CloudCompare
          - name: CC_COMPARISONS_BASE_DIR
            value:
              _default: /tmp
          - name: PCVT_PATH
            value:
              _default: /usr/local/bin/PotreeConverter
          - name: POTREE_CONVERTER_PATH
            value:
              _default: /usr/local/bin/PotreeConverter
          - name: WORKFLOWS_BASE_HOST
            value:
              _default: http://backend.django.svc.cluster.local:8000
          - name: WORKFLOWS_HOST
            value:
              _default: http://workflows-service.workflow.svc.cluster.local:8000
          - name: WORKFLOWS_PREFIX
            value:
              _default: /api/v1
          - name: SERVER_HOST
            value:
              _default: https://sarex.dsinv.ru
          - name: S3_HOST
            value:
              _default: http://minio-service.minio.svc.cluster.local:9000
          - name: AWS_S3_ENDPOINT_URL
            value:
              _default: http://minio-service.minio.svc.cluster.local:9000
          - name: MEASUREMENTS_USE_MEASUREMENTS
            value:
              _default: "1"
          - name: MEASUREMENTS_HOST
            value:
              _default: http://measurement-service.measurements.svc.cluster.local:8000/api
          - name: SERVER_USE_DJANGO_STORAGE
            value:
              _default: "1"
          - name: SERVER_DJANGO_URLS
            value:
              _default: "1"
          - name: SERVER_S3_STREAM_IMPORT
            value:
              _default: "1"
          - name: WORKFLOWS_USE
            value:
              _default: "1"
          - name: SERVER_KAFKA_ENABLED
            value:
              _default: "True"
          - name: KAFKA_TOPICS
            value:
              _default: '{"planning": "message-hub-stage", "ams-sync": "ams-sync"}'
          - name: KAFKA_BOOTSTRAP_SERVERS
            value:
              _default: '["donstroi-kafka-bootstrap.kafka.svc.cluster.local:9093"]'
          - name: KAFKA_SECURITY_PROTOCOL
            value:
              _default: SSL
          - name: KAFKA_SASL_MECHANISM
            value:
              _default: SCRAM-SHA-512
          - name: KAFKA_SSL_CAFILE
            value:
              _default: /etc/ca-certificates/Yandex/YandexInternalRootCA.crt
          - name: WORKFLOWS_REGISTRY
            value:
              _default: cr.yandex/crp3ccidau046kdj8g9q
          - name: DJANGO_REDIS_HOST
            value:
              _default: redis-service.django.svc.cluster.local
          - name: DJANGO_RABBIT_HOSTNAME
            value:
              _default: rabbitmq-service.django.svc.cluster.local
          - name: CELERY_RABBITMQ_HOST
            value:
              _default: rabbitmq-service.django.svc.cluster.local
          - name: DJANGO_POSTGRES_HOST
            value:
              _default: postgres-service
          - name: DJANGO_POSTGRES_PORTS
            value:
              _default: "5432"
          - name: ALLOWED_HOSTS
            value:
              _default: "*"
          - name: USE_SSL_FOR_URL_SERIALIZATION
            value:
              _default: "0"
          - name: SERVER_REPLACE_HOST
            value:
              _default: "1"
          - name: SERVER_JWT_PROXY
            value:
              _default: "0"
          - name: PDM_SYNC
            value:
              _default: "1"
          - name: CELERY_REDIS_HOST
            value:
              _default: redis-service
