cat > deploy.conf <<'EOF'
{
"_id":"rs0",
"members":[
{
"_id":0,
"host":"testing-mongo-mongodb-0.testing-mongo-mongodb-headless.default.svc.cluster.local:27017",
"priority":3
},
{
"_id":1,
"arbiterOnly":true,
"host":"testing-mongo-mongodb-arbiter-0.testing-mongo-mongodb-arbiter-headless.default.svc.cluster.local:27017"
},
{
"_id":3,
"host":"testing-mongo-mongodb-1.testing-mongo-mongodb-headless.default.svc.cluster.local:27017",
"priority":0
}
]
}
EOF
helm install "testing-mongo-mongodb" bitnami/mongodb --wait --namespace default \
--set architecture=replicaset \
--set replicaCount=2 \
--set persistence.storageClass=efs-sc \
--set-string podLabels."admission\.datadoghq\.com/enabled"=false \
--set-string podAnnotations."podLabels\.admission\.datadoghq\.com/enabled"=false \
--set persistence.enabled=true \
--set-string arbiter.podLabels."admission\.datadoghq\.com/enabled"=false \
--set-string arbiter.podAnnotations."podLabels\.admission\.datadoghq\.com/enabled"=false \
--set resources.limits.cpu=1 \
--set resources.limits.memory=2Gi \
--set resources.requests.cpu=1 \
--set resources.requests.memory=2Gi \
--set auth.existingSecret=primary-mongodb \
--set enableIPv6=false \
--set image.pullPolicy=Always \
--set metrics.enabled=false \
--set podLabels.type=testing-mongo \
--set podLabels.vendor=testing-mongo \
--set volumePermissions.enabled=true \
--set podLabels.os=linux \
--set replicaSetConfigurationSettings.enabled=true \
--set replicaSetConfigurationSettings.configuration=$(cat deploy.conf)
Выходит ошибка
INSTALLATION FAILED: expected at most two arguments, unexpected arguments: "_id":"rs0",, "members":[, {, "_id":0,, "host":"testing-mongo-mongodb-0.testing-mongo-mongodb-headless.default.svc.cluster.local:27017",, "priority":3, },, {, "_id":1,, "arbiterOnly":true,, "host":"testing-mongo-mongodb-arbiter-0.testing-mongo-mongodb-arbiter-headless.default.svc.cluster.local:27017", },, {, "_id":3,, "host":"testing-mongo-mongodb-1.testing-mongo-mongodb-headless.default.svc.cluster.local:27017",, "priority":0, }, ], }
При этом заходил на под и вводил тот же конфиг через rs.config(...) - все ок