apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "mikrotik-portal.fullname" . }}-config
  labels:
    {{- include "mikrotik-portal.labels" . | nindent 4 }}
data:
  DATABASE_URL: {{ include "mikrotik-portal.databaseUrl" . | quote }}
  SYNC_DATABASE_URL: {{ include "mikrotik-portal.syncDatabaseUrl" . | quote }}
  APP_USER_DATABASE_URL: {{ include "mikrotik-portal.appUserDatabaseUrl" . | quote }}
  REDIS_URL: {{ include "mikrotik-portal.redisUrl" . | quote }}
  NATS_URL: {{ printf "nats://%s-nats:%d" (include "mikrotik-portal.fullname" .) (int .Values.nats.service.port) | quote }}
  JWT_ALGORITHM: "HS256"
  JWT_ACCESS_TOKEN_EXPIRE_MINUTES: {{ .Values.api.env.jwtAccessTokenExpireMinutes | quote }}
  JWT_REFRESH_TOKEN_EXPIRE_DAYS: {{ .Values.api.env.jwtRefreshTokenExpireDays | quote }}
  CORS_ORIGINS: {{ .Values.api.env.corsOrigins | quote }}
  DEBUG: {{ .Values.api.env.debug | quote }}
  APP_NAME: "TOD - The Other Dude"
  APP_VERSION: {{ .Chart.AppVersion | quote }}
  POLL_INTERVAL_SECONDS: {{ .Values.poller.env.pollIntervalSeconds | quote }}
  POLLER_LOG_LEVEL: {{ .Values.poller.env.logLevel | quote }}
