{
    "properties": {
        "cluster": {
            "form": true,
            "properties": {
                "enabled": {
                    "description": "Enable master-slave architecture",
                    "form": true,
                    "title": "Enable master-slave",
                    "type": "boolean"
                },
                "slaveCount": {
                    "form": true,
                    "hidden": {
                        "condition": false,
                        "value": "cluster.enabled"
                    },
                    "title": "Slave Replicas",
                    "type": "integer"
                }
            },
            "title": "Cluster Settings",
            "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"
                        },
                        "matchExpressions": {
                            "title": "Persistent Match Expressions Selector",
                            "type": "object"
                        },
                        "matchLabels": {
                            "title": "Persistent Match Labels Selector",
                            "type": "object"
                        },
                        "size": {
                            "form": true,
                            "hidden": {
                                "condition": false,
                                "value": "master.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"
        },
        "password": {
            "description": "Defaults to a random 10-character alphanumeric string if not set",
            "form": true,
            "hidden": {
                "condition": false,
                "value": "usePassword"
            },
            "title": "Password",
            "type": "string"
        },
        "slave": {
            "form": true,
            "hidden": {
                "condition": false,
                "value": "cluster.enabled"
            },
            "properties": {
                "persistence": {
                    "form": true,
                    "properties": {
                        "enabled": {
                            "description": "Enable persistence using Persistent Volume Claims",
                            "form": true,
                            "title": "Enable persistence",
                            "type": "boolean"
                        },
                        "matchExpressions": {
                            "title": "Persistent Match Expressions Selector",
                            "type": "object"
                        },
                        "matchLabels": {
                            "title": "Persistent Match Labels Selector",
                            "type": "object"
                        },
                        "size": {
                            "form": true,
                            "hidden": {
                                "condition": false,
                                "value": "slave.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"
        },
        "usePassword": {
            "form": true,
            "title": "Use password authentication",
            "type": "boolean"
        },
        "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"
}