apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "playwright-proxy.fullname" . }}
  labels:
    {{- include "playwright-proxy.labels" . | nindent 4 }}
data:
  NODE_ENV: {{ .Values.config.nodeEnv | quote }}
  PORT: "3000"
  HOST: "0.0.0.0"
  MAX_CONCURRENT_SESSIONS: {{ .Values.config.maxConcurrentSessions | quote }}
  BROWSER_TIMEOUT_MS: {{ .Values.config.browserTimeout | quote }}
  IDLE_TIMEOUT_MS: {{ .Values.config.idleTimeout | quote }}
  LOG_LEVEL: {{ .Values.config.logLevel | quote }}
  METRICS_ENABLED: {{ .Values.config.metricsEnabled | quote }}
  METRICS_PORT: {{ .Values.config.metricsPort | quote }}
  {{- if .Values.redis.enabled }}
  REDIS_URL: "redis://{{ include "playwright-proxy.fullname" . }}-redis-master:6379"
  {{- end }}
