nginx-ingress:
  enabled: false
# ==================================
# 全局配置 (Global)
# ==================================
global:
  edition: ce
  gitlabVersion: "19.2.0"
  hosts:
    domain: infraserviceonline.com
    https: true
    gitlab:
      host: gitlab.infraserviceonline.com
    monitoring:
      enabled: false

  gatewayApi:
    # Install a Gateway and Routes for each component.
    enabled: false
    # Install the bundled Envoy Gateway chart, a GatewayClass, a EnvoyPatchPolicy, and the EnvoyProxy resources.
    installEnvoy: false


  ingress:
    configureCertmanager: false
    enabled: false
    tls:
      enabled: false

  # API 版本适配
  # Override the API version to use for HorizontalPodAutoscaler
  hpa:
    apiVersion: ""

  # Enable KEDA globally (https://keda.sh/)
  keda:
    enabled: false

  # Override the API version to use for PodDisruptionBudget
  pdb:
    apiVersion: ""

  # Override the API version to use for CronJob
  batch:
    cronJob:
      apiVersion: ""

  # Override enablement of ServiceMonitor and PodMonitor objects.
  monitoring:
    enabled: false


  # 镜像版本 (注意：Chart 10.x 默认会拉取最新的 18.x 镜像)
  # 如果你想强制指定旧版本，请取消注释下面的 global.image.tag
  # image:
  #   tag: "16.11.4-ce.0" # 不推荐，建议随 Chart 升级
#  image:
#    # 确保仓库地址也是官方的（如果你用的是官方 Chart）
#    repository: egistry.gitlab.com/gitlab-org/build/cng/gitlab-webservice-ce
#    tag: "v18.10.3"
#    pullPolicy: IfNotPresent

  # 外部 PostgreSQL 配置
  psql:
    host: pg-prod-rw.postgresql.svc
    port: 5432
    database: gitlabhq_production
    username: gitlab
    password:
      secret: gitlab-postgres-password
      key: password

  redis:
    # 指向你的 Valkey Cluster 服务地址
    # 格式：svc_name.namespace.svc.cluster.local
    host: valkey-0.valkey-headless.valkey-replica.svc.cluster.local
    port: 6379
    # 你的 Redis 没有密码，必须显式禁用认证
    auth:
      enabled: false
    # 如果有多个数据库，可以指定，默认是 0
    # database: 0
    # 3. 集群模式的客户端配置（传递给 Redis 客户端库）
    sentinel:
      enabled: false
    sentinelAuth:
      enabled: false
  gitaly:
    enabled: true
    tls:
      enabled: false

  praefect:
    enabled: false

  minio:
    enabled: false

  # 对象存储配置 (Artifacts, LFS 等)
  appConfig:
    # 全局通用的对象存储连接配置（只写一次，所有模块复用）
    object_store:
      enabled: true  # 必须开启！你漏了这行
      proxy_download: true
      connection:
        secret: object-storage
        key: connection
    # 各模块需指定 bucket + remote_directory + 显式启用 object_store
    lfs:
      enabled: true  # 显式启用
      bucket: gitlab-lfs
    artifacts:
      enabled: true
      bucket: gitlab-artifacts
    uploads:
      enabled: true
      bucket: gitlab-uploads
    packages:
      enabled: true
      bucket: gitlab-packages
    externalDiffs:
      enabled: false
      bucket: ceph-bkt-aad0791f-76df-43d3-9313-cca489d46ead
    terraformState:
      enabled: false
      bucket: ceph-bkt-aad0791f-76df-43d3-9313-cca489d46ead
    dependencyProxy:
      enabled: false
      bucket: ceph-bkt-aad0791f-76df-43d3-9313-cca489d46ead
    ciSecureFiles:
      enabled: false
      bucket: ceph-bkt-aad0791f-76df-43d3-9313-cca489d46ead
    backups:
      bucket: gitlab-backups
      tmpBucket: gitlab-backups

    microsoft_graph_mailer:
      enabled: false
    incomingEmail:
      enabled: false
    serviceDeskEmail:
      enabled: false


  nodeAffinity: "hard"
  antiAffinity: "hard"
  affinity:
    nodeAffinity:
      key: "openebs-storage"
      values:
      - enabled
    podAntiAffinity:
      topologyKey: "kubernetes.io/hostname"

  gitlabBase:
    image:
      repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-base

# ==================================
# 依赖组件配置 (Components)
# ==================================
certmanager-issuer:
  email: admin@infraserviceonline.com

installCertmanager: false
certmanager:
#  enabled: false
  installCRDs: false
  nameOverride: certmanager

upgradeCheck:
  enabled: false
nginx-ingress:
  enabled: false
prometheus:
  install: false
redis:
  install: false
postgresql:
  install: false
gitlab-runner:
  install: false
registry:
  enabled: false

# ==================================
# GitLab 核心组件 (GitLab)
# ==================================
gitlab:
  webservice:
    enabled: true
    minReplicas: 1             # 🚀 强行锁死最小副本数为 1
    maxReplicas: 1             # 🚀 强行锁死最大副本数为 1
    # 彻底关闭 HPA 动态自动扩容，防止其根据 CPU 忙碌情况瞎生 Pod
    hpa:
      enabled: false

  sidekiq:
    enabled: true
    minReplicas: 1             # 🚀 同理锁死 Sidekiq 为 1 个单副本
    maxReplicas: 1
    hpa:
      enabled: false
    metrics:
      enabled: true  # 🚀 对应 19.x 官方参数，一键激活 3807 端口并将探针路由对齐
    livenessProbe:
      initialDelaySeconds: 150 # 对应官方日常探针延迟覆写


  # 3. 核心存储 (就是你刚才改的那个)
  gitaly:
    affinity:
      podAntiAffinity:
        preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 100
            podAffinityTerm:
              labelSelector:
                matchLabels:
                  app: gitaly
                  release: gitlab
              topologyKey: kubernetes.io/hostname
    tolerations:
      - key: "ceph-taint"
        operator: "Equal"
        value: "osd"
        effect: "NoSchedule"
    persistence:
      enabled: true
      storageClass: "openebs-hostpath-sys-data1"
      size: "30Gi"

  # 4. 初始化数据库
  migrations:
    enabled: true

  gitlab-shell:
    minReplicas: 1             # 🚀 锁死 Git-Shell 副本数为 1
    maxReplicas: 1
    hpa:
      enabled: false
    tolerations:
      - key: "ceph-taint"
        operator: Equal
        value: "osd"
        effect: "NoSchedule"
    
  # 3. KAS (Kubernetes Agent Server)
  kas:
    tolerations:
      - key: "ceph-taint"
        operator: Equal
        value: "osd"
        effect: "NoSchedule"
    
  # 4. Toolbox 对应secret object-storage
  toolbox:
    backups:
      objectStorage:
        config:
          secret: object-storage
          key: connection
    tolerations:
      - key: "ceph-taint"
        operator: Equal
        value: "osd"
        effect: "NoSchedule"
  
  # 5. GitLab-Exporter (监控导出器)
  gitlab-exporter:
    tolerations:
      - key: "ceph-taint"
        operator: Equal
        value: "osd"
        effect: "NoSchedule"
