apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: openobserve
  namespace: openobserve
spec:
  interval: 5m
  timeout: 10m
  values:
    universal-chart:
      services:
        openobserve:
          deployment:
            replicaCount:
              _default: 1
            podAnnotations:
              _default: null
          image:
            name:
              _default: public.ecr.aws/zinclabs/openobserve:v0.60.3
            pullPolicy:
              _default: IfNotPresent
          envs:
            - name: ZO_HTTP_PORT
              value:
                _default: "5080"
            - name: ZO_LOCAL_MODE
              value:
                _default: "false"
            - name: ZO_META_STORE
              value:
                _default: postgres
            - name: ZO_CLUSTER_COORDINATOR
              value:
                _default: nats
            - name: ZO_NATS_REPLICAS
              value:
                _default: "1"
            - name: ZO_S3_PROVIDER
              value:
                _default: s3
            - name: ZO_S3_SERVER_URL
              value:
                _default: http://10.49.10.90:9000
            - name: ZO_S3_BUCKET_NAME
              value:
                _default: openobserve
            - name: ZO_S3_REGION_NAME
              value:
                _default: ru-central1
            - name: ZO_TELEMETRY
              value:
                _default: "false"
          secretEnvs:
            - name: ZO_ROOT_USER_EMAIL
              secretName:
                _default: openobserve-secret
              secretKey: ZO_ROOT_USER_EMAIL
            - name: ZO_ROOT_USER_PASSWORD
              secretName:
                _default: openobserve-secret
              secretKey: ZO_ROOT_USER_PASSWORD
            - name: ZO_META_POSTGRES_DSN
              secretName:
                _default: openobserve-secret
              secretKey: ZO_META_POSTGRES_DSN
            - name: ZO_NATS_ADDR
              secretName:
                _default: openobserve-secret
              secretKey: ZO_NATS_ADDR
            - name: PGHOST
              secretName:
                _default: openobserve-secret
              secretKey: PGHOST
            - name: PGPORT
              secretName:
                _default: openobserve-secret
              secretKey: PGPORT
            - name: PGDATABASE
              secretName:
                _default: openobserve-secret
              secretKey: PGDATABASE
            - name: PGUSER
              secretName:
                _default: openobserve-secret
              secretKey: PGUSER
            - name: PGPASSWORD
              secretName:
                _default: openobserve-secret
              secretKey: PGPASSWORD
            - name: PGSSLMODE
              secretName:
                _default: openobserve-secret
              secretKey: PGSSLMODE
            - name: ZO_S3_ACCESS_KEY
              secretName:
                _default: openobserve-secret
              secretKey: ZO_S3_ACCESS_KEY
            - name: ZO_S3_SECRET_KEY
              secretName:
                _default: openobserve-secret
              secretKey: ZO_S3_SECRET_KEY
          serviceAccount:
            enabled: true
            name:
              _default: openobserve
    openobserve:
      secret:
        create: true
        extraNamespaces:
          - opentelemetry-collector
        data:
          ZO_ROOT_USER_EMAIL: admin@grafana-srx.wb.ru
          PGHOST: sarex-vpsql-01.xc.wb.ru
          PGPORT: "5432"
          PGDATABASE: openobserve
          PGUSER: openobserve
          PGSSLMODE: disable
          ZO_NATS_ADDR: nats://openobserve-nats:4222
      nats:
        enabled: true
        replicaCount: 1
        persistence:
          enabled: true
          size: 10Gi
          storageClassName: local-path
      otelCollector:
        enabled: false
      vault:
        enabled: false
