Skip to content

Commit 0dc50b1

Browse files
committed
feat: add UnattendedInstall config and controller
Replace the deprecated v1alpha1 `.machine.install` section with a new `UnattendedInstall` multi-document config kind, driven by a dedicated `UnattendedInstallController` (single-flight, no reboot) that exposes an `UnattendedInstallStatus` resource. - Deprecate `.machine.install`; no longer required in validation. - Gate behind version contract (>= 1.14); `talosctl gen config` and `cluster create` emit `UnattendedInstall` by default for new contracts, translating `--install-disk` into a CEL disk selector. - Source `legacyBIOSSupport`/`grubUseUKICmdline` from the new document in the installer, falling back to `.machine.install`. - Skip the legacy install sequence (and its reboot) when the document is present; install is reconciled out-of-band. Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
1 parent a021940 commit 0dc50b1

43 files changed

Lines changed: 2174 additions & 257 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api/resource/definitions/runtime/runtime.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,13 @@ message ServicePIDSpec {
221221
string mount_namespace = 2;
222222
}
223223

224+
// UnattendedInstallStatusSpec describes the unattended install status.
225+
message UnattendedInstallStatusSpec {
226+
string image = 2;
227+
string phase = 4;
228+
string error = 5;
229+
}
230+
224231
// UniqueMachineTokenSpec is the spec for the machine unique token. Token can be empty if machine wasn't assigned any.
225232
message UniqueMachineTokenSpec {
226233
string token = 1;

cmd/installer/cmd/installer/install.go

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,28 @@ func runInstallCmd(ctx context.Context) (err error) {
7373
}
7474
}
7575

76-
if config.Machine() != nil && config.Machine().Install().LegacyBIOSSupport() {
77-
options.LegacyBIOSSupport = true
78-
}
76+
// defaults from the deprecated .machine.install section (if present).
77+
legacyBIOSSupport := config.Machine() != nil && config.Machine().Install().LegacyBIOSSupport()
7978

8079
// if we don't have v1alpha1 config (we are in maintenance mode),
8180
// or if we have v1alpha1 config, and GrubUseUKICmdline is set to true,
8281
// then we should set the option to true
83-
if config.Machine() == nil || config.Machine().Install().GrubUseUKICmdline() {
82+
grubUseUKICmdline := config.Machine() == nil || config.Machine().Install().GrubUseUKICmdline()
83+
84+
// the UnattendedInstall document takes precedence over the deprecated .machine.install section.
85+
if config.UnattendedInstallConfig() != nil {
86+
// legacyBIOSSupport is not supported in the new config.
87+
legacyBIOSSupport = false
88+
89+
// GrubUseUKICmdline is always true when UnattendedInstall is used.
90+
grubUseUKICmdline = true
91+
}
92+
93+
if legacyBIOSSupport {
94+
options.LegacyBIOSSupport = true
95+
}
96+
97+
if grubUseUKICmdline {
8498
options.GrubUseUKICmdline = true
8599
}
86100
}

hack/release.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,20 @@ trim:
305305
enabled: true
306306
interval: 24h0m0s
307307
```
308+
"""
309+
310+
[notes.unattended_install]
311+
title = "Unattended Install Configuration"
312+
description = """\
313+
Talos introduces a new `UnattendedInstall` multi-document config kind which replaces the deprecated `.machine.install`
314+
section of the v1alpha1 config. The document carries the installer `image` and a `provisioning` section with a CEL
315+
`volumeSelector` to match the install disk, plus a `wipe` option.
316+
317+
When the `UnattendedInstall` document is present, the install is driven by the new `UnattendedInstallController`
318+
(exposing an `UnattendedInstallStatus` resource) instead of the legacy install sequence.
319+
320+
`talosctl gen config` and `talosctl cluster create` now generate the `UnattendedInstall` document by default.
321+
The `.machine.install` field remains supported for backwards compatibility and is still used for older version contracts.
308322
"""
309323

310324
[make_deps]

0 commit comments

Comments
 (0)