我按照此处的说明使用helm. 这需要一些适应,因为它是通过 gitlab 和 gitlab-ci 创建的。不幸的是,关于的部分values.yaml被略过了,我还没有通过 helm 找到完整的 mongo 示例。[许多示例似乎也已弃用。]不确定如何解决该问题,将其用作values.yaml文件:
global:
mongodb:
DBName: 'example'
mongodbUsername: "user"
mongodbPassword: "password"
mongodbDatabase: "database"
mongodbrootPassword: "password"
auth.rootPassword: "password"
返回以下错误:
'auth.rootPassword' must not be empty, please add '--set auth.rootPassword=$MONGODB_ROOT_PASSWORD' to the command. To get the current value:
export MONGODB_ROOT_PASSWORD=$(kubectl get secret --namespace angular-23641052-review-86-sh-mousur review-86-sh-mousur-mongodb -o jsonpath="{.data.mongodb-root-password}" | base64 --decode)
鉴于我只使用helmgitlab-ci 调用,我不确定如何实现set或以其他方式设置 root 密码。