{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Cluster", "type": "object", "properties": { "base": { "anyOf": [ { "$ref": "#/$defs/OptionalBase" }, { "type": "null" } ] }, "clusterEnv": { "anyOf": [ { "$ref": "#/$defs/ClusterEnv" }, { "type": "null" } ] }, "controlPlaneIp": { "type": [ "string", "null" ], "format": "ipv4" }, "default": { "$ref": "#/$defs/OptionalNodeDeserialize" }, "nodes": { "type": [ "array", "null" ], "items": { "type": "string" } }, "secretsFile": { "type": [ "string", "null" ] }, "version": { "anyOf": [ { "$ref": "#/$defs/OptionalVersion" }, { "type": "null" } ] } }, "additionalProperties": false, "$defs": { "ClusterEnv": { "type": "string", "enum": [ "production", "staging" ] }, "NodeArch": { "type": "string", "enum": [ "amd64" ] }, "NodeType": { "type": "string", "enum": [ "worker", "controlPlane" ] }, "OptionalBase": { "type": "object", "properties": { "kernelArgs": { "type": [ "array", "null" ], "default": null, "items": { "type": "string" } }, "patches": { "anyOf": [ { "$ref": "#/$defs/Patches" }, { "type": "null" } ], "default": null } }, "additionalProperties": false }, "OptionalInstall": { "type": "object", "properties": { "auto": { "type": [ "boolean", "null" ] }, "disk": { "type": [ "string", "null" ] }, "serial": { "type": [ "string", "null" ] } }, "additionalProperties": false }, "OptionalNetwork": { "type": "object", "properties": { "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" }, "tailscale": { "anyOf": [ { "$ref": "#/$defs/OptionalTailscale" }, { "type": "null" } ] } }, "additionalProperties": false }, "OptionalNodeDeserialize": { "type": "object", "properties": { "arch": { "anyOf": [ { "$ref": "#/$defs/NodeArch" }, { "type": "null" } ] }, "install": { "anyOf": [ { "$ref": "#/$defs/OptionalInstall" }, { "type": "null" } ] }, "kernelArgs": { "type": [ "array", "null" ], "items": { "type": "string" } }, "network": { "anyOf": [ { "$ref": "#/$defs/OptionalNetwork" }, { "type": "null" } ] }, "ntp": { "type": [ "string", "null" ] }, "patches": { "anyOf": [ { "$ref": "#/$defs/OptionalPatches" }, { "type": "null" } ] }, "schematic": { "anyOf": [ { "$ref": "#/$defs/Schematic" }, { "type": "null" } ] }, "sops": { "anyOf": [ { "$ref": "#/$defs/Secret" }, { "type": "null" } ] }, "type": { "anyOf": [ { "$ref": "#/$defs/NodeType" }, { "type": "null" } ] } }, "additionalProperties": false }, "OptionalPatches": { "type": "object", "properties": { "all": { "type": [ "array", "null" ], "items": { "type": "string" } }, "controlPlane": { "type": [ "array", "null" ], "items": { "type": "string" } } }, "additionalProperties": false }, "OptionalTailscale": { "type": "object", "properties": { "advertiseRoutes": { "type": "boolean", "default": false }, "authKey": { "anyOf": [ { "$ref": "#/$defs/Secret" }, { "type": "null" } ] }, "server": { "type": [ "string", "null" ], "default": null } }, "additionalProperties": false }, "OptionalVersion": { "type": "object", "properties": { "kubernetes": { "anyOf": [ { "$ref": "#/$defs/SemVer" }, { "type": "null" } ] }, "talos": { "anyOf": [ { "$ref": "#/$defs/SemVer" }, { "type": "null" } ] } }, "additionalProperties": false }, "Patches": { "type": "object", "properties": { "all": { "type": "array", "items": { "type": "string" } }, "controlPlane": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false, "required": [ "all", "controlPlane" ] }, "Schematic": { "type": "string" }, "Secret": { "$ref": "#/$defs/SecretHelper" }, "SecretHelper": { "anyOf": [ { "type": "string" }, { "type": "object", "properties": { "file": { "type": "string" } }, "required": [ "file" ] } ] }, "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-]+)*))?$" } } }