{
  "$schema": "http://json-schema.org/schema#",
  "type": "object",
  "properties": {
    "jenkinsUser": {
      "type": "string",
      "title": "Username",
      "form": true
    },
    "jenkinsPassword": {
      "type": "string",
      "title": "Password",
      "form": true,
      "description": "Defaults to a random 10-character alphanumeric string if not set"
    },
    "persistence": {
      "type": "object",
      "title": "Persistence",
      "form": true,
      "properties": {
        "enabled": {
          "type": "boolean",
          "form": true,
          "title": "Enable persistence",
          "description": "Enable persistence using Persistent Volume Claims"
        },
        "size": {
          "type": "string",
          "title": "Persistent Volume Size",
          "form": true,
          "render": "slider",
          "sliderMin": 1,
          "sliderMax": 100,
          "sliderUnit": "Gi",
          "hidden": {
            "value": false,
            "path": "persistence/enabled"
          }
        }
      }
    },
    "resources": {
      "type": "object",
      "title": "Required Resources",
      "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"
            }
          }
        }
      }
    },
    "ingress": {
      "type": "object",
      "form": true,
      "title": "Ingress Configuration",
      "properties": {
        "enabled": {
          "type": "boolean",
          "form": true,
          "title": "Use a custom hostname",
          "description": "Enable the ingress resource that allows you to access the Jenkins installation."
        },
        "hostname": {
          "type": "string",
          "form": true,
          "title": "Hostname",
          "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\""
        }
      }
    },
    "metrics": {
      "type": "object",
      "form": true,
      "title": "Prometheus metrics details",
      "properties": {
        "enabled": {
          "type": "boolean",
          "title": "Create Prometheus metrics exporter",
          "description": "Create a side-car container to expose Prometheus metrics",
          "form": true
        }
      }
    }
  }
}
