{
  "$schema": "http://json-schema.org/schema#",
  "type": "object",
  "properties": {
    "wordpress": {
      "wordpressUsername": {
        "type": "string",
        "title": "Username",
        "form": true
      },
      "wordpressPassword": {
        "type": "string",
        "title": "Password",
        "form": true,
        "description": "Defaults to a random 10-character alphanumeric string if not set"
      },
      "wordpressEmail": {
        "type": "string",
        "title": "Admin email",
        "form": true
      },
      "wordpressBlogName": {
        "type": "string",
        "title": "Blog Name",
        "form": true
      },
      "persistence": {
        "type": "object",
        "properties": {
          "size": {
            "type": "string",
            "title": "Persistent Volume Size",
            "form": true,
            "render": "slider",
            "sliderMin": 1,
            "sliderMax": 100,
            "sliderUnit": "Gi"
          }
        }
      }
    },
    "mariadb": {
      "type": "object",
      "title": "MariaDB Details",
      "form": true,
      "properties": {
        "enabled": {
          "type": "boolean",
          "title": "Use a new MariaDB database hosted in the cluster",
          "form": true,
          "description": "Whether to deploy a mariadb server to satisfy the applications database requirements. To use an external database switch this off and configure the external database details"
        },
        "primary": {
          "type": "object",
          "properties": {
            "persistence": {
              "type": "object",
              "properties": {
                "size": {
                  "type": "string",
                  "title": "Volume Size",
                  "form": true,
                  "render": "slider",
                  "sliderMin": 1,
                  "sliderMax": 100,
                  "sliderUnit": "Gi"
                }
              }
            }
          }
        }
      }
    },
    "ingress": {
      "type": "object",
      "form": true,
      "title": "Ingress Configuration",
      "properties": {
        "enabled": {
          "description": "Enable Ingress",
          "type": "boolean",
          "default": true,
          "x-onyxia": {
            "hidden": true,
            "overwriteDefaultWith": "k8s.ingress"
          }
        },
        "hostname": {
          "type": "string",
          "form": true,
          "title": "Hostname",
          "x-onyxia": {
            "hidden": true,
            "overwriteDefaultWith": "{{project.id}}-{{k8s.randomSubdomain}}-0.{{k8s.domain}}"
          }
        }
      },
      "tls": {
        "type": "boolean",
        "form": true,
        "title": "Create a TLS secret",
        "hidden": {
          "value": false,
          "path": "ingress/enabled"
        }
      }
    }
  },
  "service": {
    "type": "object",
    "form": true,
    "title": "Service Configuration",
    "properties": {
      "type": {
        "type": "string",
        "form": true,
        "title": "Service Type",
        "description": "Allowed values: \"ClusterIP\", \"NodePort\" and \"LoadBalancer\""
      }
    }
  },
  "resources": {
    "type": "object",
    "title": "Required Resources",
    "description": "Configure resource requests",
    "form": true,
    "properties": {
      "requests": {
        "type": "object",
        "properties": {
          "memory": {
            "type": "string",
            "form": true,
            "render": "slider",
            "title": "Memory Request",
            "sliderMin": 10,
            "sliderMax": 2048,
            "sliderUnit": "Mi"
          },
          "cpu": {
            "type": "string",
            "form": true,
            "render": "slider",
            "title": "CPU Request",
            "sliderMin": 10,
            "sliderMax": 2000,
            "sliderUnit": "m"
          }
        }
      }
    }
  },
  "volumePermissions": {
    "type": "object",
    "properties": {
      "enabled": {
        "type": "boolean",
        "form": true,
        "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"
      }
    }
  },
  "metrics": {
    "type": "object",
    "properties": {
      "enabled": {
        "type": "boolean",
        "title": "Enable Metrics",
        "description": "Prometheus Exporter / Metrics",
        "form": true
      }
    }
  }
}