# Production-specific values for peikarband
# This file overrides default values.yaml for production

replicaCount: 1

image:
  pullPolicy: Always

# Auto-create registry secret
registrySecret:
  enabled: true
  name: hub-registry-secret
  server: hub.peikarband.ir
  username: "admin"  # Set via ArgoCD UI: Parameters → registrySecret.username
  password: "5459ed7590d37656410fae38bdf59eb7ee33b68cd4c"  # Set via ArgoCD UI: Parameters → registrySecret.password

imagePullSecrets:
  - name: hub-registry-secret

# Auto-create application secrets (database, redis, etc)
appSecrets:
  enabled: true
  name: peikarband-prod-secrets
  dbUsername: "REPLACE_ME"  # Set via ArgoCD UI: Parameters → appSecrets.dbUsername
  dbPassword: "REPLACE_ME"  # Set via ArgoCD UI: Parameters → appSecrets.dbPassword
  redisPassword: "REPLACE_ME"  # Set via ArgoCD UI: Parameters → appSecrets.redisPassword

# Reflex configuration for production
reflex:
  apiUrl: "https://peikarband.ir"  # Production API URL

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

resources:
  limits:
    cpu: 500m
    memory: 1Gi
  requests:
    cpu: 200m
    memory: 256Mi

autoscaling:
  enabled: false
  minReplicas: 3
  maxReplicas: 20
  targetCPUUtilizationPercentage: 60
  targetMemoryUtilizationPercentage: 70

ingress:
  enabled: true
  className: "nginx"
  annotations:
    cert-manager.io/cluster-issuer: "letsencrypt-prod"
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
    nginx.ingress.kubernetes.io/rate-limit: "100"
    nginx.ingress.kubernetes.io/proxy-body-size: "10m"
  hosts:
    - host: peikarband.ir
      paths:
        - path: /
          pathType: Prefix
    - host: www.peikarband.ir
      paths:
        - path: /
          pathType: Prefix
  tls:
    - secretName: peikarband-tls
      hosts:
        - peikarband.ir
        - www.peikarband.ir

postgresql:
  enabled: true
  external:
    host: "postgres-prod.default.svc.cluster.local"
    port: "5432"
    database: "peikarband_prod"
    usernameSecret:
      name: "peikarband-prod-secrets"
      key: "db-username"
    passwordSecret:
      name: "peikarband-prod-secrets"
      key: "db-password"

redis:
  enabled: true
  external:
    host: "redis-prod.default.svc.cluster.local"
    port: "6379"
    passwordSecret:
      name: "peikarband-prod-secrets"
      key: "redis-password"

configMap:
  data:
    APP_NAME: "peikarband"
    LOG_LEVEL: "warning"
    ENVIRONMENT: "production"

podDisruptionBudget:
  enabled: true
  minAvailable: 2

networkPolicy:
  enabled: true

monitoring:
  serviceMonitor:
    enabled: true
    interval: 30s
    scrapeTimeout: 10s

