Last active
February 13, 2025 20:24
-
-
Save andsens/ba30e37c3648461cc772439a4c6ed9fb to your computer and use it in GitHub Desktop.
Phoenix cluster config schemas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"$schema": { | |
"type": "string" | |
}, | |
"domain": { | |
"description": "The domain of the cluster", | |
"type": "string", | |
"format": "hostname" | |
}, | |
"admin": { | |
"description": "Configuration of the admin user", | |
"type": "object", | |
"properties": { | |
"ssh-keys": { | |
"type": "array", | |
"description": "List of admin SSH keys. Used for SSH login, Kubernetes authentication, and config signature verification", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"pwhash": { | |
"description": "hashed password for the admin user (and root in debug mode). Generate with `mkpasswd`.", | |
"type": "string" | |
} | |
}, | |
"required": ["ssh-keys"], | |
"additionalProperties": false | |
}, | |
"cidrs": { | |
"type": "object", | |
"description": "CIDRs specifying the subnets the cluster should allocate for pods, services and loadbalancers", | |
"properties": { | |
"pod": { | |
"description": "The subnet all pods will have an IP assigned from", | |
"type": "object", | |
"properties": { | |
"ipv4": { | |
"$ref": "#/definitions/ipv4-cidr" | |
}, | |
"ipv6": { | |
"$ref": "#/definitions/ipv6-cidr" | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"svc": { | |
"description": "The subnet all services will have an IP assigned from", | |
"type": "object", | |
"properties": { | |
"ipv4": { | |
"$ref": "#/definitions/ipv4-cidr" | |
}, | |
"ipv6": { | |
"$ref": "#/definitions/ipv6-cidr" | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"lb": { | |
"description": "The subnet all loadbalancer services will have an IP assigned from", | |
"type": "object", | |
"properties": { | |
"ipv4": { | |
"$ref": "#/definitions/ipv4-cidr" | |
}, | |
"ipv6": { | |
"$ref": "#/definitions/ipv6-cidr" | |
} | |
}, | |
"additionalProperties": false | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"bgp": { | |
"description": "BGP configuration for cilium to advertise routes for your router", | |
"type": "object", | |
"properties": { | |
"router": { | |
"description": "Router addresses", | |
"type": "object", | |
"properties": { | |
"ipv4": { | |
"$ref": "#/definitions/ipv4" | |
}, | |
"ipv6": { | |
"$ref": "#/definitions/ipv6" | |
} | |
}, | |
"additionalProperties": false | |
} | |
}, | |
"required": ["router"], | |
"additionalProperties": false | |
} | |
}, | |
"required": ["admin"], | |
"additionalProperties": false, | |
"definitions": { | |
"ipv4": { | |
"description": "An IPv4 Address", | |
"type": "string", | |
"pattern": "^[0-9.]+" | |
}, | |
"ipv6": { | |
"description": "An IPv6 Address", | |
"type": "string", | |
"pattern": "^[0-9a-f:]+" | |
}, | |
"ipv4-cidr": { | |
"description": "An IPv4 CIDR", | |
"type": "string", | |
"pattern": "^[0-9.]+/[0-9]+$" | |
}, | |
"ipv6-cidr": { | |
"description": "An IPv6 CIDR", | |
"type": "string", | |
"pattern": "^[0-9a-f:]+/[0-9]+$" | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"$schema": { | |
"type": "string" | |
}, | |
"k3s": { | |
"anyOf": [ | |
{ | |
"type": "object", | |
"properties": { | |
"mode": { | |
"description": "Whether to run k3s as an agent or a server. Default: server", | |
"type": "string", | |
"const": "server" | |
} | |
} | |
}, | |
{ | |
"type": "object", | |
"properties": { | |
"mode": { | |
"description": "Whether to run k3s as an agent or a server. Default: server", | |
"type": "string", | |
"enum": [ | |
"agent", | |
"server" | |
] | |
}, | |
"server": { | |
"description": "The hostname of a control-plane node for k3s to connect to.", | |
"type": "string", | |
"format": "hostname" | |
}, | |
"token": { | |
"description": "The k3s joining token generated with `k3s token create`. May not be a server token.", | |
"type": "string", | |
"pattern": "^K10[0-9a-f]+::(?!server).*" | |
} | |
}, | |
"required": [ | |
"mode", | |
"server", | |
"token" | |
], | |
"additionalProperties": false | |
} | |
] | |
}, | |
"hostname": { | |
"description": "Hostname of the node", | |
"type": "string", | |
"format": "hostname" | |
}, | |
"fixed-ips": { | |
"description": "Per MAC-address fixed IP network configuration", | |
"patternProperties": { | |
"([0-9a-f]{2}:){5}[0-9a-f]{2}": { | |
"type": "array", | |
"items": { | |
"anyOf": [ | |
{ | |
"type": "string", | |
"format": "ipv4" | |
}, | |
{ | |
"type": "string", | |
"format": "ipv6" | |
} | |
] | |
} | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"labels": { | |
"description": "List of labels to apply to the node", | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"additionalProperties": false, | |
"definitions": { | |
"ipv4-cidr": { | |
"type": "string", | |
"pattern": "^[0-9.]+/[0-9]+$" | |
}, | |
"ipv6-cidr": { | |
"type": "string", | |
"pattern": "^[0-9a-f:]+/[0-9]+$" | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"description": "Configures how the disk encryption key should be derived from he Raspberry Pi OTP", | |
"properties": { | |
"$schema": { | |
"type": "string" | |
}, | |
"offset": { | |
"description": "OTP offset in words (4 bytes). Default 0", | |
"type": "integer" | |
}, | |
"key-derivation-suffix": { | |
"description": "Suffix to add to the disk encryption key derivation label. Default: 1", | |
"type": "string" | |
} | |
}, | |
"additionalProperties": false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment