This commit is contained in:
2026-03-02 05:05:33 +01:00
parent 08c1d0c605
commit a066bfb17a
31 changed files with 1239 additions and 0 deletions

258
schemas/cluster.json Normal file
View File

@@ -0,0 +1,258 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Cluster",
"type": "object",
"properties": {
"base": {
"$ref": "#/$defs/Base"
},
"controlPlaneIp": {
"type": "string",
"format": "ipv4"
},
"default": {
"$ref": "#/$defs/OptionalNode"
},
"nodes": {
"type": "array",
"items": {
"type": "string"
}
},
"production": {
"type": "boolean"
},
"version": {
"$ref": "#/$defs/Version"
}
},
"additionalProperties": false,
"required": [
"version",
"nodes",
"production",
"controlPlaneIp",
"base"
],
"$defs": {
"Base": {
"type": "object",
"properties": {
"kernelArgs": {
"type": "array",
"default": [],
"items": {
"type": "string"
}
},
"patches": {
"$ref": "#/$defs/Patches"
}
},
"additionalProperties": false
},
"NodeArch": {
"type": "string",
"enum": [
"amd64"
]
},
"NodeType": {
"type": "string",
"enum": [
"worker",
"controlPlane"
]
},
"OptionalInstall": {
"type": "object",
"properties": {
"auto": {
"type": [
"boolean",
"null"
]
},
"disk": {
"type": [
"string",
"null"
]
},
"serial": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
},
"OptionalNetwork": {
"type": "object",
"properties": {
"advertiseRoutes": {
"type": [
"boolean",
"null"
]
},
"dns": {
"type": [
"array",
"null"
],
"items": {
"type": "string",
"format": "ipv4"
},
"maxItems": 2,
"minItems": 2
},
"gateway": {
"type": [
"string",
"null"
],
"format": "ipv4"
},
"interface": {
"type": [
"string",
"null"
]
},
"ip": {
"type": [
"string",
"null"
],
"format": "ipv4"
},
"netmask": {
"type": [
"string",
"null"
],
"format": "ipv4"
}
},
"additionalProperties": false
},
"OptionalNode": {
"type": "object",
"properties": {
"arch": {
"anyOf": [
{
"$ref": "#/$defs/NodeArch"
},
{
"type": "null"
}
]
},
"install": {
"$ref": "#/$defs/OptionalInstall"
},
"kernelArgs": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"network": {
"$ref": "#/$defs/OptionalNetwork"
},
"ntp": {
"type": [
"string",
"null"
]
},
"patches": {
"$ref": "#/$defs/OptionalPatches"
},
"type": {
"anyOf": [
{
"$ref": "#/$defs/NodeType"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"required": [
"network"
]
},
"OptionalPatches": {
"type": "object",
"properties": {
"all": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"controlPlane": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"Patches": {
"type": "object",
"properties": {
"all": {
"type": "array",
"items": {
"type": "string"
}
},
"controlPlane": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"all",
"controlPlane"
]
},
"Version": {
"type": "object",
"properties": {
"kubernetes": {
"type": "string"
},
"talos": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"kubernetes",
"talos"
]
}
}
}

169
schemas/node.json Normal file
View File

@@ -0,0 +1,169 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "OptionalNode",
"type": "object",
"properties": {
"arch": {
"anyOf": [
{
"$ref": "#/$defs/NodeArch"
},
{
"type": "null"
}
]
},
"install": {
"$ref": "#/$defs/OptionalInstall"
},
"kernelArgs": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"network": {
"$ref": "#/$defs/OptionalNetwork"
},
"ntp": {
"type": [
"string",
"null"
]
},
"patches": {
"$ref": "#/$defs/OptionalPatches"
},
"type": {
"anyOf": [
{
"$ref": "#/$defs/NodeType"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"required": [
"network"
],
"$defs": {
"NodeArch": {
"type": "string",
"enum": [
"amd64"
]
},
"NodeType": {
"type": "string",
"enum": [
"worker",
"controlPlane"
]
},
"OptionalInstall": {
"type": "object",
"properties": {
"auto": {
"type": [
"boolean",
"null"
]
},
"disk": {
"type": [
"string",
"null"
]
},
"serial": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
},
"OptionalNetwork": {
"type": "object",
"properties": {
"advertiseRoutes": {
"type": [
"boolean",
"null"
]
},
"dns": {
"type": [
"array",
"null"
],
"items": {
"type": "string",
"format": "ipv4"
},
"maxItems": 2,
"minItems": 2
},
"gateway": {
"type": [
"string",
"null"
],
"format": "ipv4"
},
"interface": {
"type": [
"string",
"null"
]
},
"ip": {
"type": [
"string",
"null"
],
"format": "ipv4"
},
"netmask": {
"type": [
"string",
"null"
],
"format": "ipv4"
}
},
"additionalProperties": false
},
"OptionalPatches": {
"type": "object",
"properties": {
"all": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"controlPlane": {
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
}
}