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

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

        image:
          name:
            _default: cr.yandex/crp3ccidau046kdj8g9q/document-link-frontend:wb_cb2027ce
          pullPolicy:
            _default: IfNotPresent

        deployment:
          enabled: true

          name:
            _default: frontend-public-link

          replicaCount:
            _default: 1

          port:
            _default: 3000

          command:
            _default: ["npm", "start"]

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

        service:
          enabled: true

          name:
            _default: frontend-service-public-link

          type:
            _default: ClusterIP

          port:
            _default: 80

          targetPort:
            _default: 3000

          portName:
            _default: http

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

        volumes:
          _default:
            - name: envfile
              mountPath:
                _default: /app/.env.local
              subPath:
                _default: .env.local
              readOnly:
                _default: true
              secret:
                secretName:
                  _default: documentations-publiclink-jwt-secret
                items:
                  - key: .env
                    path:
                      _default: .env.local

        envs:
          - name: NODE_ENV
            value:
              _default: "production"

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