如何在kubernetes中运行多个gitea副本?

问题描述 投票:0回答:1

我正在尝试使用 helm 在 kubernetes 中运行 gitea,它适用于单个实例,但如果我尝试将replicaCount 设置为 2,pod 将无法启动。

Error: INSTALLATION FAILED: 
template: gitea/templates/gitea/deployment.yaml:29:28: 
executing "gitea/templates/gitea/deployment.yaml" at <include (print $.Template.BasePath "/gitea/config.yaml") .>: 
error calling include: template: gitea/templates/gitea/config.yaml:28:40: 
executing "gitea/templates/gitea/config.yaml" at <"cron.GIT_GC_REPOS">: wrong type for value; expected map[string]interface {}; got string

它从哪里来?我还需要更改其他一些设置吗?

我的values.yaml

replicaCount: 2

redis-cluster:
  enabled: false
postgresql:
  enabled: false
postgresql-ha:
  enabled: false

persistence:
  enabled: true
  create: false
  mount: true
  claimName: cluster-nfs-pvc
  size: 10Gi
  accessModes:
    - ReadWriteMany
  labels: {}
  storageClass:
  subPath:
  annotations:
    helm.sh/resource-policy: keep

gitea:
  admin:
    existingSecret:
    username: admin
    password: admin
    email: "[email protected]"

  config:
    server:
      DOMAIN: gitea.qtest.example.com
      ROOT_URL: https://gitea.qtest.example.com
      SSH_LISTEN_PORT: 2222
    database:
      DB_TYPE: postgres
      HOST: db.example.com:5432
      NAME: gitea_db
      USER: gitea_user
      PASSWD: xxxxxx
      SCHEMA: public
    session:
      PROVIDER: memory
    cache:
      ADAPTER: memory
    queue:
      TYPE: level

我使用nfs共享进行pv:

pv-pvc.yaml

apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv-nfs-cluster
spec:
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  nfs:
    server: nfs.example.com
    path: /nfs/qtest/gitea

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: cluster-nfs-pvc
spec:
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 10Gi
kubernetes-helm gitea
1个回答
0
投票

您只需自行禁用它即可

吉茶: 配置: cron.GIT_GC_REPOS: 启用:假

© www.soinside.com 2019 - 2024. All rights reserved.