{{/*
AUTOGENERATED FILE - DO NOT EDIT.
Generated by scripts/generate_env_tpls.py from charts/agentarea/config.yaml
*/}}

{{- define "agentarea.temporalServer.configVars" -}}
DB: "postgres12"
DB_PORT: "5432"
POSTGRES_SEEDS: "{{ include "agentarea.database.host" . }}"
DBNAME: {{ .Values.temporal.database.name | default "temporal" | quote }}
BIND_ON_IP: "0.0.0.0"
{{- end }}

{{- define "agentarea.temporalServer.envs" }}
- name: DB
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-temporalserver
      key: DB
- name: DB_PORT
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-temporalserver
      key: DB_PORT
- name: POSTGRES_SEEDS
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-temporalserver
      key: POSTGRES_SEEDS
- name: DBNAME
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-temporalserver
      key: DBNAME
- name: BIND_ON_IP
  valueFrom:
    configMapKeyRef:
      name: {{ include "agentarea.fullname" . }}-env-temporalserver
      key: BIND_ON_IP
{{- end }}

{{- define "agentarea.temporalServer.secrets.envs" }}
- name: POSTGRES_USER
  valueFrom:
    secretKeyRef:
      name: "{{ .Values.global.secrets.postgresql }}"
      key: username
- name: POSTGRES_PWD
  valueFrom:
    secretKeyRef:
      name: "{{ .Values.global.secrets.postgresql }}"
      key: password
{{- end }}
