{
    "properties": {
        "metrics": {
            "form": true,
            "properties": {
                "enabled": {
                    "description": "Create a side-car container to expose Prometheus metrics",
                    "form": true,
                    "title": "Create Prometheus metrics exporter",
                    "type": "boolean"
                },
                "serviceMonitor": {
                    "properties": {
                        "enabled": {
                            "description": "Create a ServiceMonitor to track metrics using Prometheus Operator",
                            "form": true,
                            "hidden": {
                                "condition": false,
                                "value": "metrics.enabled"
                            },
                            "title": "Create Prometheus Operator ServiceMonitor",
                            "type": "boolean"
                        }
                    },
                    "type": "object"
                }
            },
            "title": "Prometheus metrics details",
            "type": "object"
        },
        "mongodbDatabase": {
            "description": "Name of the custom database to be created during the 1st initialization of MongoDB",
            "form": true,
            "title": "MongoDB custom database",
            "type": "string"
        },
        "mongodbPassword": {
            "description": "Defaults to a random 10-character alphanumeric string if not set",
            "form": true,
            "hidden": {
                "condition": false,
                "value": "usePassword"
            },
            "title": "Password for MongoDB custom user",
            "type": "string"
        },
        "mongodbRootPassword": {
            "description": "Defaults to a random 10-character alphanumeric string if not set",
            "form": true,
            "hidden": {
                "condition": false,
                "value": "usePassword"
            },
            "title": "MongoDB admin password",
            "type": "string"
        },
        "mongodbUsername": {
            "description": "Name of the custom user to be created during the 1st initialization of MongoDB. This user only has permissions on the MongoDB custom database",
            "form": true,
            "title": "MongoDB custom user",
            "type": "string"
        },
        "persistence": {
            "form": true,
            "properties": {
                "enabled": {
                    "description": "Enable persistence using Persistent Volume Claims",
                    "form": true,
                    "title": "Enable persistence",
                    "type": "boolean"
                },
                "size": {
                    "form": true,
                    "hidden": {
                        "condition": false,
                        "value": "persistence.enabled"
                    },
                    "render": "slider",
                    "sliderMax": 100,
                    "sliderMin": 1,
                    "sliderUnit": "Gi",
                    "title": "Persistent Volume Size",
                    "type": "string"
                }
            },
            "title": "Persistence configuration",
            "type": "object"
        },
        "replicaSet": {
            "form": true,
            "properties": {
                "enabled": {
                    "form": true,
                    "title": "Enable replicaset configuration",
                    "type": "boolean"
                },
                "replicas": {
                    "form": true,
                    "hidden": {
                        "condition": false,
                        "value": "replicaSet.enabled"
                    },
                    "properties": {
                        "arbiter": {
                            "description": "Number of arbiter node replicas to deploy",
                            "form": true,
                            "title": "Arbiter node replicas",
                            "type": "integer"
                        },
                        "secondary": {
                            "description": "Number of secondary node replicas to deploy",
                            "form": true,
                            "title": "Secondary node replicas",
                            "type": "integer"
                        }
                    },
                    "title": "Number of replicas",
                    "type": "object"
                }
            },
            "title": "Replicaset configuration",
            "type": "object"
        },
        "usePassword": {
            "form": true,
            "title": "Enable password authentication",
            "type": "boolean"
        },
        "volumePermissions": {
            "hidden": {
                "condition": false,
                "value": "persistence.enabled"
            },
            "properties": {
                "enabled": {
                    "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination",
                    "form": true,
                    "title": "Enable Init Containers",
                    "type": "boolean"
                }
            },
            "type": "object"
        }
    },
    "type": "object"
}