global:
  namespace: my-apps
  imagePullSecrets: []

# Backend configuration
backend:
  name: backend
  replicaCount: 1
  image:
    repository: harbor.dvirlabs.com/my-apps/brand-master-backend
    pullPolicy: IfNotPresent
    tag: "latest"
  
  service:
    type: ClusterIP
    port: 8000
    targetPort: 8000
  
  resources:
    requests:
      cpu: 200m
      memory: 256Mi
    limits:
      cpu: 1000m
      memory: 1Gi
  
  env:
    PYTHONUNBUFFERED: "1"
    BACKEND_URL: "https://api-brand-master.dvirlabs.com"
    FRONTEND_URL: "https://brand-master.dvirlabs.com"
    # Admin user credentials (change in production!)
    ADMIN_EMAIL: "admin@brand-master.com"
    ADMIN_PASSWORD: "admin123"  # CHANGE THIS!
    ADMIN_FULL_NAME: "System Administrator"
    # Email configuration for password reset (optional)
    SMTP_HOST: "smtp.gmail.com"
    SMTP_PORT: "587"
    SMTP_USERNAME: ""
    SMTP_PASSWORD: ""
    SMTP_FROM: "noreply@brand-master.com"
  
  # JWT Secret Key (IMPORTANT: Change this in production!)
  jwtSecretKey: "your-secret-key-change-this-in-production"
  jwtAlgorithm: "HS256"
  jwtExpireMinutes: "30"

  # Persistent storage for product images
  persistence:
    enabled: true
    storageClass: "nfs-client"
    accessMode: ReadWriteOnce
    size: 15Gi
    mountPath: /app/uploads

  ingress:
    enabled: true
    className: "traefik"
    annotations:
      traefik.ingress.kubernetes.io/router.entrypoints: websecure
      traefik.ingress.kubernetes.io/router.tls: "true"
      cert-manager.io/cluster-issuer: "letsencrypt-prod"
      # Prevent redirect loops
      ingress.kubernetes.io/ssl-redirect: "false"
      ingress.kubernetes.io/force-ssl-redirect: "false"
    hosts:
      - host: api-brand-master.dvirlabs.com
        paths:
          - path: /
            pathType: Prefix
    tls:
      - secretName: api-brand-master-tls
        hosts:
          - api-brand-master.dvirlabs.com

# Frontend configuration
frontend:
  name: frontend
  replicaCount: 1
  image:
    repository: harbor.dvirlabs.com/my-apps/brand-master-frontend
    pullPolicy: IfNotPresent
    tag: "latest"
  
  service:
    type: ClusterIP
    port: 80
    targetPort: 80
  
  env:
    VITE_API_URL: "https://api-brand-master.dvirlabs.com/api"
  
  resources:
    requests:
      cpu: 50m
      memory: 64Mi
    limits:
      cpu: 200m
      memory: 256Mi

  ingress:
    enabled: true
    className: "traefik"
    annotations:
      traefik.ingress.kubernetes.io/router.entrypoints: websecure
      traefik.ingress.kubernetes.io/router.tls: "true"
      cert-manager.io/cluster-issuer: "letsencrypt-prod"
      # Prevent redirect loops - tell Traefik to use HTTPS directly
      ingress.kubernetes.io/ssl-redirect: "false"
      ingress.kubernetes.io/force-ssl-redirect: "false"
    hosts:
      - host: brand-master.dvirlabs.com
        paths:
          - path: /
            pathType: Prefix
    tls:
      - secretName: brand-master-tls
        hosts:
          - brand-master.dvirlabs.com

# PostgreSQL configuration
postgres:
  name: db
  image:
    repository: harbor.dvirlabs.com/dockerhub/postgres
    tag: "16-alpine"
    pullPolicy: IfNotPresent
  
  user: brand_master_user
  password: brand_master_password
  database: brand_master_db
  port: 5432
  
  service:
    type: ClusterIP
    port: 5432
    targetPort: 5432
  
  persistence:
    enabled: true
    accessMode: ReadWriteOnce
    storageClass: "nfs-client"
    size: 10Gi
  
  resources:
    requests:
      cpu: 100m
      memory: 256Mi
    limits:
      cpu: 1000m
      memory: 1Gi

# Service Account
serviceAccount:
  create: true
  annotations: {}
  name: ""

# Pod annotations
podAnnotations: {}

# Pod security context
podSecurityContext: {}
  # fsGroup: 2000

# Container security context
securityContext: {}
  # capabilities:
  #   drop:
  #   - ALL
  # readOnlyRootFilesystem: true
  # runAsNonRoot: true
  # runAsUser: 1000

# Node selector
nodeSelector: {}

# Tolerations
tolerations: []

# Affinity
affinity: {}
