# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2beta2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: temporal
  namespace: default
spec:
  interval: 5m
  chart:
    spec:
      chart: app-template
      version: 3.1.0
      sourceRef:
        kind: HelmRepository
        name: bjws-charts
        namespace: flux-system

  values:
    controllers:
      main:
        containers:
          main:
            image:
              repository: temporalio/auto-setup
              tag: 1.25

            env:
            - name: DB
              value: postgres12
            - name: DBNAME
              value: ganymede
            - name: DB_PORT
              value: "5432"
            - name: POSTGRES_USER
              value: ganymede
            - name: POSTGRES_PWD
              secretKeyRef:
                name: ganymede-env
                key: dbPassword
            - name: POSTGRES_SEEDS # postgres hostname, idk why its called SEEDS
              value: postgres16-rw.database.svc

    service:
      app:
        controller: main

        ports:
          temporal:
            port: 7233

            protocol: TCP