mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-05 06:34:12 +09:00
fix(kubernetes): refuse Proxmox template tags naming another Talos
On Proxmox the template the tags select is the worker's boot disk, and talos.version reaches only the installer in the machineconfig. The bump of the default changes that machineconfig and rolls every pool, so a pool still tagged for the previous release would clone the old template and keep the vulnerable kernel while its config names the fixed one. The template script tags each template talos-<version>, which is the one link the chart can check; a tag set naming no release is left to the operator. Assisted-by: LLM Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
This commit is contained in:
1 parent
470e4c55a7
commit
d65fe65f0f
8 files changed
+66
-22
No files matched your search
+1
-1
@@ -141,7 +141,7 @@ type Proxmox struct {
|
||||
// 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.
|
||||
// +kubebuilder:default:=""
|
||||
Storage string `json:"storage,omitempty"`
|
||||
// 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. 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`.
|
||||
// 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`.
|
||||
// +kubebuilder:default:={}
|
||||
TemplateTags []string `json:"templateTags,omitempty"`
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user