Skip to content

Commit d8ce521

Browse files
feat(kubernetes): frame worker image package as an opt-in catalog
Reframe packages/system/kubernetes-worker-image as an explicit catalog of golden Talos worker images (each images[] entry is one (schematicID, version) flavor) and document that it is opt-in: disabled by default and enabled via bundles.enabledPackages. A tenant node group clones a golden only when it sets image.builtin; groups without it import over HTTP. Also raise the dv.yaml storage fallback from 4Gi to 6Gi and quote it: the Talos raw image is ~4.15 GiB and the values.yaml default is 6Gi, so a cleared $.Values.storage would otherwise render a too-small PVC. Assisted-By: Claude <[email protected]> Signed-off-by: Myasnikov Daniil <[email protected]>
1 parent 560e83d commit d8ce521

2 files changed

Lines changed: 24 additions & 17 deletions

File tree

‎packages/system/kubernetes-worker-image/templates/dv.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ spec:
2929
storage:
3030
resources:
3131
requests:
32-
storage: {{ .storage | default $.Values.storage | default "4Gi" }}
32+
storage: {{ .storage | default $.Values.storage | default "6Gi" | quote }}
3333
{{- with .storageClass | default $.Values.storageClass }}
3434
storageClassName: {{ . | quote }}
3535
{{- end }}
Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
11
##
2-
## @section Talos worker golden image collection
2+
## @section Talos worker image catalog
33
##
4-
## Pre-populates the Talos worker OS disk image(s) as DataVolumes in the
5-
## cozy-public namespace so tenant Kubernetes worker VMs boot by CDI csi-clone
6-
## (a storage-layer copy) instead of each worker independently importing the raw
7-
## image over HTTP from the Talos Image Factory. One import per
8-
## (schematicID, version) is then shared by every worker of every tenant cluster
9-
## that boots that image — eliminating the per-worker Factory dependency (and the
10-
## kubernetes-* e2e node-join flake, cozystack/cozystack#3231) on the hot path.
4+
## Pre-populates a catalog of Talos worker OS disk images as DataVolumes in the
5+
## cozy-public namespace, so a tenant Kubernetes worker node group can boot by CDI
6+
## csi-clone (a storage-layer copy) of a shared golden image instead of each worker
7+
## independently importing the raw image over HTTP from the Talos Image Factory.
8+
## One import per (schematicID, version) is then shared by every worker of every
9+
## tenant node group that clones it — removing the per-worker Factory dependency
10+
## (and the kubernetes-* e2e node-join flake, cozystack/cozystack#3231) on the hot
11+
## path. Each images[] entry is one catalog (schematicID, version) flavor.
1112
##
12-
## The kubernetes app looks a golden up by the deterministic name
13-
## `talos-worker-<schematicID>-<version>` in cozy-public and clones it; when no
14-
## match exists it falls back to a direct per-worker HTTP import. So each entry
15-
## here MUST match a (talos.schematicID, talos.version) that tenant `Kubernetes`
16-
## resources use for the clone to be selected. Keep the default entry in sync
17-
## with `talos.*` in packages/apps/kubernetes/values.yaml — a drift only costs the
18-
## caching benefit (workers degrade to HTTP import), it does not break anything.
13+
## This package is OPT-IN: it is registered through the platform's optional package
14+
## helper and is disabled by default. Enable it by adding
15+
## `cozystack.kubernetes-worker-image` to `bundles.enabledPackages` in the Cozystack
16+
## config; without it no golden is created and every worker imports over HTTP.
17+
##
18+
## A tenant node group opts into a clone explicitly by setting
19+
## `nodeGroups.<name>.image.builtin` (optionally overriding schematicID/version) in
20+
## a `Kubernetes` resource; the app then clones the golden named deterministically
21+
## `talos-worker-<schematicID>-<version>` from cozy-public. If the referenced
22+
## (schematicID, version) has no matching entry in this catalog, the tenant render
23+
## fails — so keep the catalog in sync with the (schematicID, version) pairs that
24+
## tenant node groups reference. Node groups that do not set `image.builtin` import
25+
## over HTTP and never touch this catalog.
1926

2027
## @param {string} imageFactoryURL - Default base URL of the Talos Image Factory serving the raw worker OS image (`<url>/image/<schematicID>/<version>/openstack-amd64.raw.xz`). Overridable per image. No trailing slash.
2128
imageFactoryURL: "https://factory.talos.dev"
@@ -33,7 +40,7 @@ storage: "6Gi"
3340
## @field {quantity} [storage] - Override the global storage size for this image.
3441
## @field {string} [storageClass] - Override the global StorageClass for this image.
3542

36-
## @param {[]WorkerImage} images - List of golden Talos worker images to provision in the cozy-public namespace.
43+
## @param {[]WorkerImage} images - Catalog of golden Talos worker images to provision in the cozy-public namespace. Each entry is one (schematicID, version) flavor a tenant node group can clone via `image.builtin`.
3744
images:
3845
- schematicID: "ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515"
3946
version: "v1.13.6"

0 commit comments

Comments
 (0)