{
    "properties": {
        "db": {
            "properties": {
                "name": {
                    "description": "Name of the custom database to be created during the 1st initialization of MariaDB",
                    "form": true,
                    "title": "MariaDB custom database",
                    "type": "string"
                },
                "password": {
                    "description": "Defaults to a random 10-character alphanumeric string if not set",
                    "form": true,
                    "hidden": {
                        "condition": false,
                        "value": "usePassword"
                    },
                    "title": "Password for MariaDB custom user",
                    "type": "string"
                },
                "user": {
                    "description": "Name of the custom user to be created during the 1st initialization of MariaDB. This user only has permissions on the MariaDB custom database",
                    "form": true,
                    "title": "MariaDB custom user",
                    "type": "string"
                }
            },
            "type": "object"
        },
        "master": {
            "form": true,
            "properties": {
                "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 for master replicas",
                    "type": "object"
                }
            },
            "title": "Master replicas settings",
            "type": "object"
        },
        "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"
        },
        "replication": {
            "form": true,
            "properties": {
                "enabled": {
                    "form": true,
                    "title": "Enable replication configuration",
                    "type": "boolean"
                }
            },
            "title": "Replication configuration",
            "type": "object"
        },
        "rootUser": {
            "properties": {
                "password": {
                    "description": "Defaults to a random 10-character alphanumeric string if not set",
                    "form": true,
                    "hidden": {
                        "condition": false,
                        "value": "usePassword"
                    },
                    "title": "MariaDB admin password",
                    "type": "string"
                }
            },
            "type": "object"
        },
        "slave": {
            "form": true,
            "hidden": {
                "condition": false,
                "value": "replication.enabled"
            },
            "properties": {
                "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 for slave replicas",
                    "type": "object"
                }
            },
            "title": "Slave replicas settings",
            "type": "object"
        },
        "volumePermissions": {
            "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"
}