mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-02 13:18:38 +09:00
## What this PR does This PR adds installation defaults for applications: administrator sets `applicationDefaults` in the platform values, and every application created after that starts from them. Design is in [the proposal in cozystack/community](https://github.com/cozystack/community/pull/116), related to [the worker defaults issue](https://github.com/cozystack/cozystack/issues/3950). The value is keyed by ApplicationDefinition plural (for example `postgreses`) and the platform chart renders it into the `cozystack-application-defaults` ConfigMap in `cozy-system`. The aggregated API merges the entry for the kind under the submitted spec on create, apply-create and dry-run create, and saves the result in HelmRelease values. The order is user values, installation defaults, then developer defaults from the chart schema. Update never applies defaults, so changing the value leaves existing applications alone. The merge goes into objects that declare `properties` and replaces everything else whole: arrays, dictionaries with `additionalProperties`, free-form objects, objects that also take arbitrary keys and objects marked `x-kubernetes-map-type: atomic`. So a node pool that sets its own `registryMirrors` gets no platform mirror entries. Explicit empty values from the user (`{}`, `[]`, `false`, `0`, `""`) win over the installation value. An entry is checked against the application's OpenAPI schema before it is merged. An object that the merge completes is checked as a partial one, so `required` and `minProperties` are not enforced on it and its `oneOf` is not evaluated (CEL rules are not evaluated at all). Whatever is stored whole is checked whole: array rows, dictionary values, free-form and atomic objects. Without that, an entry like a RabbitMQ vhost without `roles` was accepted and stored, and the chart refused to render it. A missing ConfigMap means no defaults and gives no warning. An unreadable ConfigMap, invalid JSON, a bad entry or an unreadable schema does not block the create: defaults are skipped and the response carries a Warning (dry-run too). The generic checks cover the whole map, so one entry that is not an object, or a reserved top-level field in any entry, turns defaults off for every application until it is fixed, while a bad entry of one application only affects that application. The ConfigMap is read through a cache limited to that one object, startup waits up to 30 s for it to sync and a create waits up to 5 s for the read, then both go on without defaults. Some objects take exactly one of their children and the chart refuses two: the worker image of a node pool (`osImage.builtin` or `osImage.factory`), a vm-disk `source`, the `oidc.customConfig` of a kubernetes cluster and of a monitoring stack (`config` or `secretRef`). A default for one child merged into an application that chose another built that spec. These carry the atomic marker now, so the merge replaces them whole, and `values.yaml` tells catalog authors to do the same in their own schemas. The chart guide (`docs/agents/overview.md`) says when the marker fits and when it does not. The `osImage` change is the same hunk as in #5192. The dashboard order page sends one dry-run create when it opens and starts the form and YAML from the returned spec, so the browser reads no ConfigMap and merges nothing. If the preview fails, or gets no answer in 8 s, the form opens with a notice and Retry, and Deploy still works. After a failed preview a dropdown stays empty instead of selecting the cluster default option, so the API applies the platform default to the omitted field. A cleared text field leaves its key out, a dropdown None and a sensitive field are written as `""`. While the server owns defaults the form does not fill schema defaults on its own. Not in this PR: defaults on update, re-rendering existing applications when the value changes, defaults for HelmReleases that controllers create directly, validation when the ConfigMap is saved, previews on every edit in the dashboard. ### Merge order #5190 and #5191 are merged and this branch is rebased on main. #5192 is open and has the same `osImage` marker hunk, so whichever of the two lands second needs one more `make generate` after a rebase. ### Known limits - The dashboard does not show the API Warning. - `null` for a field that has a developer default is saved as `null` through kubectl or Terraform, but the dashboard form shows the developer default. - A number in an integer-or-string field is rejected by the form (same on main), so quantities in an entry have to be quoted, `cpu: "2"`. `values.yaml` says so. - After a failed preview the form still requires a field that has no schema default, even if an entry would supply it. Typing the value or switching to YAML gets around it. - The marker only fits a choice between alternatives that each stand complete. I went through the application charts and rendered every refusal I found that involves two or more fields, and most are not that. A pair that has to be set together (`resources.cpu` with `resources.memory`, `tls.enabled` with `tls.disableNonTLSListeners` in rabbitmq) is completed field by field today, and an atomic object would drop the default half. An object that also holds independent fields an admin would default (`backup` in clickhouse, mariadb, mongodb and postgres, `volume` in seaweedfs) would lose them. Relations between two objects or two top-level fields (`cloudflareProxy` with `proxyProtocol` in the ingress, most of postgres, the kubernetes addons) cannot carry a marker. In all of these a default for one field plus the user's value for another can make the chart refuse the render after the create went through. Catching that needs the relations declared as rules in the schema and the merged spec checked against them, and the API does not evaluate such rules on a user spec yet (#2657), so it is a separate change. A few relations depend on a lookup into the cluster and I could not render them offline. - Clearing an optional text or number field in the order form leaves its key out, so the default comes back. A dropdown set to None, a sensitive field and a dictionary value send an empty string and win. The form keeps its old meaning of clearing a field, same as on main. To override a default with an empty value, set it in the YAML tab (`""`, `0`). Switching from the YAML tab back to the form fills an empty dropdown with its default option again, a None included, so such a value has to be deployed from the YAML tab (https://github.com/cozystack/cozystack/issues/5473). - An entry that cannot be parsed (invalid JSON, a reserved `_` key) turns defaults off for every kind, not only its own, and the Warning on each create names the problem. I did not split it per entry: the failure is loud, the fix is in one place, and splitting touches the parse and cache path for a case only a typo causes. - An atomic object also drops a default for a field nested inside an alternative when the user sets another field of that alternative. A default for `osImage.factory.imageFactoryURL` does not survive a pool that sets `osImage.factory.version`, and the boot disk then comes from the public factory. `talos.imageFactoryURL` is the knob the chart falls back to, it is not atomic, and defaults for it keep working. - A schema that declares a typed property only inside an `allOf` or `anyOf` branch, under a root that takes arbitrary keys, is checked as partial. No schema in the tree looks like that. - An object inside an `allOf`, `anyOf` or `oneOf` branch is closed to unknown keys even when the property it constrains is declared as a dictionary, so a valid entry for such a schema is refused and the create goes on with a Warning (https://github.com/cozystack/cozystack/issues/5474). No schema in the tree looks like that either. - The preview uses the placeholder name `preview`, so it fails when the tenant already has an application of that kind with this name, and the form opens with the notice. - The cache wiring in `pkg/apiserver/apiserver.go` has no unit test, the cache itself has. ### Verification - `make unit-tests` on this head with `LC_ALL=C`, exit code 0 (a kafka bats test on main depends on the locale). - `tsc` and `eslint` in the console are clean. - For the checks below I broke the code on purpose and saw the matching test fail, except the `arrayMinItems` flag of the server form, I could not make it matter. - A run on a test cluster with v1.7.0 is in the comment below. It was on an earlier revision, the stored-whole checks, the extra markers and the cleared-field change came after and are covered by unit tests only. - Not run: `make test-controllers`. - The merge cases asked in review are fixtures of `TestInstallationDefaultsMergeContract` now: a field set inside the alternative a user chose of an atomic object, the same object without the marker, an atomic object nested in one that merges, and an explicit `null` over an installation object. The whole table is in the proposal addendum, https://github.com/cozystack/community/pull/146. Checked cases: - user values `{}`, `[]`, `false`, `0`, `""` are kept, and a node pool with its own `registryMirrors` gets none from the platform - an object with both `properties` and a dictionary, or with preserved unknown fields, is replaced whole - empty and `null` `spec` on create - update after create, apply-update and a field removed on update keep stored values - a broken entry for another application, or an application with no entry and no readable schema, does not touch this create - missing ConfigMap gives no defaults and no warning, invalid JSON, unreadable ConfigMap and a cache that did not sync give a Warning and the create goes on - partial entry: `required`, `minProperties` and object `oneOf` are skipped on an object the merge completes, while unknown fields, wrong types, scalar `oneOf` and array items are still checked - array rows, dictionary values, free-form and atomic objects are checked whole, also when the constraint sits in an `allOf` or `anyOf` branch next to the property, and in these shapes an accepted entry merges into a spec that the application's own schema accepts - every ApplicationDefinition in the tree accepts an entry built from its own developer defaults - an object that lists properties without `type: object` is checked as an object, so an unknown field in it is refused - a pool with `osImage.factory`, a disk with another `source`, a cluster with `oidc.customConfig.secretRef` and a monitoring stack with `oidc.customConfig.config` do not get the other child from the platform, on their real schemas - a node pool that sets `resources.cpu` still gets `resources.memory` from an entry, so the marker does not take away the field-by-field completion of pairs - dashboard: a user with no tenant does not wait on the spinner, switching tenant keeps what was typed, a preview answer that arrives after the tenant changed is dropped, a non-object answer counts as a failed preview, Retry sends the current draft - dashboard: after a failed preview dropdowns in a field, an array row and a dictionary value stay empty, and edits made in YAML come back into the form - `required` inside array rows and dictionary values stays in force when the server owns defaults, and an emptied sensitive field stays `""` ### Screenshots Not captured yet. ### Downstream repositories This PR changes `packages/core/platform/values.yaml`. The docs for the new key are in https://github.com/cozystack/website/pull/828, and the proposal addendum with the merge cases and two decision records is in https://github.com/cozystack/community/pull/146. The Terraform provider may be reached too: it has its own defaults for some sizing fields (storage class, disk size), so installation defaults would not apply to those, while the Talos block fields are left out when unset and do get them. I read the schema, not the expand code. - [ ] No downstream repository is affected by this change - [x] [cozystack/website](https://github.com/cozystack/website) - follow-up: https://github.com/cozystack/website/pull/828 - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: to check, provider defaults vs installation defaults - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [x] [cozystack/community](https://github.com/cozystack/community) - follow-up: https://github.com/cozystack/community/pull/146 ### Release note ```release-note feat(api): add the `applicationDefaults` platform value, installation defaults are applied to new applications under user values, existing applications keep their saved settings, and the dashboard order form starts from the same defaults. ```
Kubernetes Worker Node Pool
kubernetes-nodes manages one worker node pool of a managed Kubernetes cluster. The control plane and the cluster addons come from the kubernetes application; every pool is a separate KubernetesNodes resource that attaches to its cluster by name.
A KubernetesNodes resource named <cluster>-<pool> (for example myk8s-md0) sets cluster: <cluster> and renders, in the namespace of the kubernetes-<cluster> cluster:
- a
MachineDeploymentthat the cluster autoscaler scales betweenminReplicasandmaxReplicas; - the machine template its workers are created from: a
KubevirtMachineTemplateonsubstrate: kubevirt(the default), or aProxmoxMachineTemplateonsubstrate: proxmox; - a
MachineHealthCheckthat replaces workers which do not become Ready or stop being Ready; - a
WorkloadMonitorfor the pool's workers; - a
talos-reconcileJob that creates the pool'sTalosConfigTemplate, the Talos machine config every worker boots with.
The pool's Kubernetes minor (version) may lag the cluster's during an upgrade but may not lead it: upgrade the Kubernetes resource first, then each pool. Delete the pools of a cluster before the cluster itself.
Parameters
Linkage
| Name | Description | Type | Value |
|---|---|---|---|
cluster |
Name of the parent Kubernetes cluster (the Kubernetes CR) in the same namespace this node pool attaches to. Required. The pool's CAPI objects are wired to the parent cluster kubernetes-<cluster>; the KubernetesNodes CR must be named <cluster>-<pool>. The pool's objects are named kubernetes-<cluster>-<pool>; when a MachineDeployment of that name already exists and belongs to another Helm release, the render fails instead of taking it over. |
string |
"" |
network |
Joins this pool's worker VMs to a cozyplane VPC. Must match the parent Kubernetes cluster's network, which puts the control plane in the same VPC. Setting or changing it on an existing pool rolls every worker VM of the pool. Requires the cozyplane networking variant and substrate: kubevirt. |
object |
{} |
network.name |
Name of the VirtualPrivateCloud (without the "virtualprivatecloud-" prefix) in this namespace | string |
"" |
routeTable |
Name of a cozyplane RouteTable in the VPC's namespace that routes this pool's worker VMs. Empty uses the VPC's default table. Requires network.name and the cozyplane networking variant. Like network, setting or changing it rolls every worker VM of the pool. |
string |
"" |
Common Parameters
| Name | Description | Type | Value |
|---|---|---|---|
storageClass |
StorageClass for the worker node system disk. When empty, CDI picks the class: the one annotated storageclass.kubevirt.io/is-default-virt-class, else the cluster default. Worker VMs live-migrate, so their disks need ReadWriteMany — the RWX access mode is supplied by the chosen StorageClass's CDI StorageProfile — and linstor-csi rejects RWX volumes that are not on a DRBD-backed StorageClass, so prefer a replicated/DRBD class. On an osImage.builtin pool this field also decides whether the pool renders at all: the chart refuses a pool whose class differs from its golden's, because across classes CDI either falls back to a host-assisted copy over the pod network (different CSI drivers or volume modes) or leaves a clone into the other class to the CSI driver. Leaving it empty makes the same comparison against the class CDI would pick. On a builtin pool the resolved class is then written onto the worker disk rather than left for the cluster to fill in at bind time, so a pool that has already cloned keeps binding on the class its disks are on even after an admin moves the default annotation; on the HTTP path an empty class is still left to the cluster. Has no effect on substrate: proxmox, where the worker disk is cloned from the VM template onto the template's storage or proxmox.storage. |
string |
replicated |
Pool Sizing
| Name | Description | Type | Value |
|---|---|---|---|
minReplicas |
Minimum number of replicas in this pool. Used as the cluster-autoscaler floor. | int |
0 |
maxReplicas |
Maximum number of replicas in this pool. Used as the cluster-autoscaler ceiling. | int |
10 |
instanceType |
KubeVirt instance type that sizes each worker VM when resources is not set. Ignored when resources.cpu and resources.memory are both set, and therefore on substrate: proxmox, which requires them. |
string |
u1.medium |
diskSize |
System disk size for the worker VM. Carries the Talos OS image, kubelet state, containerd image cache, and any local-path PVCs. How the OS image reaches the disk follows this pool's osImage: the default and osImage.factory stream the Image Factory raw artifact in over HTTP, while osImage.builtin makes the disk a storage-layer CDI clone of a shared golden image, with no HTTP fetch. A builtin pool must keep diskSize at or above the golden's storage size (6Gi in the shipped worker image catalog), because a CDI clone target cannot be smaller than its source -- the chart rejects a smaller value at render time rather than letting the clone stall. Sizing a builtin pool also has to allow for transient headroom the finished disk does not show: CDI populates a larger target by cloning the golden at the source size and then growing it, so a worker being provisioned occupies a temporary clone PVC at the golden's size on top of this diskSize, and both are multiplied by the replica count of a replicated StorageClass. The golden itself is a separate one-time cost for the whole cluster, not a per-worker one. So the peak is the golden, plus diskSize + golden storage for each worker cloning at that moment. A pool whose storage backend cannot spare that peak does not fail: the clone waits for space, the VM never boots, and the reason is visible only in the storage layer's own events. Has no effect on substrate: proxmox, where the worker disk is a clone of the VM template's disk and keeps its size. |
quantity |
20Gi |
roles |
List of node roles. Each role r labels nodes with node-role.kubernetes.io/<r>. Use [ingress-nginx] for a pool that hosts the tenant ingress-nginx controller. |
[]string |
[] |
resources |
Explicit CPU and memory for each worker node, as an alternative to instanceType sizing. Optional: when omitted, the node is sized by instanceType. When both cpu and memory are set, they take precedence and instanceType is ignored (the instancetype is omitted from the VM, since KubeVirt cannot override an instancetype's CPU/memory). Set both cpu and memory together or neither; setting only one is rejected at render time. On the kubevirt substrate cpu is written into the VM as spelled and decoded as YAML, so a leading zero is read as octal, as in any Kubernetes manifest: "010" is eight cores, and the autoscaler capacity counts eight. The kubelet reservations still read the value as a decimal, so "010" reserves what "10" does. |
object |
{} |
resources.cpu |
Number of vCPU cores for each worker VM, as a whole number such as 2. On the kubevirt substrate the value becomes the VM's integer domain.cpu.cores, so millicore, fractional and negative quantities, and counts above 4294967295, are rejected at render time; an unquoted 0 is treated as unset. On the proxmox substrate a millicore or fractional quantity is rounded up to whole cores. |
quantity |
"" |
resources.memory |
Memory (RAM) available. | quantity |
"" |
podCpuLimit |
CPU limit for the worker VM's virt-launcher compute container, which is the ceiling the guest vCPU threads, the QEMU emulator thread and the IO threads share. Distinct from resources.cpu, which sizes the guest itself. Cannot be combined with instanceType sizing: KubeVirt refuses a VM that references an instancetype and also sets domain.resources.limits.cpu, so the chart rejects that combination at render time. Sizing the pool by resources (both cpu and memory) is what drops the instancetype from the VM, which is where the limit is usable. When unset, KubeVirt derives the limit from the guest vCPU count in any namespace carrying a ResourceQuota that limits CPU, so a worker sized at N vCPUs runs under a ceiling of N with the emulation overhead taken out of the same N. Setting a value declares the limit on the VM directly, which is both what lands it on the container and what stops KubeVirt deriving one. It moves the CPU request with it: KubeVirt copies a declared CPU limit into the CPU request when the VM declares no request of its own, so a pool that sets only this field asks the scheduler for its whole ceiling instead of the fraction of the vCPU count it asked for before, and a ceiling the nodes cannot spare leaves the workers Pending on Insufficient cpu. Pair it with podCpuRequest to move the ceiling without moving the request. Zero means no ceiling at all rather than the tightest one, since the kubelet turns a zero CPU limit into no CFS quota while the declared key still stops KubeVirt deriving one — but it is only accepted together with podCpuRequest: 0, because KubeVirt keeps deriving a request from the vCPU count when the VM declares none and a request above a declared limit of zero is rejected when the worker's Pod is created. A negative value is refused at render time. Changing it rolls the pool, because the worker VM template is named by a hash of its content. |
quantity |
"" |
podCpuRequest |
CPU request for the worker VM's virt-launcher compute container, which is what the scheduler reserves for a worker on its host and what weights it against neighbours on a contended one. Distinct from resources.cpu, which sizes the guest itself. It exists to be paired with podCpuLimit: KubeVirt copies a declared CPU limit into the request when the VM declares no request, so raising the ceiling alone raises what every worker in the pool asks the scheduler for, and this field is what holds the request still while the ceiling moves. Cannot be combined with instanceType sizing, for the same reason as podCpuLimit: KubeVirt refuses a VM that references an instancetype and also sets domain.resources.requests.cpu, so the chart rejects that combination at render time, as it does a value above podCpuLimit. Usable without a limit, where it only changes the scheduler's weighting: KubeVirt still derives the ceiling from the guest vCPU count in any namespace carrying a ResourceQuota that limits CPU, so keep the request at or below that count. A request above that derived ceiling is refused only when the worker's Pod is created, and deliberately not at render time: the ceiling exists only where such a ResourceQuota does, so refusing here would take away a configuration that works in a namespace without one. Zero is accepted on its own and reserves nothing, but zero beside a podCpuLimit is refused, because KubeVirt cannot tell an explicit zero request from an absent one and replaces both with the limit — which is the outcome this field exists to avoid, arrived at silently. A negative value is refused as well. When unset, KubeVirt computes the request from the guest vCPU count and the cluster CPU allocation ratio. Changing it rolls the pool, because the worker VM template is named by a hash of its content. |
quantity |
"" |
gpus |
List of GPUs to attach (NVIDIA driver requires at least 4 GiB RAM). | []object |
[] |
gpus[i].name |
Name of GPU, such as "nvidia.com/AD102GL_L40S". | string |
"" |
maxUnavailable |
Workers a rollout (instance type, image or version change) may remove before their replacement is up. Unset, it is 0, so each replacement joins before an old worker is drained, and 1 on a pool with gpus, whose replacement may need the very GPU the old worker holds. With 0, a rollout needs room for one extra VM: a pool short of quota or capacity for it stalls, with the new Machine Pending, until room is made or maxUnavailable is set to 1. Set 1 on a Proxmox pool whose template passes a GPU through: the chart cannot see that GPU, and with 0 the rollout would wait for it forever. |
*int |
null |
kernelModules |
Kernel modules loaded on every worker in this pool, emitted as Talos machine.kernel.modules. A Talos system extension installs a module but does not load it, so an extension-provided driver needs its modules declared here. Leave unset to let the chart decide: a pool holding at least one nvidia.com/* GPU gets nvidia (with NVreg_NvLinkDisable=1, which the gpu-operator driver container applies on non-Talos workers; on Talos that container has to be turned off or it clashes with the system extension, and nothing then mounts the ConfigMap carrying the parameter), nvidia_uvm, nvidia_drm, nvidia_modeset (that order — Talos loads the list in sequence and the last three depend on the first), and any other pool gets nothing. Set a non-empty list to replace the chart's choice entirely, or [] to opt out and emit no modules even on a GPU pool. The field carries no default, and unset is not the same value as []: a generated parameter table that shows [] in its Default column is printing what it prints for any array with no default, not the effective value — leaving the field out selects the automatic set, writing [] disables it. The module still has to be in the image, and which extensions the image carries is the pool's schematic: a GPU pool points osImage.factory.schematicID (or osImage.builtin.schematicID) at a schematic with the NVIDIA extensions, and on Blackwell (GB202) that must be the open-kernel-modules extension. The automatic set keys on the nvidia.com/ resource prefix alone and nothing cross-checks it against that schematic; on Talos v1.13 a declared module the image does not ship leaves its controller retrying rather than failing the boot, so the symptom is a missing driver, not a dead node. This value is part of the worker machine config, whose content hash names the TalosConfigTemplate, so changing it rolls every existing worker in the pool rather than only affecting nodes created later. |
[]object |
[] |
kernelModules[i].name |
Module name as modprobe takes it, e.g. nvidia_uvm. |
string |
"" |
kernelModules[i].parameters |
Module parameters, each as a bare key=value string. |
[]string |
[] |
kubelet |
Kubelet resource reservations for this pool. An empty reservation is computed from the worker's size: resources when set, otherwise the instanceType. |
object |
{} |
kubelet.systemReservedMemory |
Memory reserved for host OS. When empty, 5% of the worker's memory, clamped to 256Mi..1Gi. | string |
"" |
kubelet.kubeReservedMemory |
Memory reserved for kubelet and container runtime. When empty, 5% of the worker's memory, clamped to 256Mi..1Gi. | string |
"" |
kubelet.systemReservedCpu |
CPU reserved for host OS. When empty, 5% of the worker's CPU, clamped to 50m..500m. | string |
"" |
kubelet.kubeReservedCpu |
CPU reserved for kubelet and container runtime. When empty, 5% of the worker's CPU, clamped to 50m..500m. | string |
"" |
kubelet.evictionHardMemory |
Hard eviction threshold for memory (absolute like 200Mi or percentage like 7%). | string |
7% |
kubelet.evictionSoftMemory |
Soft eviction threshold for memory (absolute like 1Gi or percentage like 10%). | string |
10% |
logSerialConsole |
Stream each worker VM's guest serial console into a guest-console-log container beside virt-launcher, readable with kubectl logs. The only view of a worker that stalls during boot before Talos apid answers, when neither a Node nor a certificate request exists to diagnose from. Two costs the field name does not show. Changing the value rolls the pool, because it is part of the worker VM template whose name is a hash of its content -- including the stuck VM whose console was wanted, so it buys visibility into the next boot rather than the current one. And it overrides the platform's cluster-wide disableSerialConsoleLog, set because that container has been seen holding virt-launcher in PodInitializing (kubevirt/kubevirt#15989), which would take the pool down rather than explain it -- so check that virt-launcher Pods reach Running after enabling it. |
bool |
false |
maxUnhealthy |
Maximum number of unhealthy nodes tolerated in this pool before remediation is paused. The MachineHealthCheck admission webhook accepts either a bare integer ("0", "1", ...) or a percentage ("0%", "50%"); bare numeric strings are rejected, so the safer default is a percentage. Drop to "0%" once the pool is stable. Watch how a percentage behaves in a small group: the MachineHealthCheck controller scales it against the number of machines the check covers and rounds down, then remediates only while the unhealthy count is at or below that result. At "50%" a group of one therefore never remediates, because half of one rounds down to zero, and a group of two remediates one unhealthy machine but not two. | string |
50% |
nodeStartupTimeout |
Maximum time a Machine is allowed to spend reaching the Ready condition before it is remediated. Raise for slow first boots (the Talos image import from the Image Factory, or a storage class slow to provision or clone the worker disk). The MachineHealthCheck measures it from the later of the Machine's creation and its InfrastructureReady transition, so the clock restarts when the infrastructure reports ready: a worker gets this long for the disk image import and the VM to come up, and then this long again for the guest to boot and its kubelet to register with the tenant apiserver. Either leg stretches on a host under load, and a Machine remediated here is deleted before it ever joins, so its replacement starts the same sequence from the beginning. | string |
20m |
readyUnknownTimeout |
How long a worker Node may report Ready=Unknown before the MachineHealthCheck remediates the Machine, which for a KubeVirt worker means deleting the VM. Ready=Unknown is what the node lifecycle controller writes once it stops hearing from a kubelet, on a grace period of its own, so the wall clock from a guest going quiet to a deleted worker is this value plus that grace period. A guest starved of CPU stops answering long before it is dead, so a value of a few tens of seconds deletes workers that would have come back on their own. Validated at render time like maxNodeProvisionTime: the CAPI webhook does not check these timeouts, and a zero or negative value would remediate the moment the condition flips. |
string |
5m |
readyFalseTimeout |
How long a worker Node may report Ready=False before the MachineHealthCheck remediates the Machine. A Node that has registered but has no working CNI yet reports Ready=False, so this value is the whole budget a first boot gets for the CNI rollout to reach that node, and a worker deleted mid-rollout takes the rollout with it while its replacement starts over. Raising it delays replacing a worker that is genuinely dead, but not rescheduling its workload: Pods leave an unreachable Node on the node lifecycle controller's taint-based eviction and the toleration that carries, not on this timer. Validated at render time like maxNodeProvisionTime: the CAPI webhook does not check these timeouts, and a zero or negative value would remediate the moment the condition flips. |
string |
10m |
maxNodeProvisionTime |
How long the cluster-autoscaler waits for a newly created worker to register as a Node before it treats that machine as long-unregistered. Rendered onto this pool's MachineDeployment as the cluster.x-k8s.io/autoscaling-options-maxnodeprovisiontime annotation, which overrides the autoscaler's built-in default for this pool only. Two things change when the timer fires, and both make a slow join worse rather than better: the machine stops counting towards the pool's upcoming capacity, so the autoscaler asks for a replacement for capacity that is already on its way, and the machine becomes eligible for removal. Size it above the slowest join a healthy worker can take, counting the Talos image import, the guest boot and the CNI rollout. Accepted as a whole number of seconds, minutes or hours ("30m", "1h30m"), which is narrower than Go's duration syntax on purpose: the autoscaler ignores a value it cannot parse and falls back to its own default without failing, and the narrower shape cannot express a value that overflows the parser or a fraction it rounds to zero. The canonical form a duration serializes back to ("20m0s", "1h0m0s") is accepted. |
string |
30m |
Kubernetes Version
| Name | Description | Type | Value |
|---|---|---|---|
version |
Kubernetes major.minor version the pool joins. Must not be ahead of the parent cluster's minor (workers may not lead the apiserver); it may lag behind during a rolling upgrade -- bump the parent Kubernetes CR first, then each pool. The render fails when it is ahead. Its pairing with the Talos release the pool resolves (talos.version, or the osImage override) is checked against the chart's Talos<->Kubernetes support matrix: for a Talos minor the matrix lists, a Kubernetes minor outside that minor's list is refused; a Talos minor the matrix does not list is not checked. |
string |
v1.35 |
Talos Worker Image
| Name | Description | Type | Value |
|---|---|---|---|
osImage |
Worker OS image source for this pool. Default (omitted): import over HTTP from the talos.* Image Factory. Set osImage.builtin to clone a golden from the opt-in worker image catalog instead. Editing this on an existing pool re-images that pool. The object is atomic: its two sources exclude each other, so a value that sets one of them replaces the whole object and is never completed from a default. |
object |
{} |
osImage.builtin |
Clone a golden image from the worker image catalog. Requires a StorageClass whose volumes are reachable from any node, in practice a replicated/DRBD class: the clone is a storage-layer copy, and on a node-pinned class its two ends land on unrelated nodes -- the golden binds where CDI imported it, a worker disk where its VM is scheduled. | *object |
null |
osImage.builtin.schematicID |
Talos schematic ID of the golden to clone. Defaults to talos.schematicID. |
string |
"" |
osImage.builtin.version |
Talos version of the golden to clone. Defaults to talos.version. |
string |
"" |
osImage.factory |
Import from an Image Factory / mirror (default). | *object |
null |
osImage.factory.version |
Talos version. Defaults to talos.version. |
string |
"" |
osImage.factory.schematicID |
Talos schematic ID. Defaults to talos.schematicID. |
string |
"" |
osImage.factory.imageFactoryURL |
Base URL of the Image Factory serving the boot raw image. Defaults to talos.imageFactoryURL. No trailing slash. This redirects only the worker boot-disk import; the installer image in the worker machine config is always sourced from talos.installerRepository, so an air-gapped pool must also have talos.installerRepository pointed at a reachable registry. |
string |
"" |
talos |
Talos worker image configuration for this pool. | object |
{} |
talos.version |
Default Talos release for this pool's worker OS image and for the installer image written into the worker machine config. The pool can pin its own release via osImage.builtin.version or osImage.factory.version; when osImage omits it, this value applies. Both ways in are checked against the chart's Talos<->Kubernetes support matrix, against whichever release the pool actually resolves to, so an override cannot slip past a check talos.version would have failed. The matrix lists, for each Talos minor the chart knows, the Kubernetes minors it supports and refuses a pool version outside that list; a Talos minor it does not list passes unchecked, so pointing either field at a Talos release the chart does not know about is the operator's call, not a checked one. Whichever release applies is interpolated into an image URL and a DataVolume name, so it must be a full vMAJOR.MINOR.PATCH release, optionally with a pre-release suffix -- the render refuses anything else, a minor-only v1.13 included. The values schema types this as a bare string, so a malformed one is accepted by the CR and fails the pool's HelmRelease instead. |
string |
v1.13.12 |
talos.schematicID |
Talos image-factory schematic ID. Defaults to the cozystack-tested vanilla schematic. Operators using custom schematics (system extensions, kernel args) override here. The pool can pin its own via osImage.builtin.schematicID or osImage.factory.schematicID; when osImage omits it, this value applies. Whichever of the two applies is interpolated into an image URL and a DataVolume name, so it must be a plain lowercase alphanumeric identifier -- the render refuses anything else. A custom schematic on osImage.builtin also needs its own catalog entry, since the golden is named from the schematic ID. |
string |
ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515 |
talos.imageFactoryURL |
Default base URL of the Talos Image Factory that serves the worker OS disk image (the openstack-amd64.raw.xz raw artifact streamed in by CDI over HTTP). Applies only when this pool imports over HTTP — the default and osImage.factory, which overrides it via osImage.factory.imageFactoryURL. A pool on osImage.builtin clones a golden image from the worker image catalog and does not use this field at all. Defaults to the public factory. Point at a self-hosted Image Factory, a caching mirror, or an internal HTTP file server for air-gapped, rate-limited, or flaky-egress environments. No trailing slash. It is interpolated into the worker DataVolume source URL, so on those HTTP paths it must be a plain http(s) URL and the render refuses anything else; a pool on osImage.builtin builds no such URL and is not held to it, so blanking this field there is legal. On substrate: proxmox the workers clone a VM template that already carries the OS, so this field has no effect there beyond that format check. |
string |
https://factory.talos.dev |
talos.installerRepository |
OCI repository prefix for the Talos installer image, written into the worker machine config as machine.install.image. Resolved as <installerRepository>/<schematicID>:<version> against whatever this pool's osImage pins, falling back to talos.schematicID and talos.version — so the installer matches the OS the pool actually booted. The prefix itself has no osImage.* override, so an air-gapped pool needs it pointed at a reachable registry as well. Defaults to the public factory's installer path. Override for air-gapped or mirrored registries. No trailing slash. |
string |
factory.talos.dev/installer |
talos.registryMirrors |
Talos machine.registries.mirrors passthrough for worker nodes: a map of upstream registry host to { endpoints: [ ... ] }. Empty by default, so workers pull container images (the Talos kubelet image included) directly from the upstream registry. Point a host such as ghcr.io at an in-cluster pull-through mirror for air-gapped, rate-limited, or flaky-egress environments so a worker's boot does not depend on live public egress. Talos still falls back to the upstream registry unless a host also sets skipFallback: true, so a mirror alone does not enforce air-gap. This value is part of the worker machine config, whose content hash names the TalosConfigTemplate, so changing it rolls every existing worker in the pool rather than only affecting nodes created later. |
object |
{} |
talos.sysctls |
Sysctl overrides rendered into Talos machine.sysctls on this pool's guest workers only. Values must be strings (quote numeric values); for example, user.max_user_namespaces: "11255" enables the user namespaces required by the Talos gVisor extension. An empty map preserves Talos defaults and the existing bootstrap hash. Adding, changing or removing an override changes the content-hashed TalosConfigTemplate and rolls the pool's workers. Supported names and values depend on the worker's Talos release and kernel; unsafe settings can weaken guest isolation or prevent workers from booting. This does not install gVisor or configure a RuntimeClass, and does not change the management hosts, control plane or other pools. |
map[string]string |
{} |
talos.imageFactoryCA |
Complete PEM certificate block(s) CDI must trust when importing this pool's worker OS disk image over HTTPS — the no-osImage default and osImage.factory path. Empty by default, so the importer uses only its system trust store, which is what the public factory needs. Set this when the factory in use (imageFactoryURL or osImage.factory.imageFactoryURL) is a self-hosted factory or mirror served by an internal CA, which the importer otherwise rejects with x509: certificate signed by unknown authority. The chart renders it into a ConfigMap in the release namespace — CDI requires certConfigMap to sit alongside the DataVolume — and references that from the worker DataVolume's source.http.certConfigMap; CDI appends it to the system pool rather than replacing it, so a publicly-trusted endpoint verifies either way. A pool on osImage.builtin clones a golden image and builds no HTTP source, so this field has no effect there. On substrate: proxmox it has no effect on the workers either: the ConfigMap is still rendered, but nothing references it. |
string |
"" |
Substrate
| Name | Description | Type | Value |
|---|---|---|---|
substrate |
Which infrastructure provider backs this pool's worker VMs. kubevirt runs them inside this cluster on KubeVirt, sized by instanceType and booted from a Talos disk image CDI streams from the image factory. proxmox runs them on an external Proxmox VE cluster through capmox, sized by resources, and cloned from a Talos VM template that already exists on the hypervisor. The two substrates take different Talos platform images and different sizing inputs, so switching an existing pool is refused: the chart reads the live MachineDeployment's template kind and fails the render rather than rolling every worker to the other hypervisor and deleting the template the draining MachineSet still references. Create a new pool on the other substrate and scale this one down. |
string |
kubevirt |
proxmox |
Proxmox substrate settings. | object |
{} |
proxmox.templateTags |
Tags identifying the Talos VM template to clone. capmox matches a template when its tag set is EQUAL to this list, not when it contains it, so every tag on the template must be listed here — a missing one yields found 0 VM templates with tags ... while the tags are plainly present. The template has to carry this pool's talos.schematicID at talos.version in the nocloud flavour, with the Proxmox guest agent enabled for the qemu-guest-agent extension of the default schematic; hack/proxmox-talos-template.sh builds it from these values and prints the tags to list here. That script tags the template talos-<version>, and the render refuses a talos-vX.Y.Z tag other than talos-<talos.version>, because the template is the boot disk while talos.version reaches only the installer, so a pool left on the previous release's tags would roll its workers onto the old kernel. Do not build it from the platform release's nocloud-amd64.raw.xz: that is the bare-metal node image, whose zfs extension keeps a VM from finishing its boot sequence and reboots it at the Talos boot timeout. Required when substrate is proxmox. |
[]string |
[] |
proxmox.full |
Full clone rather than linked. Default is a linked clone: it costs kilobytes at creation instead of the whole disk, because a ZFS-backed linked clone writes only its own increment (measured: 8K against 10.2G for the same worker full-cloned onto a sparse 0 pool). The cost is that the clone holds the template's base snapshot, so the template cannot be rotated while any linked clone still references it — which is what the consolidation CronJob resolves 24h after creation. Set true for a pool that must be independent of the template from the first second. |
bool |
false |
proxmox.network |
NIC configuration. | object |
{} |
proxmox.network.bridge |
Proxmox bridge the VM NIC attaches to (e.g. vmbr0). Required when substrate is proxmox. |
string |
"" |
proxmox.network.vlan |
L2 VLAN tag. Omitted when unset. | int |
0 |
proxmox.network.mtu |
NIC MTU. Omitted when unset. | int |
0 |
proxmox.storage |
Proxmox storage for the cloned disk; needs full: true. A target storage is a full-clone parameter — a linked clone always lives on the template's storage, and Proxmox refuses the pair — so the render refuses it too. Empty keeps the template's storage. |
string |
"" |
proxmox.pool |
Proxmox resource pool the worker VMs are added to. Set the same pool on every node pool of a tenant cluster and grant the tenant's tokens their privileges on /pool/<name>: that is the one ACL path that follows every VM capmox creates, replacements included. The pool must exist on the hypervisor; capmox does not create it. Empty adds the workers to no pool. |
string |
"" |
proxmox.dnsServers |
Nameservers written into the worker machineconfig. On kubevirt the workers use the management cluster's CoreDNS, which they reach over the pod network; an off-cluster Proxmox worker cannot, so it needs reachable resolvers of its own. Required when substrate is proxmox. Keep in sync with the parent kubernetes chart's proxmox.dnsServers. |
[]string |
[] |