Skip to content

Commit

Permalink
fix: Do not use auth for mongodb healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
kuzznya committed Feb 26, 2024
1 parent 0f744ae commit f0634bd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/core/managed_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,12 +425,8 @@ func (m managedServicesImpl) createMySqlDeployment(ctx context.Context, service
}

func (m managedServicesImpl) createMongoDeployment(ctx context.Context, service openapi.ManagedService) error {
livenessCmd := fmt.Sprintf("mongosh --port 27017 --username %s --password \"$(cat $MONGO_INITDB_ROOT_PASSWORD_FILE)\" "+
"--eval 'db.runCommand({ping: 1})' --quiet",
managedServices[service.Type].username)
readinessCmd := fmt.Sprintf("mongosh --port 27017 --username %s --password \"$(cat $MONGO_INITDB_ROOT_PASSWORD_FILE)\" "+
"--eval 'db.serverStatus().ok' --quiet | grep -q 1",
managedServices[service.Type].username)
livenessCmd := "mongosh --port 27017 --eval 'db.runCommand({ping: 1})' --quiet"
readinessCmd := "mongosh --port 27017 --eval 'db.serverStatus().ok' --quiet | grep -q 1"

container := applyConfigsCoreV1.Container().
WithName(containerName).
Expand Down

0 comments on commit f0634bd

Please sign in to comment.