# Default values for playwright-proxy
# This is a YAML-formatted file.

replicaCount: 3

image:
  repository: playwright-proxy
  pullPolicy: IfNotPresent
  tag: "1.0.0"

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
  create: true
  annotations: {}
  name: ""

podAnnotations:
  prometheus.io/scrape: "true"
  prometheus.io/port: "9090"
  prometheus.io/path: "/metrics"

podSecurityContext:
  fsGroup: 2000

securityContext:
  capabilities:
    drop:
    - ALL
  readOnlyRootFilesystem: false
  runAsNonRoot: true
  runAsUser: 1000

service:
  type: LoadBalancer
  port: 3000
  targetPort: 3000
  annotations: {}

ingress:
  enabled: true
  className: "nginx"
  annotations:
    cert-manager.io/cluster-issuer: "letsencrypt-prod"
    nginx.ingress.kubernetes.io/websocket-services: "playwright-proxy"
  hosts:
    - host: proxy.example.com
      paths:
        - path: /
          pathType: Prefix
  tls:
    - secretName: playwright-proxy-tls
      hosts:
        - proxy.example.com

resources:
  limits:
    cpu: 4000m
    memory: 4Gi
  requests:
    cpu: 2000m
    memory: 2Gi

autoscaling:
  enabled: true
  minReplicas: 3
  maxReplicas: 10
  targetCPUUtilizationPercentage: 70
  targetMemoryUtilizationPercentage: 80

nodeSelector: {}

tolerations: []

affinity:
  podAntiAffinity:
    preferredDuringSchedulingIgnoredDuringExecution:
      - weight: 100
        podAffinityTerm:
          labelSelector:
            matchExpressions:
              - key: app.kubernetes.io/name
                operator: In
                values:
                  - playwright-proxy
          topologyKey: kubernetes.io/hostname

# Redis configuration
redis:
  enabled: true
  architecture: standalone
  auth:
    enabled: true
    password: "changeme"
  master:
    persistence:
      enabled: true
      size: 8Gi

# Application configuration
config:
  nodeEnv: production
  maxConcurrentSessions: 200
  browserTimeout: 300000
  idleTimeout: 600000
  sessionSecret: "change-me-in-production"
  jwtSecret: "change-me-in-production"
  logLevel: info
  metricsEnabled: true
  metricsPort: 9090

# Environment variables from secrets
secrets:
  sessionSecret: ""
  jwtSecret: ""
  redisPassword: ""

# Monitoring
monitoring:
  enabled: true
  prometheus:
    enabled: true
  grafana:
    enabled: true
