apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: cde
  namespace: orchestrator

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:
      enabled: true
      deployment:
        enabled: true
        name:
          _default: cde
        replicaCount:
          _default: 1
        port:
          _default: 8080
        probes:
          liveness:
            enabled:
              _default: true
            type:
              _default: tcpSocket
            tcpSocket:
              port:
                _default: 8080
            initialDelaySeconds:
              _default: 15
            periodSeconds:
              _default: 10
          readiness:
            enabled:
              _default: true
            type:
              _default: tcpSocket
            tcpSocket:
              port:
                _default: 8080
            initialDelaySeconds:
              _default: 15
            periodSeconds:
              _default: 10
      image:
        name:
          _default: cr.yandex/crp3ccidau046kdj8g9q/orchestrator:latest
        pullPolicy:
          _default: Always
      imagePullSecrets:
        enabled:
          _default: false
          stage: true
          preprod: true
          production: false
        name:
          _default: dockerhub
      service:
        enabled: true
        name:
          _default: cde
        type:
          _default: ClusterIP
        portName:
          _default: http
        port:
          _default: 8080
        targetPort:
          _default: http
      serviceAccount:
        enabled:
          _default: true
        name:
          _default: cde
        automountServiceAccountToken:
          _default: true
      secretEnvs: &cde_secret_envs
        - name: ENVIRONMENT
          secretName:
            _default: cde-secret
          secretKey:
            _default: ENVIRONMENT
        - name: LOG_LEVEL
          secretName:
            _default: cde-secret
          secretKey:
            _default: LOG_LEVEL
        - name: ZEEBE_GATEWAY
          secretName:
            _default: cde-secret
          secretKey:
            _default: ZEEBE_GATEWAY
        - name: DATABASE_URL
          secretName:
            _default: cde-secret
          secretKey:
            _default: DATABASE_URL
        - name: S3_ENDPOINT_URL
          secretName:
            _default: cde-secret
          secretKey:
            _default: S3_ENDPOINT_URL
        - name: S3_ACCESS_KEY_ID
          secretName:
            _default: cde-secret
          secretKey:
            _default: S3_ACCESS_KEY_ID
        - name: S3_SECRET_ACCESS_KEY
          secretName:
            _default: cde-secret
          secretKey:
            _default: S3_SECRET_ACCESS_KEY
        - name: PUBLIC_KEY
          secretName:
            _default: cde-secret
          secretKey:
            _default: PUBLIC_KEY
        - name: PDM_URL
          secretName:
            _default: cde-secret
          secretKey:
            _default: PDM_URL
        - name: FLOWS_URL
          secretName:
            _default: cde-secret
          secretKey:
            _default: FLOWS_URL
        - name: USERNAME
          secretName:
            _default: cde-secret
          secretKey:
            _default: USERNAME
        - name: PASSWORD
          secretName:
            _default: cde-secret
          secretKey:
            _default: PASSWORD
        - name: CAMUNDA_PROCESS_DEFINITION_ID
          secretName:
            _default: cde-secret
          secretKey:
            _default: CAMUNDA_PROCESS_DEFINITION_ID
        - name: OPERATE_URL
          secretName:
            _default: cde-secret
          secretKey:
            _default: OPERATE_URL
        - name: CAMUNDA_KEYCLOAK_URL
          secretName:
            _default: cde-secret
          secretKey:
            _default: CAMUNDA_KEYCLOAK_URL
        - name: CAMUNDA_CLIENT_ID
          secretName:
            _default: cde-secret
          secretKey:
            _default: CAMUNDA_CLIENT_ID
        - name: CAMUNDA_CLIENT_SECRET
          secretName:
            _default: cde-secret
          secretKey:
            _default: CAMUNDA_CLIENT_SECRET
        - name: WORKFLOWS_HOST
          secretName:
            _default: cde-secret
          secretKey:
            _default: WORKFLOWS_HOST
        - name: WORKSPACES_URL
          secretName:
            _default: cde-secret
          secretKey:
            _default: WORKSPACES_URL
        - name: AUTH_HOST
          secretName:
            _default: cde-secret
          secretKey:
            _default: AUTH_HOST
        - name: TELEGRAM_ALERT_GROUP_ID
          secretName:
            _default: cde-secret
          secretKey:
            _default: TELEGRAM_ALERT_GROUP_ID
        - name: TELEGRAM_TOKEN
          secretName:
            _default: cde-secret
          secretKey:
            _default: TELEGRAM_TOKEN
        - name: IS_CONTOUR
          secretName:
            _default: cde-secret
          secretKey:
            _default: IS_CONTOUR
        - name: AMQP_HOST
          secretName:
            _default: cde-secret
          secretKey:
            _default: AMQP_HOST
        - name: AMQP_PORT
          secretName:
            _default: cde-secret
          secretKey:
            _default: AMQP_PORT
        - name: AMQP_USER
          secretName:
            _default: cde-secret
          secretKey:
            _default: AMQP_USER
        - name: AMQP_PASSWORD
          secretName:
            _default: cde-secret
          secretKey:
            _default: AMQP_PASSWORD
        - name: AMQP_PATH_API
          secretName:
            _default: cde-secret
          secretKey:
            _default: AMQP_PATH_API
    cde-worker-copy:
      enabled: true
      deployment:
        enabled: true
        name:
          _default: cde-worker-copy
        replicaCount:
          _default: 1
          preprod: 2
          production: 2
        port:
          _default: 8080
      image:
        name:
          _default: cr.yandex/crp3ccidau046kdj8g9q/copy-worker:latest
        pullPolicy:
          _default: Always
      imagePullSecrets:
        enabled:
          _default: false
          stage: true
          preprod: true
          production: false
        name:
          _default: dockerhub
      service:
        enabled: false
      serviceAccount:
        enabled:
          _default: false
        name:
          _default: cde
      secretEnvs: *cde_secret_envs
    cde-worker-copyv2:
      enabled: true
      deployment:
        enabled: true
        name:
          _default: cde-worker-copyv2
        replicaCount:
          _default: 1
          preprod: 2
          production: 2
        port:
          _default: 8080
      image:
        name:
          _default: cr.yandex/crp3ccidau046kdj8g9q/copyv2-worker:latest
        pullPolicy:
          _default: Always
      imagePullSecrets:
        enabled:
          _default: false
          stage: true
          preprod: true
          production: false
        name:
          _default: dockerhub
      service:
        enabled: false
      serviceAccount:
        enabled:
          _default: false
        name:
          _default: cde
      secretEnvs: *cde_secret_envs
    cde-worker-markings:
      enabled: true
      deployment:
        enabled: true
        name:
          _default: cde-worker-markings
        replicaCount:
          _default: 1
          preprod: 2
          production: 2
        port:
          _default: 8080
      image:
        name:
          _default: cr.yandex/crp3ccidau046kdj8g9q/markings-worker:latest
        pullPolicy:
          _default: Always
      imagePullSecrets:
        enabled:
          _default: false
          stage: true
          preprod: true
          production: false
        name:
          _default: dockerhub
      service:
        enabled: false
      serviceAccount:
        enabled:
          _default: false
        name:
          _default: cde
      secretEnvs: *cde_secret_envs
    cde-worker-markingsv2:
      enabled: true
      deployment:
        enabled: true
        name:
          _default: cde-worker-markingsv2
        replicaCount:
          _default: 1
          preprod: 2
          production: 2
        port:
          _default: 8080
      image:
        name:
          _default: cr.yandex/crp3ccidau046kdj8g9q/markingsv2-worker:latest
        pullPolicy:
          _default: Always
      imagePullSecrets:
        enabled:
          _default: false
          stage: true
          preprod: true
          production: false
        name:
          _default: dockerhub
      service:
        enabled: false
      serviceAccount:
        enabled:
          _default: false
        name:
          _default: cde
      secretEnvs: *cde_secret_envs
    cde-worker-sign:
      enabled: true
      deployment:
        enabled: true
        name:
          _default: cde-worker-sign
        replicaCount:
          _default: 1
        port:
          _default: 8080
      image:
        name:
          _default: cr.yandex/crp3ccidau046kdj8g9q/sign-worker:latest
        pullPolicy:
          _default: Always
      imagePullSecrets:
        enabled:
          _default: false
          stage: true
          preprod: true
          production: false
        name:
          _default: dockerhub
      service:
        enabled: false
      serviceAccount:
        enabled:
          _default: false
        name:
          _default: cde
    cde-worker-signv2:
      enabled: true
      deployment:
        enabled: true
        name:
          _default: cde-worker-signv2
        replicaCount:
          _default: 1
        port:
          _default: 8080
      image:
        name:
          _default: cr.yandex/crp3ccidau046kdj8g9q/signv2-worker:latest
        pullPolicy:
          _default: Always
      imagePullSecrets:
        enabled:
          _default: false
          stage: true
          preprod: true
          production: false
        name:
          _default: dockerhub
      service:
        enabled: false
      serviceAccount:
        enabled:
          _default: false
        name:
          _default: cde
      secretEnvs: *cde_secret_envs
    cde-flowscallback:
      enabled: true
      deployment:
        enabled: true
        name:
          _default: cde-flowscallback
        replicaCount:
          _default: 1
        port:
          _default: 8080
      image:
        name:
          _default: cr.yandex/crp3ccidau046kdj8g9q/flowscallback-worker:latest
        pullPolicy:
          _default: Always
      imagePullSecrets:
        enabled:
          _default: false
          stage: true
          preprod: true
          production: false
        name:
          _default: dockerhub
      service:
        enabled: false
      serviceAccount:
        enabled:
          _default: false
        name:
          _default: cde
      secretEnvs: *cde_secret_envs
    cde-splitpdf:
      enabled: true
      deployment:
        enabled: true
        name:
          _default: cde-splitpdf
        replicaCount:
          _default: 1
        port:
          _default: 8080
      image:
        name:
          _default: cr.yandex/crp3ccidau046kdj8g9q/splitpdf-worker:latest
        pullPolicy:
          _default: Always
      imagePullSecrets:
        enabled:
          _default: false
          stage: true
          preprod: true
          production: false
        name:
          _default: dockerhub
      service:
        enabled: false
      serviceAccount:
        enabled:
          _default: false
        name:
          _default: cde
    cde-worker-update-bundles:
      enabled: true
      deployment:
        enabled: true
        name:
          _default: cde-worker-update-bundles
        replicaCount:
          _default: 1
        port:
          _default: 8080
      image:
        name:
          _default: cr.yandex/crp3ccidau046kdj8g9q/updatebundles-worker:latest
        pullPolicy:
          _default: Always
      imagePullSecrets:
        enabled:
          _default: true
          production: true
        name:
          _default: dockerhub
      service:
        enabled: false
      serviceAccount:
        enabled:
          _default: false
        name:
          _default: cde
    cde-worker-create-versions:
      enabled: true
      deployment:
        enabled: true
        name:
          _default: cde-worker-create-versions
        replicaCount:
          _default: 1
        port:
          _default: 8080
      image:
        name:
          _default: cr.yandex/crp3ccidau046kdj8g9q/createversions-worker:latest
        pullPolicy:
          _default: Always
      imagePullSecrets:
        enabled:
          _default: true
          production: true
        name:
          _default: dockerhub
      service:
        enabled: false
      serviceAccount:
        enabled:
          _default: false
        name:
          _default: cde
      secretEnvs: *cde_secret_envs
    cde-worker-create-versionsv2:
      enabled: true
      deployment:
        enabled: true
        name:
          _default: cde-worker-create-versionsv2
        replicaCount:
          _default: 1
        port:
          _default: 8080
      image:
        name:
          _default: cr.yandex/crp3ccidau046kdj8g9q/createversionsv2-worker:latest
        pullPolicy:
          _default: Always
      imagePullSecrets:
        enabled:
          _default: true
          production: true
        name:
          _default: dockerhub
      service:
        enabled: false
      serviceAccount:
        enabled:
          _default: false
        name:
          _default: cde
      secretEnvs: *cde_secret_envs
    cde-worker-alert:
      enabled: true
      deployment:
        enabled: true
        name:
          _default: cde-worker-alert
        replicaCount:
          _default: 1
        port:
          _default: 8080
      image:
        name:
          _default: cr.yandex/crp3ccidau046kdj8g9q/orchestrator:latest
        pullPolicy:
          _default: Always
      imagePullSecrets:
        enabled:
          _default: false
          stage: true
          preprod: true
          production: false
        name:
          _default: dockerhub
      service:
        enabled: false
      serviceAccount:
        enabled:
          _default: false
        name:
          _default: cde
      secretEnvs: *cde_secret_envs

