206 lines
4.4 KiB
JSON
206 lines
4.4 KiB
JSON
{
|
|
"$schema":"http://json-schema.org/draft-07/schema",
|
|
"type":"object",
|
|
"title":"The root schema",
|
|
"description":"The root schema comprises the entire JSON document.",
|
|
"required":[
|
|
"EULA",
|
|
"username",
|
|
"password",
|
|
"version",
|
|
"provider",
|
|
"ha",
|
|
"wipedata",
|
|
"registry",
|
|
"optional"
|
|
],
|
|
"properties":{
|
|
"provider":{
|
|
"$id":"#/properties/provider",
|
|
"enum": ["dkube", "gke", "okd", "eks", "ntnx", "tanzu"]
|
|
},
|
|
"username":{
|
|
"$id":"#/properties/username",
|
|
"type":"string",
|
|
"minLength":1
|
|
},
|
|
"password":{
|
|
"$id":"#/properties/password",
|
|
"type":"string",
|
|
"minLength":1
|
|
},
|
|
"EULA":{
|
|
"$id":"#/properties/EULA",
|
|
"type":"string",
|
|
"enum": ["yes"]
|
|
},
|
|
"ha":{
|
|
"$id":"#/properties/ha",
|
|
"type":"boolean"
|
|
},
|
|
"wipedata":{
|
|
"$id":"#/properties/wipedata",
|
|
"type":"string",
|
|
"enum": ["yes", "no"]
|
|
},
|
|
"registry":{
|
|
"$id":"#/properties/registry",
|
|
"type":"object",
|
|
"required": [
|
|
"name",
|
|
"username",
|
|
"password"
|
|
],
|
|
"properties":{
|
|
"name":{
|
|
"$id":"#/properties/registry/properties/name",
|
|
"type":"string",
|
|
"minLength":1
|
|
},
|
|
"username":{
|
|
"$id":"#/properties/registry/properties/username",
|
|
"type":"string",
|
|
"minLength":1
|
|
},
|
|
"password":{
|
|
"$id":"#/properties/registry/properties/password",
|
|
"type":"string",
|
|
"minLength":1
|
|
}
|
|
}
|
|
},
|
|
"optional":{
|
|
"$id":"#/properties/optional",
|
|
"type":"object",
|
|
"required": [
|
|
"storage"
|
|
],
|
|
"properties":{
|
|
"storage":{
|
|
"$id":"#/properties/optional/properties/storage",
|
|
"type":"object",
|
|
"properties": {
|
|
"type": {
|
|
"enum": ["disk", "pv", "sc", "nfs", "ceph"]
|
|
}
|
|
},
|
|
"allOf":[
|
|
{
|
|
"if": {
|
|
"properties": {"type": {"const": "disk"}}
|
|
},
|
|
"then": {
|
|
"$ref": "#/properties/optional/definitions/disk"
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {"type": {"const": "pv"}}
|
|
},
|
|
"then": {
|
|
"$ref": "#/properties/optional/definitions/pv"
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {"type": {"const": "sc"}}
|
|
},
|
|
"then": {
|
|
"$ref": "#/properties/optional/definitions/sc"
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {"type": {"const": "nfs"}}
|
|
},
|
|
"then": {
|
|
"$ref": "#/properties/optional/definitions/nfs"
|
|
}
|
|
},
|
|
{
|
|
"if": {
|
|
"properties": {"type": {"const": "ceph"}}
|
|
},
|
|
"then": {
|
|
"$ref": "#/properties/optional/definitions/ceph"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"definitions":{
|
|
"disk":{
|
|
"properties":{
|
|
"path":{
|
|
"type":"string",
|
|
"pattern":"^(/[^/ ]*)+/?$"
|
|
},
|
|
"node":{
|
|
"type":"string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required":[
|
|
"path",
|
|
"node"
|
|
]
|
|
},
|
|
"pv":{
|
|
"properties":{
|
|
"persistentVolume":{
|
|
"type":"string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required":[
|
|
"persistentVolume"
|
|
]
|
|
},
|
|
"sc":{
|
|
"properties":{
|
|
"storageClass":{
|
|
"type":"string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required":[
|
|
"storageClass"
|
|
]
|
|
},
|
|
"nfs":{
|
|
"properties":{
|
|
"nfsPath":{
|
|
"type":"string",
|
|
"pattern":"^(/[^/ ]*)+/?$"
|
|
},
|
|
"nfsServer":{
|
|
"type":"string",
|
|
"minLength": 1
|
|
}
|
|
},
|
|
"required":[
|
|
"nfsPath",
|
|
"nfsServer"
|
|
]
|
|
},
|
|
"ceph":{
|
|
"properties":{
|
|
"cephMonitors":{
|
|
"type":"string"
|
|
},
|
|
"cephSecret":{
|
|
"type":"string"
|
|
},
|
|
"cephFilesystem":{
|
|
"type":"string"
|
|
},
|
|
"cephNamespace":{
|
|
"type":"string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|