---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: frontend
  namespace: projects

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

        image:
          name:
            _default: cr.yandex/crp3ccidau046kdj8g9q/project-frontend-app:wb_fd49eb19
          pullPolicy:
            _default: IfNotPresent

        deployment:
          enabled: true

          name:
            _default: projects-frontend-static

          replicaCount:
            _default: 2

          port:
            _default: 80

          resources:
            requests:
              cpu:
                _default: 25m
              memory:
                _default: 100Mi

          probes:
            liveness:
              enabled:
                _default: true
              type:
                _default: httpGet
              httpGet:
                path:
                  _default: /ping
                port:
                  _default: 80
              initialDelaySeconds:
                _default: 10
              periodSeconds:
                _default: 60
              failureThreshold:
                _default: 10
            readiness:
              enabled:
                _default: true
              type:
                _default: httpGet
              httpGet:
                path:
                  _default: /ping
                port:
                  _default: 80
              initialDelaySeconds:
                _default: 10
              periodSeconds:
                _default: 30
              failureThreshold:
                _default: 20

        service:
          enabled: true

          name:
            _default: projects-frontend-static-service

          type:
            _default: ClusterIP

          port:
            _default: 80

          targetPort:
            _default: 80

          portName:
            _default: http

        imagePullSecrets:
          enabled:
            _default: true
          name:
            _default: regcred
