{
  "$schema": "http://json-schema.org/schema#",
  "type": "object",
  "properties": {
    "mariadb": {
      "description": "mariadb specific configuration",
      "type": "object",
      "properties": {
        "auth": {
          "type": "object",
          "title": "Authentication configuration",
          "form": true,
          "properties": {
            "rootPassword": {
              "type": "string",
              "title": "MariaDB root password",
              "form": true,
              "description": "Defaults to a random 10-character alphanumeric string if not set",
              "default": "changeme",
              "x-form": {
                "value": "{{project.password}}"
              },
              "x-onyxia": {
                "overwriteDefaultWith": "{{project.password}}"
              }
            },
            "database": {
              "type": "string",
              "title": "MariaDB custom database",
              "description": "Name of the custom database to be created during the 1st initialization of MariaDB",
              "default": "defaultdb"
            },
            "username": {
              "type": "string",
              "title": "MariaDB custom 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",
              "default": "admin",
              "x-form": {
                "value": "{{project.id}}"
              },
              "x-onyxia": {
                "overwriteDefaultWith": "{{project.id}}"
              }
            },
            "password": {
              "type": "string",
              "title": "Password for MariaDB custom user",
              "description": "Defaults to a random 10-character alphanumeric string if not set",
              "default": "changeme",
              "x-form": {
                "value": "{{project.password}}"
              },
              "x-onyxia": {
                "overwriteDefaultWith": "{{project.password}}"
              }
            }
          }
        },
        "primary": {
          "type": "object",
          "title": "Primary settings",
          "form": true,
          "properties": {
            "persistence": {
              "type": "object",
              "title": "Persistence for primary",
              "form": true,
              "properties": {
                "enabled": {
                  "type": "boolean",
                  "default": true,
                  "form": true,
                  "title": "Enable persistence",
                  "description": "Enable persistence using Persistent Volume Claims"
                },
                "size": {
                  "type": "string",
                  "title": "Persistent Volume Size",
                  "description": "Size of the persistent volume",
                  "default": "10Gi",
                  "form": true,
                  "render": "slider",
                  "sliderMin": 1,
                  "sliderMax": 100,
                  "sliderUnit": "Gi",
                  "hidden": {
                    "value": false,
                    "path": "mariadb/primary/persistence/enabled"
                  }
                }
              }
            }
          }
        },
        "volumePermissions": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean",
              "form": true,
              "default": false,
              "title": "Enable Init Containers",
              "description": "Use an init container to set required folder permissions on the data volume before mounting it in the final destination"
            }
          }
        }
      }
    }
  }
}