Skip to content

Rate this page
Thanks for your feedback
Thank you! The feedback has been submitted.

Get free database assistance or contact our experts for personalized support.

About customization and extensibility

The default Custom Resource is meant to be a good starting point, not a straitjacket. This page collects the ways to change the Operator’s behavior when your environment needs something the defaults do not cover.

Change what the database does

You want to Use
Change MongoDB server settings Changing MongoDB options
Change Percona Backup for MongoDB settings Change Percona Backup for MongoDB configuration
Run a script at a point in the Pod lifecycle Extend Pod startup logic

MongoDB settings live in the configuration field of each replica set, and are passed through to the server as its configuration file.

Change what runs beside the database

Sidecar containers let you run your own process in the database Pod. Use sidecars, sidecarVolumes, and sidecarPVCs in the Custom Resource for that. See Add sidecar containers.

Environment variables are set at three different levels, depending on what you need to influence:

Change how objects are labelled and scoped

Change where images and backups come from

Unsafe configurations

The unsafeFlags section lets you run configurations the Operator would otherwise refuse, such as a replica set below the member count needed for high availability.

Warning

Each unsafeFlags setting removes a specific safety guardrail the Operator otherwise enforces - check what a flag does before enabling it in a production cluster.

Limitations

  • Customizations are yours to maintain. A sidecar, hook script, or custom configuration block that worked on one Operator version is not automatically revalidated on the next - re-test after an upgrade.
  • Options set through configuration are passed to the database as-is. The Operator does not validate them, so a typo surfaces as a database that will not start rather than as a rejected Custom Resource.

See also


Last update: September 8, 2026
Created: September 3, 2026