Skip to main content

MongoDatabase

resourceType mongodb · provider mck · 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
provider: mck # selects this backend — the cluster default may differ
resourceName: my-mongodb # your handle — drives the env-var prefix + secret name
parameters:
dbName: "<value>"

Parameters​

NameTypeRequiredDefaultDescription
dbNamestringyes—Name of the application database the user is granted readWrite + dbAdmin on.
usernamestringno—Application (SCRAM) user. Defaults to dbName.
membersstringno3Number of replica-set members.
mongoVersionstringno8.0.6MongoDB Community server version (image tag).
storageSizestringno10GiData volume size per member (e.g. 10Gi).
logsSizestringno2GiLogs volume size per member (e.g. 2Gi).
storageClassstringno—StorageClass for the volumeClaimTemplates. Empty inherits the cluster default.
generateCredentialsstringnotrueMint 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.
remoteKeystringno—Cloud secret-store key to read the password from when generateCredentials is 'false'. Defaults to <dbName>-<username>-<env>.
backupsstringnofalseEnable 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.
backupSchedulestringno0 2 * * *Cron schedule for the backup job (when backups is 'true').
backupRetentionstringno30Days of backups to retain; older archives are pruned after each run.
backupImagestringno—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-mongodb → MY_MONGODB_URL, MY_MONGODB_USERNAME, …:

  • url
  • username
  • password

Status​

FieldDescription
clusterNameName of the MongoDBCommunity replica set.
databaseNameName of the application database.
usernameName of the application user.

Auto-generated from the MongoDatabase XRD + mongodb--mck ResourceCapability. Do not edit by hand.