{ "$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" ] }, "SemVer": { "type": "string", "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" }, "Version": { "type": "object", "properties": { "kubernetes": { "$ref": "#/$defs/SemVer" }, "talos": { "$ref": "#/$defs/SemVer" } }, "additionalProperties": false, "required": [ "kubernetes", "talos" ] } } }