# Edu 平台全局默认值
# 环境覆盖文件：values-dev.yaml / values-staging.yaml / values-prod.yaml

# 全局标签（自动注入到所有资源）
global:
  labels:
    app.kubernetes.io/part-of: edu-platform
  # 镜像拉取凭证（生产建议使用 Secret + serviceAccount）
  imagePullSecrets: []

# 命名空间规划
namespaces:
  - name: edu-system
    component: system
  - name: edu-services
    component: services
  - name: edu-monitoring
    component: monitoring
  - name: edu-ingress
    component: ingress

# 全局 ConfigMap（非敏感配置）
configMap:
  enabled: true
  name: edu-platform-config
  data:
    NODE_ENV: production
    LOG_LEVEL: info
    MYSQL_HOST: mysql.edu-system.svc.cluster.local
    REDIS_HOST: redis.edu-system.svc.cluster.local
    KAFKA_BROKERS: kafka.edu-system.svc.cluster.local:9092

# 全局 Secret（仅骨架；生产请使用 External Secrets Operator 对接 Vault/KMS）
secret:
  enabled: true
  name: edu-platform-secret
  # 真实部署时通过 --set secret.data.MYSQL_PASSWORD=<base64> 注入
  # 或通过 externalSecrets 引用
  data:
    MYSQL_PASSWORD: ""
    JWT_SECRET: ""
    REDIS_PASSWORD: ""

# 全局 Ingress
ingress:
  enabled: true
  className: nginx
  annotations:
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
  hosts:
    - host: edu.example.com
      paths:
        - path: /api
          pathType: Prefix
          service: api-gateway
          port: 8080
        - path: /auth
          pathType: Prefix
          service: api-gateway
          port: 8080
  tls:
    - secretName: edu-tls
      hosts:
        - edu.example.com

# HPA 全局默认策略（各服务可在自身 chart 中覆盖）
hpa:
  enabled: true
  minReplicas: 2
  maxReplicas: 10
  targetCPUUtilizationPercentage: 70
  targetMemoryUtilizationPercentage: 80
