{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Resources", "oneOf": [ { "type": "object", "properties": { "app": { "$ref": "#/$defs/AppV1" } }, "required": [ "app" ], "additionalProperties": false }, { "type": "object", "properties": { "app.v1": { "$ref": "#/$defs/AppV1" } }, "required": [ "app.v1" ], "additionalProperties": false }, { "type": "object", "properties": { "machine": { "$ref": "#/$defs/MachineV1" } }, "required": [ "machine" ], "additionalProperties": false }, { "type": "object", "properties": { "machine.v1": { "$ref": "#/$defs/MachineV1" } }, "required": [ "machine.v1" ], "additionalProperties": false }, { "type": "object", "properties": { "service": { "$ref": "#/$defs/ServiceV1" } }, "required": [ "service" ], "additionalProperties": false }, { "type": "object", "properties": { "service.v1": { "$ref": "#/$defs/ServiceV1" } }, "required": [ "service.v1" ], "additionalProperties": false }, { "type": "object", "properties": { "certificate": { "$ref": "#/$defs/CertificateV1" } }, "required": [ "certificate" ], "additionalProperties": false }, { "type": "object", "properties": { "certificate.v1": { "$ref": "#/$defs/CertificateV1" } }, "required": [ "certificate.v1" ], "additionalProperties": false }, { "type": "object", "properties": { "volume": { "$ref": "#/$defs/VolumeV1" } }, "required": [ "volume" ], "additionalProperties": false }, { "type": "object", "properties": { "volume.v1": { "$ref": "#/$defs/VolumeV1" } }, "required": [ "volume.v1" ], "additionalProperties": false } ], "$defs": { "AppAllocatedService": { "properties": { "domain": { "type": [ "string", "null" ] }, "hash": { "anyOf": [ { "format": "uint64", "minimum": 0, "type": "integer" }, { "$ref": "#/$defs/expr" } ] }, "name": { "type": "string" } }, "required": [ "name", "hash" ], "type": "object" }, "AppExpose": { "properties": { "connection-tracking": { "anyOf": [ { "$ref": "#/$defs/ServiceTargetConnectionTracking" }, { "type": "null" } ] }, "external": { "anyOf": [ { "$ref": "#/$defs/AppExposeExternal" }, { "type": "null" } ] }, "internal": { "anyOf": [ { "$ref": "#/$defs/AppExposeInternal" }, { "type": "null" } ] }, "port": { "anyOf": [ { "format": "uint16", "maximum": 65535, "minimum": 0, "type": "integer" }, { "$ref": "#/$defs/expr" } ] } }, "required": [ "port" ], "type": "object" }, "AppExposeExternal": { "properties": { "host": { "type": [ "string", "null" ] }, "port": { "anyOf": [ { "format": "uint16", "maximum": 65535, "minimum": 0, "type": [ "integer", "null" ] }, { "$ref": "#/$defs/expr" } ] }, "protocol": { "$ref": "#/$defs/ServiceBindExternalProtocol" } }, "required": [ "protocol" ], "type": "object" }, "AppExposeInternal": { "properties": { "port": { "anyOf": [ { "format": "uint16", "maximum": 65535, "minimum": 0, "type": [ "integer", "null" ] }, { "$ref": "#/$defs/expr" } ] } }, "type": "object" }, "AppV1": { "properties": { "build": { "anyOf": [ { "$ref": "#/$defs/MachineBuild" }, { "type": "null" } ] }, "command": { "items": { "type": "string" }, "type": [ "array", "null" ] }, "depends-on": { "items": { "$ref": "#/$defs/MachineDependency" }, "type": [ "array", "null" ] }, "environment": { "additionalProperties": { "type": "string" }, "type": [ "object", "null" ] }, "expose": { "additionalProperties": { "$ref": "#/$defs/AppExpose" }, "type": [ "object", "null" ] }, "image": { "type": [ "string", "null" ] }, "mode": { "anyOf": [ { "$ref": "#/$defs/MachineMode" }, { "type": "null" } ] }, "name": { "type": "string" }, "namespace": { "type": [ "string", "null" ] }, "resources": { "$ref": "#/$defs/MachineResources" }, "restart-policy": { "anyOf": [ { "$ref": "#/$defs/MachineRestartPolicy" }, { "type": "null" } ] }, "tags": { "items": { "type": "string" }, "type": [ "array", "null" ] }, "volumes": { "items": { "$ref": "#/$defs/MachineVolumeBinding" }, "type": [ "array", "null" ] } }, "required": [ "name", "resources" ], "type": "object" }, "CertificateIssuer": { "oneOf": [ { "additionalProperties": false, "properties": { "auto": { "properties": { "email": { "description": "Optional email override. If specified, takes precedence over provider's default-email.\nIf not specified, falls back to provider's default-email from config.\nValidation should error if neither this nor provider config has an email.", "type": [ "string", "null" ] }, "provider": { "description": "References a provider name from ignition.toml [[cert-provider]] config", "type": "string" }, "renewal": { "anyOf": [ { "$ref": "#/$defs/CertificateRenewalConfig" }, { "type": "null" } ], "description": "Optional renewal configuration. Uses sensible defaults if not specified." } }, "required": [ "provider" ], "type": "object" } }, "required": [ "auto" ], "type": "object" }, { "additionalProperties": false, "properties": { "manual": { "properties": { "ca-path": { "type": [ "string", "null" ] }, "cert-path": { "type": "string" }, "key-path": { "type": "string" } }, "required": [ "cert-path", "key-path" ], "type": "object" } }, "required": [ "manual" ], "type": "object" } ] }, "CertificateRenewalConfig": { "properties": { "days-before-expiry": { "anyOf": [ { "description": "Days before expiry to start renewal attempts. Default: 30 days.", "format": "uint32", "minimum": 0, "type": [ "integer", "null" ] }, { "$ref": "#/$defs/expr" } ] }, "retry-interval-hours": { "anyOf": [ { "description": "Hours between renewal retry attempts on failure. Default: 12 hours.", "format": "uint32", "minimum": 0, "type": [ "integer", "null" ] }, { "$ref": "#/$defs/expr" } ] } }, "type": "object" }, "CertificateState": { "oneOf": [ { "enum": [ "pending", "pending-acme-account", "pending-dns-resolution", "ready", "renewing", "failed", "expired", "revoked" ], "type": "string" }, { "additionalProperties": false, "properties": { "pending-order": { "type": [ "string", "null" ] } }, "required": [ "pending-order" ], "type": "object" }, { "additionalProperties": false, "properties": { "pending-challenge": { "type": "string" } }, "required": [ "pending-challenge" ], "type": "object" }, { "additionalProperties": false, "properties": { "validating": { "type": "string" } }, "required": [ "validating" ], "type": "object" }, { "additionalProperties": false, "properties": { "issuing": { "type": "string" } }, "required": [ "issuing" ], "type": "object" } ] }, "CertificateV1": { "properties": { "domains": { "items": { "type": "string" }, "type": "array" }, "issuer": { "$ref": "#/$defs/CertificateIssuer" }, "name": { "type": "string" }, "namespace": { "type": [ "string", "null" ] }, "tags": { "items": { "type": "string" }, "type": [ "array", "null" ] } }, "required": [ "name", "domains", "issuer" ], "type": "object" }, "MachineBuild": { "oneOf": [ { "enum": [ "auto" ], "type": "string" }, { "additionalProperties": false, "properties": { "options": { "$ref": "#/$defs/MachineBuildOptions" } }, "required": [ "options" ], "type": "object" }, { "additionalProperties": false, "properties": { "docker": { "$ref": "#/$defs/MachineDockerOptions" } }, "required": [ "docker" ], "type": "object" } ] }, "MachineBuildOptions": { "properties": { "build-image": { "type": [ "string", "null" ] }, "dir": { "type": [ "string", "null" ] }, "envs": { "additionalProperties": { "type": "string" }, "type": [ "object", "null" ] }, "image": { "type": [ "string", "null" ] }, "name": { "type": [ "string", "null" ] }, "phases": { "additionalProperties": { "$ref": "#/$defs/MachineBuildPlanPhase" }, "type": [ "object", "null" ] }, "providers": { "items": { "type": "string" }, "type": [ "array", "null" ] }, "start": { "anyOf": [ { "$ref": "#/$defs/MachineBuildPlanStartPhase" }, { "type": "null" } ] }, "static-assets": { "additionalProperties": { "type": "string" }, "type": [ "object", "null" ] }, "tag": { "type": [ "string", "null" ] }, "variables": { "additionalProperties": { "type": "string" }, "type": [ "object", "null" ] } }, "type": "object" }, "MachineBuildPlanPhase": { "properties": { "apt-pkgs": { "items": { "type": "string" }, "type": [ "array", "null" ] }, "cache-directories": { "items": { "type": "string" }, "type": [ "array", "null" ] }, "cmds": { "items": { "type": "string" }, "type": [ "array", "null" ] }, "depends-on": { "items": { "type": "string" }, "type": [ "array", "null" ] }, "name": { "type": [ "string", "null" ] }, "nix-libs": { "items": { "type": "string" }, "type": [ "array", "null" ] }, "nix-overlays": { "items": { "type": "string" }, "type": [ "array", "null" ] }, "nix-pkgs": { "items": { "type": "string" }, "type": [ "array", "null" ] }, "nixpkgs-archive": { "type": [ "string", "null" ] }, "only-include-files": { "items": { "type": "string" }, "type": [ "array", "null" ] }, "paths": { "items": { "type": "string" }, "type": [ "array", "null" ] } }, "type": "object" }, "MachineBuildPlanStartPhase": { "properties": { "cmd": { "type": [ "string", "null" ] }, "only-include-files": { "items": { "type": "string" }, "type": [ "array", "null" ] }, "run-image": { "type": [ "string", "null" ] }, "user": { "type": [ "string", "null" ] } }, "type": "object" }, "MachineDependency": { "properties": { "name": { "type": "string" }, "namespace": { "type": [ "string", "null" ] } }, "required": [ "name" ], "type": "object" }, "MachineDockerOptions": { "properties": { "args": { "additionalProperties": { "type": "string" }, "type": [ "object", "null" ] }, "context": { "type": [ "string", "null" ] }, "dockerfile": { "type": [ "string", "null" ] }, "image": { "type": [ "string", "null" ] }, "name": { "type": [ "string", "null" ] }, "tag": { "type": [ "string", "null" ] } }, "type": "object" }, "MachineMode": { "oneOf": [ { "enum": [ "regular" ], "type": "string" }, { "additionalProperties": false, "properties": { "flash": { "properties": { "strategy": { "$ref": "#/$defs/MachineSnapshotStrategy" }, "timeout": { "anyOf": [ { "format": "uint64", "minimum": 0, "type": [ "integer", "null" ] }, { "$ref": "#/$defs/expr" } ] } }, "required": [ "strategy" ], "type": "object" } }, "required": [ "flash" ], "type": "object" } ] }, "MachinePhase": { "oneOf": [ { "enum": [ "idle", "pulling-image", "waiting", "creating", "booting", "ready", "suspending", "suspended", "stopping", "stopped", "restarting" ], "type": "string" }, { "additionalProperties": false, "properties": { "error": { "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" } }, "required": [ "error" ], "type": "object" } ] }, "MachineResources": { "properties": { "cpu": { "anyOf": [ { "format": "uint8", "maximum": 255, "minimum": 0, "type": "integer" }, { "$ref": "#/$defs/expr" } ] }, "memory": { "anyOf": [ { "format": "uint64", "minimum": 0, "type": "integer" }, { "$ref": "#/$defs/expr" } ] } }, "required": [ "cpu", "memory" ], "type": "object" }, "MachineRestartPolicy": { "enum": [ "never", "always", "on-failure", "remove" ], "type": "string" }, "MachineSnapshotStrategy": { "oneOf": [ { "enum": [ "first-listen", "user-space-ready", "manual" ], "type": "string" }, { "additionalProperties": false, "properties": { "nth-listen": { "anyOf": [ { "format": "uint32", "minimum": 0, "type": "integer" }, { "$ref": "#/$defs/expr" } ] } }, "required": [ "nth-listen" ], "type": "object" }, { "additionalProperties": false, "properties": { "listen-on-port": { "anyOf": [ { "format": "uint16", "maximum": 65535, "minimum": 0, "type": "integer" }, { "$ref": "#/$defs/expr" } ] } }, "required": [ "listen-on-port" ], "type": "object" } ] }, "MachineV1": { "properties": { "build": { "anyOf": [ { "$ref": "#/$defs/MachineBuild" }, { "type": "null" } ] }, "command": { "items": { "type": "string" }, "type": [ "array", "null" ] }, "depends-on": { "items": { "$ref": "#/$defs/MachineDependency" }, "type": [ "array", "null" ] }, "environment": { "additionalProperties": { "type": "string" }, "type": [ "object", "null" ] }, "image": { "type": [ "string", "null" ] }, "mode": { "anyOf": [ { "$ref": "#/$defs/MachineMode" }, { "type": "null" } ] }, "name": { "type": "string" }, "namespace": { "type": [ "string", "null" ] }, "resources": { "$ref": "#/$defs/MachineResources" }, "restart-policy": { "anyOf": [ { "$ref": "#/$defs/MachineRestartPolicy" }, { "type": "null" } ] }, "tags": { "items": { "type": "string" }, "type": [ "array", "null" ] }, "volumes": { "items": { "$ref": "#/$defs/MachineVolumeBinding" }, "type": [ "array", "null" ] } }, "required": [ "name", "resources" ], "type": "object" }, "MachineVolumeBinding": { "properties": { "name": { "type": "string" }, "namespace": { "type": [ "string", "null" ] }, "path": { "type": "string" } }, "required": [ "name", "path" ], "type": "object" }, "ServiceBind": { "oneOf": [ { "enum": [ "tcp" ], "type": "string" }, { "additionalProperties": false, "properties": { "internal": { "properties": { "port": { "anyOf": [ { "description": "If not provided, the port will be inferred from target port.", "format": "uint16", "maximum": 65535, "minimum": 0, "type": [ "integer", "null" ] }, { "$ref": "#/$defs/expr" } ] } }, "type": "object" } }, "required": [ "internal" ], "type": "object" }, { "additionalProperties": false, "properties": { "external": { "properties": { "host": { "type": "string" }, "port": { "anyOf": [ { "description": "If not provided, the port will be inferred from protocol or target port.", "format": "uint16", "maximum": 65535, "minimum": 0, "type": [ "integer", "null" ] }, { "$ref": "#/$defs/expr" } ] }, "protocol": { "$ref": "#/$defs/ServiceBindExternalProtocol" } }, "required": [ "host", "protocol" ], "type": "object" } }, "required": [ "external" ], "type": "object" } ] }, "ServiceBindExternalProtocol": { "enum": [ "http", "https", "tls", "tcp" ], "type": "string" }, "ServiceTarget": { "properties": { "connection-tracking": { "anyOf": [ { "$ref": "#/$defs/ServiceTargetConnectionTracking" }, { "type": "null" } ] }, "name": { "type": "string" }, "namespace": { "type": [ "string", "null" ] }, "port": { "anyOf": [ { "format": "uint16", "maximum": 65535, "minimum": 0, "type": "integer" }, { "$ref": "#/$defs/expr" } ] }, "protocol": { "$ref": "#/$defs/ServiceTargetProtocol" } }, "required": [ "name", "port", "protocol" ], "type": "object" }, "ServiceTargetConnectionTracking": { "oneOf": [ { "enum": [ "connection-aware" ], "type": "string" }, { "additionalProperties": false, "properties": { "traffic-aware": { "properties": { "inactivity-timeout": { "anyOf": [ { "format": "uint64", "minimum": 0, "type": [ "integer", "null" ] }, { "$ref": "#/$defs/expr" } ] } }, "type": "object" } }, "required": [ "traffic-aware" ], "type": "object" } ] }, "ServiceTargetProtocol": { "enum": [ "http", "tcp" ], "type": "string" }, "ServiceV1": { "properties": { "bind": { "$ref": "#/$defs/ServiceBind" }, "name": { "type": "string" }, "namespace": { "type": [ "string", "null" ] }, "tags": { "items": { "type": "string" }, "type": [ "array", "null" ] }, "target": { "$ref": "#/$defs/ServiceTarget" } }, "required": [ "name", "target", "bind" ], "type": "object" }, "VolumeMode": { "enum": [ "read-only", "writeable" ], "type": "string" }, "VolumeV1": { "properties": { "mode": { "$ref": "#/$defs/VolumeMode" }, "name": { "type": "string" }, "namespace": { "type": [ "string", "null" ] }, "size": { "description": "The size of the volume in human readable format", "type": "string" }, "tags": { "items": { "type": "string" }, "type": [ "array", "null" ] } }, "required": [ "name", "mode", "size" ], "type": "object" }, "expr": { "description": "Expression evaluated at build/deploy time.", "pattern": "^\\s*\\$\\{\\{[\\s\\S]*\\}\\}\\s*$", "type": "string" } } }