- templateId: k8s-dedicated-template-v1 # template version string
  default: true
  supportedVersions:
    - "1.35"
    - "1.36"
    - "1.33"
    - "1.34"
  tidbOperatorV2:
    crdPaths:
      - /etc/helm/tidb-operator-v2/core.pingcap.com_clusters.yaml
      - /etc/helm/tidb-operator-v2/core.pingcap.com_pdgroups.yaml
      - /etc/helm/tidb-operator-v2/core.pingcap.com_pds.yaml
      - /etc/helm/tidb-operator-v2/core.pingcap.com_tikvgroups.yaml
      - /etc/helm/tidb-operator-v2/core.pingcap.com_tikvs.yaml
      - /etc/helm/tidb-operator-v2/core.pingcap.com_tidbgroups.yaml
      - /etc/helm/tidb-operator-v2/core.pingcap.com_tidbs.yaml
      - /etc/helm/tidb-operator-v2/core.pingcap.com_tiflashgroups.yaml
      - /etc/helm/tidb-operator-v2/core.pingcap.com_tiflashes.yaml
      - /etc/helm/tidb-operator-v2/core.pingcap.com_ticdcgroups.yaml
      - /etc/helm/tidb-operator-v2/core.pingcap.com_ticdcs.yaml
      - /etc/helm/tidb-operator-v2/core.pingcap.com_schedulergroups.yaml
      - /etc/helm/tidb-operator-v2/core.pingcap.com_schedulers.yaml
      - /etc/helm/tidb-operator-v2/core.pingcap.com_tsogroups.yaml
      - /etc/helm/tidb-operator-v2/core.pingcap.com_tsos.yaml
      - /etc/helm/tidb-operator-v2/core.pingcap.com_tiproxygroups.yaml
      - /etc/helm/tidb-operator-v2/core.pingcap.com_tiproxies.yaml
      - /etc/helm/tidb-operator-v2/br.pingcap.com_backups.yaml
      - /etc/helm/tidb-operator-v2/br.pingcap.com_restores.yaml
      - /etc/helm/tidb-operator-v2/br.pingcap.com_tibrs.yaml
      - /etc/helm/tidb-operator-v2/br.pingcap.com_tibrgcs.yaml
    releaseName: tidb-operator-v2
    namespace: tidb-admin
    helmValues:
      image:
        repository: TPML_TIDB_IMAGE_REGISTRY/tidbcloud/tidb-operator
        tag: v2.2.0-alpha.7
      args:
        - --backup-manager-image=TPML_TIDB_IMAGE_REGISTRY/tidbcloud/tidb-backup-manager:v2.2.0-alpha.7
      env:
        - name: AWS_REGION
          value: TMPL_REGION
      resources:
        limits:
          cpu: "2"
          memory: 2Gi
        requests:
          cpu: 80m
          memory: 50Mi
    chartPath: /etc/helm/tidb-operator-v2/
    crdVersion: v2.2.0-alpha.7
  clusterProxy:
    chartPath: /etc/helm/proxy/cluster-proxy
    releaseName: proxy
    namespace: tidb-admin
    helmValues:
      replicaCount: 1
      env:
        - name: AUTH0-AUDIENCE
          value: TMPL_AUTH0_AUDIENCE
        - name: AUTH0-DOMAIN
          value: TMPL_AUTH0_DOMAIN
      image:
        repository: TPML_TIDB_IMAGE_REGISTRY/tidbcloud/cluster-proxy
        tag: v1.2.57
      gotty:
        repository: TPML_TIDB_IMAGE_REGISTRY/tidbcloud/gotty
        tag: "20211103"
      service:
        type: ClusterIP
        loadBalancerSourceRanges: []
      ingress:
        enabled: true
      resources:
        limits:
          cpu: 500m
          memory: 256Mi
        requests:
          cpu: 20m
          memory: 80Mi
      deployment:
        proxyArgs:
          enableDevMode: true
      podSecurityContext:
        fsGroup: 2000
      securityContext:
        runAsUser: 1000
        runAsGroup: 2000
        runAsNonRoot: true
        readOnlyRootFilesystem: true
        allowPrivilegeEscalation: false
        privileged: false
        capabilities:
          drop:
            - NET_RAW
  serviceProxy:
    chartPath: /etc/helm/service-proxy
    releaseName: service-proxy
    namespace: tidb-admin
    helmValues:
      replicaCount: 1
      image:
        repository: TPML_TIDB_IMAGE_REGISTRY/tidbcloud/service-proxy
        tag: v0.7.0
      ingress:
        enabled: true
        paths:
          - path: /@/proxy/cluster/\d+/(pd|tibr|ticdc|dm|tidb-worker)(/.*)?
      resources:
        limits:
          memory: 256Mi
        requests:
          cpu: 10m
          memory: 20Mi
  clusterGateway:
    namespace: tidb-admin
    chartPath: /etc/helm/kong
    crdPaths:
      - /etc/helm/kong/crds/custom-resource-definitions.yaml
      - /etc/helm/kong/crds/gateway-api-crd-standard-install.yaml
    helmValues:
      image:
        repository: TPML_TIDB_IMAGE_REGISTRY/third-party/kong/kong
        tag: "3.6"
      ingressController:
        image:
          repository: TPML_TIDB_IMAGE_REGISTRY/third-party/kong/kubernetes-ingress-controller
          tag: "3.1"
      replicaCount: 2
      admin:
        enabled: true
        http:
          enabled: true
        type: ClusterIP
      proxy:
        enabled: true
        type: ClusterIP
      securityContext:
        fsGroup: 2000
        runAsGroup: 2000
        runAsNonRoot: true
        runAsUser: 1000
      containerSecurityContext:
        readOnlyRootFilesystem: true
        allowPrivilegeEscalation: false
        privileged: false
        capabilities:
          drop:
            - NET_RAW
  sliReporter:
    chartPath: /etc/helm/sli-reporter/sli-reporter
    releaseName: reporter
    namespace: tidb-admin
    helmValues:
      replicaCount: 1
      image:
        repository: TPML_TIDB_IMAGE_REGISTRY/tidbcloud/sli-reporter
        tag: v2.4.0
      aws:
        region: TPML_SLI_AWS_REGION
        deliveryStreamName: TPML_SLI_FIREHOSE_NAME
        deliveryStreamRoleArn: TPML_SLI_FIREHOSE_ROLE_ARN
      resources:
        limits:
          cpu: 500m
          memory: 1Gi
        requests:
          cpu: 100m
          memory: 80Mi
      securityContext:
        runAsUser: 1000
        runAsGroup: 2000
        fsGroup: 2000
        runAsNonRoot: true
        readOnlyRootFilesystem: true
        allowPrivilegeEscalation: false
        privileged: false
        capabilities:
          drop:
            - NET_RAW
  ngAutoScaler:
    chartPath: /etc/helm/ng-autoscaler
    releaseName: ng-autoscaler
    namespace: tidb-admin
    helmValues:
      replicaCount: 1
      autoScalerImage: TPML_TIDB_IMAGE_REGISTRY/tidbcloud/ng-autoscaler:release-v0.25.0-c8d8bbb2598e3fafe3cb62c23fe04a01aae06b43
      resources:
        limits:
          cpu: 500m
          memory: 1Gi
        requests:
          cpu: 100m
          memory: 80Mi
      securityContext:
        runAsUser: 1000
        runAsGroup: 2000
        fsGroup: 2000
        runAsNonRoot: true
        readOnlyRootFilesystem: true
        allowPrivilegeEscalation: false
        privileged: false
        capabilities:
          drop:
            - NET_RAW
