---
# measurement — компонент приложения measurements (apps/measurements),
# в wb развёрнут в ns django, а не в своём собственном неймспейсе.
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: measurement
  namespace: django

spec:
  interval: 10m

  chart:
    spec:
      chart: universal-chart
      version: "0.1.7"
      sourceRef:
        kind: HelmRepository
        name: yc-oci-charts
        namespace: flux-system
      interval: 10m

  install:
    remediation:
      retries: 3

  upgrade:
    remediation:
      retries: 3

  values:
    global:
      env: _default

    services:
      measurement:
        enabled: true

        image:
          name:
            _default: cr.yandex/crp3ccidau046kdj8g9q/measurements:prod_ece72657
          pullPolicy:
            _default: IfNotPresent

        deployment:
          enabled: true

          name:
            _default: measurement

          replicaCount:
            _default: 1

          port:
            _default: 8000

          probes:
            liveness:
              enabled: false
            readiness:
              enabled: false

        service:
          enabled: true

          name:
            _default: measurement-service

          type:
            _default: ClusterIP

          port:
            _default: 8000

          targetPort:
            _default: 8000

          portName:
            _default: http

        imagePullSecrets:
          enabled:
            _default: true
          name:
            _default: dockerhub

        volumes:
          _default:
            - name: tmp-volume
              mountPath:
                _default: /tmp
              emptyDir: {}

        envs:
          - name: DJANGO_HOST
            value:
              _default: "https://lk.srx.wb.ru:30443"

          - name: S3_JSON_FILE
            value:
              _default: "/opt/cred_s3.json"

        secretEnvs:
          - name: S3_JSON_SETTINGS
            secretName:
              _default: "s3-json-settings"
            secretKey: "S3_JSON_SETTINGS"

        commitSha: ""
        gitlabUri: ""
        gitlabJobUrl: ""
        owner: ""
