Files
cozystack/packages/apps
Yan Bondarenko b983a5c34e fix(kubernetes): apply the worker TalosConfigTemplate server-side in the kubernetes chart
On release-1.6 the kubernetes chart still renders a talos-reconcile Job
for every node group, and that Job applies the worker
TalosConfigTemplate client-side under a 256Mi memory limit. Once the
template exists, a client-side apply builds its merge patch from the
full OpenAPI document of the management cluster, which #4163 measured
above that limit on a cluster with a few hundred CRDs. Every chart
upgrade runs the Job again against the existing template, so kubectl
is OOMKilled and the Job crash-loops after each upgrade. On a v1.6.5
cluster upgraded from v1.6.4 its log ends with the KamajiControlPlane
patch and the container was OOMKilled.

The server-side apply from #4163 reached release-1.6 through #4575,
which changed the kubernetes-nodes chart only. On main the kubernetes
chart no longer renders worker pools (92b9785da), so this Job and this
fix exist on release-1.6 only.

This uses the same server-side apply with --force-conflicts as
kubernetes-nodes. The merge happens in the apiserver, so kubectl never
loads the schema, and --force-conflicts keeps the Job authoritative
over a template an earlier client-side apply created. The Role already
grants create and patch on talosconfigtemplates. The Job spec changes,
so its content-hash name moves and existing clusters get a new Job on
their next upgrade.

Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
2026-10-19 18:15:15 +03:00
..
2026-03-25 15:59:22 +05:00
2025-08-07 14:07:05 +03:00

How to test packages local

cd packages/core/installer
make image-cozystack REGISTRY=YOUR_CUSTOM_REGISTRY
make apply
kubectl delete po -l app=source-controller -n cozy-fluxcd