169 lines
4.7 KiB
JSON
169 lines
4.7 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "urn:ksp:schema:std.store:v1",
|
|
"title": "KSP standard Store configuration",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"format_version",
|
|
"default_profile",
|
|
"profiles"
|
|
],
|
|
"properties": {
|
|
"format_version": {
|
|
"const": 1
|
|
},
|
|
"default_profile": {
|
|
"$ref": "#/$defs/profileId"
|
|
},
|
|
"profiles": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {
|
|
"$ref": "#/$defs/profile"
|
|
}
|
|
}
|
|
},
|
|
"$defs": {
|
|
"profileId": {
|
|
"type": "string",
|
|
"pattern": "^[a-z0-9][a-z0-9._-]*$"
|
|
},
|
|
"networkId": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 128,
|
|
"pattern": "^[A-Za-z0-9_.:-]+$"
|
|
},
|
|
"duration100To60000": {
|
|
"type": "integer",
|
|
"minimum": 100,
|
|
"maximum": 60000
|
|
},
|
|
"profile": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"profile_id",
|
|
"network",
|
|
"backend",
|
|
"postgres"
|
|
],
|
|
"properties": {
|
|
"profile_id": {
|
|
"$ref": "#/$defs/profileId"
|
|
},
|
|
"network": {
|
|
"$ref": "#/$defs/networkId"
|
|
},
|
|
"backend": {
|
|
"const": "postgres"
|
|
},
|
|
"postgres": {
|
|
"$ref": "#/$defs/postgres"
|
|
}
|
|
}
|
|
},
|
|
"postgres": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"connection_uri",
|
|
"pool",
|
|
"tls",
|
|
"bootstrap",
|
|
"shutdown_timeout_ms"
|
|
],
|
|
"properties": {
|
|
"connection_uri": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"pool": {
|
|
"$ref": "#/$defs/pool"
|
|
},
|
|
"tls": {
|
|
"$ref": "#/$defs/tls"
|
|
},
|
|
"bootstrap": {
|
|
"$ref": "#/$defs/bootstrap"
|
|
},
|
|
"shutdown_timeout_ms": {
|
|
"type": "integer",
|
|
"minimum": 100,
|
|
"maximum": 30000
|
|
}
|
|
}
|
|
},
|
|
"pool": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"max_connections",
|
|
"connect_timeout_ms",
|
|
"wait_timeout_ms",
|
|
"create_timeout_ms",
|
|
"recycle_timeout_ms"
|
|
],
|
|
"properties": {
|
|
"max_connections": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 64
|
|
},
|
|
"connect_timeout_ms": {
|
|
"$ref": "#/$defs/duration100To60000"
|
|
},
|
|
"wait_timeout_ms": {
|
|
"$ref": "#/$defs/duration100To60000"
|
|
},
|
|
"create_timeout_ms": {
|
|
"$ref": "#/$defs/duration100To60000"
|
|
},
|
|
"recycle_timeout_ms": {
|
|
"$ref": "#/$defs/duration100To60000"
|
|
}
|
|
}
|
|
},
|
|
"tls": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"mode"
|
|
],
|
|
"properties": {
|
|
"mode": {
|
|
"enum": [
|
|
"disabled",
|
|
"verify_full"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"bootstrap": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"auto_migrate",
|
|
"migration_timeout_ms",
|
|
"migration_lock_timeout_ms"
|
|
],
|
|
"properties": {
|
|
"auto_migrate": {
|
|
"type": "boolean"
|
|
},
|
|
"migration_timeout_ms": {
|
|
"type": "integer",
|
|
"minimum": 1000,
|
|
"maximum": 300000
|
|
},
|
|
"migration_lock_timeout_ms": {
|
|
"type": "integer",
|
|
"minimum": 100,
|
|
"maximum": 120000
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|