# =============================================================================
# Global / common settings
# =============================================================================
namespace: gitdataai
releaseName: admin

image:
  registry: harbor.gitdata.me/gta_team
  pullPolicy: IfNotPresent
  pullSecrets: [ ]

# =============================================================================
# Cert-Manager Configuration (集群已安装 cert-manager)
# =============================================================================
certManager:
  enabled: true
  clusterIssuerName: cloudflare-acme-cluster-issuer

externalSecrets:
  storeName: vault-backend
  storeKind: SecretStore

admin:
  enabled: true
  replicaCount: 2

  image:
    repository: admin
    tag: latest

  service:
    type: ClusterIP
    port: 3000

  ingress:
    enabled: true
    hosts:
      - admin.gitdata.me
    # tlsSecret: my-tls-secret   # uncomment to use a pre-existing TLS secret (overrides cert-manager auto-issue)
    annotations:
      cert-manager.io/cluster-issuer: cloudflare-acme-cluster-issuer  # auto-set by template when certManager.enabled=true
      kubernetes.io/ingress.class: nginx


  resources:
    requests:
      cpu: 100m
      memory: 256Mi

  livenessProbe:
    path: /api/health
    port: 3000
    initialDelaySeconds: 10
    periodSeconds: 10

  readinessProbe:
    path: /api/health
    port: 3000
    initialDelaySeconds: 5
    periodSeconds: 5

  config:
    appUrl: ""
    appDomain: ""
    nodeEnv: production

  secretKeys:
    databaseUrl: APP_DATABASE_URL
    redisUrl: APP_REDIS_URL
    nextAuthSecret: APP_NEXTAUTH_SECRET

  env:
    DATABASE_URL: "postgresql://gitdataai:gitdataai123@cnpg-cluster-rw.cnpg:5432/gitdataai?sslmode=disable"
    REDIS_CLUSTER_URLS: "redis://default:redis123@valkey-cluster-0.valkey-cluster.valkey-cluster.svc.cluster.local:6379,redis://default:redis123@valkey-cluster-1.valkey-cluster.valkey-cluster.svc.cluster.local:6379,redis://default:redis123@valkey-cluster-2.valkey-cluster.valkey-cluster.svc.cluster.local:6379"
    REDIS_URL: "redis://default:redis123@valkey-cluster.valkey-cluster.svc.cluster.local:6379"
    ADMIN_SESSION_COOKIE_NAME: admin_session
    ADMIN_SESSION_TTL: 604800
    ADMIN_SUPER_USERNAME: admin
    ADMIN_SUPER_PASSWORD: admin123
    COOKIE_SECURE: false
    COOKIE_SAME_SITE: lax
    APP_NEXTAUTH_SECRET: ""
    ADMIN_RPC_URL: gitdata-adminrpc.gitdataai.svc.cluster.local:9090


  nodeSelector: { }
  tolerations: [ ]
  affinity: { }

secrets:
  enabled: false
  databaseUrl: "postgresql://gitdataai:gitdataai123@cnpg-cluster-rw.cnpg:5432/gitdataai?sslmode=disable"
  redisUrl: "redis://:redis123@valkey-cluster.valkey-cluster.svc.cluster.local:6379"
  nextAuthSecret: ""
  extra: { }
