MongoDatabase
resourceType mongodb · provider mck · default provider (omit provider to get this one) · sharing Private · cleanup Orphan
Provisions a dedicated MongoDBCommunity replica set (via the MCK operator) with an application database + SCRAM user, External-Secrets-backed credentials (generated or read from the cloud secret store), and the cloud secret-store + identity primitives when store-backed.
Request it
Add this to your PlatformApplication's spec.resourceRequirements (optional parameters are in the table below):
resourceRequirements:
- resourceType: mongodb
resourceName: my-mongodb # your handle — drives the env-var prefix + secret name
parameters:
dbName: <value>
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
dbName | string | yes | — | Name of the application database the user is granted readWrite + dbAdmin on. |
username | string | no | — | Application (SCRAM) user. Defaults to dbName. |
members | string | no | 3 | Number of replica-set members. |
mongoVersion | string | no | 8.0.6 | MongoDB Community server version (image tag). |
storageSize | string | no | 10Gi | Data volume size per member (e.g. 10Gi). |
logsSize | string | no | 2Gi | Logs volume size per member (e.g. 2Gi). |
storageClass | string | no | — | StorageClass for the volumeClaimTemplates. Empty inherits the cluster default. |
generateCredentials | string | no | true | Mint the password with an ESO Password generator ('true') or read it from the cloud secret store ('false'). When 'false', the cloud secret store + identity are provisioned. |
remoteKey | string | no | — | Cloud secret-store key to read the password from when generateCredentials is 'false'. Defaults to <dbName>-<username>-<env>. |
backups | string | no | false | Enable scheduled mongodump backups to object storage: 'true' or 'false'. MongoDBCommunity has no operator-native backup, so this runs a CronJob (periodic logical backups, not continuous PITR) and provisions the backup bucket/container + identity. |
backupSchedule | string | no | 0 2 * * * | Cron schedule for the backup job (when backups is 'true'). |
backupRetention | string | no | 30 | Days of backups to retain; older archives are pruned after each run. |
backupImage | string | no | — | Image for the mongodump initContainer (must contain mongodump). Defaults to mongo:<mongoVersion major.minor>. |
Connection
On grant, a connection secret is published with these tokens and injected into your workload as {RESOURCENAME}_{TOKEN} (UPPER_SNAKE) — e.g. resourceName: my-db → MY_DB_URL, MY_DB_USERNAME, …:
urlusernamepassword
Status
| Field | Description |
|---|---|
clusterName | Name of the MongoDBCommunity replica set. |
databaseName | Name of the application database. |
username | Name of the application user. |
Auto-generated from the MongoDatabase XRD + mongodb-mck ResourceCapability. Do not edit by hand.