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

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:
      backend:
        enabled: true

        image:
          name:
            _default: cr.yandex/crp3ccidau046kdj8g9q/mapper:prod_b0d05a34
          pullPolicy:
            _default: IfNotPresent

        deployment:
          enabled: true

          name:
            _default: backend
            stage: mapper-backend
            preprod: backend
            production: backend

          replicaCount:
            _default: 1
            stage: 1
            preprod: 3
            production: 3

          port:
            _default: 8000

          resources:
            limits:
              cpu:
                _default: "2.0"
              memory:
                _default: 512Mi

            requests:
              cpu:
                _default: "1.0"
              memory:
                _default: 128Mi

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

        service:
          enabled: true

          name:
            _default: backend-service
            stage: mapper-backend-service
            preprod: backend-service
            production: backend-service

          type:
            _default: ClusterIP

          port:
            _default: 8000

          targetPort:
            _default: 8000

          portName:
            _default: http

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

        labels:
          monitoring: prometheus

        envs:
          - name: DOCUMENTATION_HOST
            value:
              _default: https://test.sarex.brusnika.tech/documentations/api/v1

          - name: FLOW_HOST
            value:
              _default: https://test.sarex.brusnika.tech/flows/api/v1

          - name: DJANGO_HOST
            value:
              _default: https://test.sarex.brusnika.tech/api

          - name: NOTE_HOST
            value:
              _default: https://test.sarex.brusnika.tech/notes/api/v1

          - name: REDIS_USE
            value:
              _default: "0"

          - name: TIMEOUT
            value:
              _default: "120"

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