cozystack/packages/apps/mongodb
Andrei Kvapil 470d43b33e
fix(mongodb): update MongoDB logo
Replace the old MongoDB logo with the official one featuring
the MongoDB leaf icon on a green radial gradient background.

Co-authored-by: Viktoriia Kvapil <159528100+kvapsova@users.noreply.github.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-02-10 21:17:50 +01:00
..
charts feat(apps): add MongoDB managed application 2026-01-19 13:39:57 +01:00
files feat(apps): add MongoDB managed application 2026-01-19 13:39:57 +01:00
hack feat(apps): add MongoDB managed application 2026-01-19 13:39:57 +01:00
logos fix(mongodb): update MongoDB logo 2026-02-10 21:17:50 +01:00
templates refactor(mongodb): unify users and databases configuration 2026-01-27 23:24:42 +01:00
tests refactor(mongodb): unify users and databases configuration 2026-01-27 23:24:42 +01:00
.helmignore feat(apps): add MongoDB managed application 2026-01-19 13:39:57 +01:00
Chart.yaml feat(apps): add MongoDB managed application 2026-01-19 13:39:57 +01:00
Makefile Fix pre-commit check 2026-01-20 03:24:32 +01:00
README.md feat(mongodb): add migration for users/databases config 2026-01-29 12:18:35 +01:00
values.schema.json feat(mongodb): add migration for users/databases config 2026-01-29 12:18:35 +01:00
values.yaml refactor(mongodb): unify users and databases configuration 2026-01-27 23:24:42 +01:00

Managed MongoDB Service

MongoDB is a popular document-oriented NoSQL database known for its flexibility and scalability. The Managed MongoDB Service provides a self-healing replicated cluster managed by the Percona Operator for MongoDB.

Deployment Details

This managed service is controlled by the Percona Operator for MongoDB, ensuring efficient management and seamless operation.

Deployment Modes

Replica Set Mode (default)

By default, MongoDB deploys as a replica set with the specified number of replicas. This mode is suitable for most use cases requiring high availability.

Sharded Cluster Mode

Enable sharding: true for horizontal scaling across multiple shards. Each shard is a replica set, and mongos routers handle query routing.

Notes

External Access

When external: true is enabled:

  • Replica Set mode: Traffic is load-balanced across all replica set members. This works well for read operations, but write operations require connecting to the primary. MongoDB drivers handle primary discovery automatically using the replica set connection string.
  • Sharded mode: Traffic is routed through mongos routers, which handle both reads and writes correctly.

Credentials

On first install, the credentials secret will be empty until the Percona operator initializes the cluster. Run helm upgrade after MongoDB is ready to populate the credentials secret with the actual password.

Parameters

Common parameters

Name Description Type Value
replicas Number of MongoDB replicas in replica set. int 3
resources Explicit CPU and memory configuration for each MongoDB replica. When omitted, the preset defined in resourcesPreset is applied. object {}
resources.cpu CPU available to each replica. quantity ""
resources.memory Memory (RAM) available to each replica. quantity ""
resourcesPreset Default sizing preset used when resources is omitted. string small
size Persistent Volume Claim size available for application data. quantity 10Gi
storageClass StorageClass used to store the data. string ""
external Enable external access from outside the cluster. bool false
version MongoDB major version to deploy. string v8

Sharding configuration

Name Description Type Value
sharding Enable sharded cluster mode. When disabled, deploys a replica set. bool false
shardingConfig Configuration for sharded cluster mode. object {}
shardingConfig.configServers Number of config server replicas. int 3
shardingConfig.configServerSize PVC size for config servers. quantity 3Gi
shardingConfig.mongos Number of mongos router replicas. int 2
shardingConfig.shards List of shard configurations. []object [...]
shardingConfig.shards[i].name Shard name. string ""
shardingConfig.shards[i].replicas Number of replicas in this shard. int 0
shardingConfig.shards[i].size PVC size for this shard. quantity ""

Users configuration

Name Description Type Value
users Users configuration map. map[string]object {}
users[name].password Password for the user (auto-generated if omitted). string ""

Databases configuration

Name Description Type Value
databases Databases configuration map. map[string]object {}
databases[name].roles Roles assigned to users. object {}
databases[name].roles.admin List of users with admin privileges (readWrite + dbAdmin). []string []
databases[name].roles.readonly List of users with read-only privileges. []string []

Backup parameters

Name Description Type Value
backup Backup configuration. object {}
backup.enabled Enable regular backups. bool false
backup.schedule Cron schedule for automated backups. string 0 2 * * *
backup.retentionPolicy Retention policy (e.g. "30d"). string 30d
backup.destinationPath Destination path for backups (e.g. s3://bucket/path/). string s3://bucket/path/to/folder/
backup.endpointURL S3 endpoint URL for uploads. string http://minio-gateway-service:9000
backup.s3AccessKey Access key for S3 authentication. string ""
backup.s3SecretKey Secret key for S3 authentication. string ""

Bootstrap (recovery) parameters

Name Description Type Value
bootstrap Bootstrap configuration. object {}
bootstrap.enabled Whether to restore from a backup. bool false
bootstrap.recoveryTime Timestamp for point-in-time recovery; empty means latest. string ""
bootstrap.backupName Name of backup to restore from. string ""