894 Commits

Author SHA1 Message Date
Mateusz Urbanek
aebbbaf274
feat: support relative voume size
Include percent-based maxSize, e.g. use 50% of available space.

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
(cherry picked from commit 83f2bdb9ce6c9466716a6ac9c94dc2222e569ee8)
2025-11-14 16:55:51 +01:00
Andrey Smirnov
6063fbf912
feat: update dependencies
Many small changes, linting fixes, migration to moby/moby client
package.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-11-14 14:49:44 +04:00
Mateusz Urbanek
2c3d30e94f
docs: fix image-cache-path flag description
Fix invalid description of flag, spotted during reviewing docs.

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-11-14 08:33:52 +01:00
Adrian L Lange
93f2e87c2d
feat: shorthand for generating secrets to stdout
Fixes #12190

Signed-off-by: Adrian L Lange <git@p3lim.net>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-11-13 19:50:28 +04:00
Andrey Smirnov
82ac1119ec
feat: implement new registry configuration
Move to using multi-doc registry configuration.

Fixes #12120

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-11-12 17:25:01 +04:00
Laura Brehm
721a1e0d7c
chore: rename+improve client.ErrEventNotSupported
`client.ErrEventNotSupported` was a simple sentinel with no information.

Replaced it with `client.EventNotSupportedError`, a struct implementing
error with the offending TypeURL included.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2025-11-12 11:42:41 +01:00
Laura Brehm
66c01a706f
chore: deprecate interactive installer mode
Removes `interactive` from `talosctl apply-config --mode interactive`,
and deprecates related APIs.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2025-11-11 18:22:38 +01:00
Laura Brehm
957770f65a
feat(machined): add panic/force mode reboot
In certain situations, Talos's shutdown/reboot sequence hangs while
waiting for services/mounts to be gracefully stopped (see:
https://github.com/siderolabs/talos/issues/11775).

This patch adds a forceful mode to the reboot sequence (`talosctl reboot
--mode force`) that bypasses graceful userspace teardown and hard
reboots the machine.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2025-11-11 12:08:34 +01:00
Andrey Smirnov
60be0daf84
feat: implement multi-doc Wireguard config
Fixes #10963

Also hides/deprecated `.machine.network.interfaces`, as every piece of
it is now available as proper multi-doc.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-11-10 19:05:58 +04:00
Andrey Smirnov
92eeaa4826
fix: update YAML library
Update COSI, and stop using a fork of `gopkg.in/yaml.v3`, now we use new
supported for of this library.

Drop `MarshalYAMLBytes` for the machine config, as we actually marshal
config as a string, and we don't need this at all.

Make `talosctl` stop doing hacks on machine config for newer Talos, keep
hacks for backwards compatibility.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-11-04 15:21:57 +04:00
Justin Garrison
335f917615
feat: add short -c flag for --cluster
Prevents needing to use --cluster and stays consistent with omnictl.

fixes #12127

Signed-off-by: Justin Garrison <justin.garrison@siderolabs.com>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-11-04 13:41:53 +04:00
Utku Ozdemir
b66482c529
feat: allow disabling injection of extra cmdline in cluster create
The command `talosctl cluster create` injects some extra cmdline though SMBIOS OEM variable `io.systemd.stub.kernel-cmdline-extra` when systemd-boot is used (e.g., when UEFI is enabled).

Introduce a new flag to optionally disable this behavior. This allows getting more consistent behavior when testing with a mixed set of UKI and non-UKI machines.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2025-10-27 12:01:36 +01:00
Andrey Smirnov
1dffa5d996
feat: implement virtual IP operator config
Fixes #10959

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-10-24 17:37:03 +04:00
Orzelius
43b1d75375
fix: validate provisioner when destroying local clusters
Return an error when attempting to destroy a cluster that was created
with a different provisioner.

This fixes a bug where the qemu cluster state is removed without any actual
cleanup being done when running `talosctl cluster destroy` (provisioner defaults to docker).

* move the the `vm.State` logic into -> `provision.State` as it's now reused by the docker provisioner as well.
* move "cluster create" command -> "cluster create dev"
* hide the "cluster create" command from docs
* fix omni api url validation
* fix machineconfig.yaml being unnecessarily written to disk on the qemu command

Signed-off-by: Orzelius <33936483+Orzelius@users.noreply.github.com>
2025-10-24 20:55:35 +09:00
Mateusz Urbanek
c0772b8eda
feat: add airgapped mode to QEMU backed talos
Add new `--airgapped` flag to talos cluster create (qemu)
to disable NAT in the VMs to effectively become airgapped.

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-10-22 18:10:27 +02:00
Andrey Smirnov
6c98f4cdb0
feat: implement new DHCP network configuration
Fixes #11661

Fixes #10958

This also implement proper client identifier handling.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-10-21 20:51:58 +04:00
Orzelius
eccb21dd3b
feat: add presets to the 'cluster create qemu' command
* add 'iso', 'pxe', 'disk-image', 'maintenance' and 'secureboot' presets
* swith the image-factory e2e test to use the create qemu command with presets
* add a '--omni-api-endpoint' to simplify connecting machines to omni

Signed-off-by: Orzelius <33936483+Orzelius@users.noreply.github.com>
2025-10-18 14:02:32 +09:00
Andrey Smirnov
ec0a813fac
feat: unify cmdline handling GRUB/systemd-boot
Use cmdline from the UKI in Talos 1.12+ by default for new installs.

This brings GRUB in line with systemd-boot vs. cmdline behavior.

Fixes #12019

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-10-17 16:00:46 +04:00
Mateusz Urbanek
dbdd2b237e
feat: add static registry to talosctl
Fixes #11928
Fixes #11929

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-10-16 14:08:17 +02:00
Andrey Smirnov
cd9fb27434
fix: support secure HTTP proxy with gRPC dial
Most of the work is to add proper test environment for more cases.

Include a test for pulling an image

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-10-02 19:56:19 +04:00
Mateusz Urbanek
a940e45a7f
feat: generate list of images required to build talos
Add new command that takes Talos version (semver) and generates a list
of images that are used in Image Factory for building talos.

Fixes #11927

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-10-02 16:15:32 +02:00
Mateusz Urbanek
42c0bdbf32
feat: add provisioner flag to images default command
Fixes #11925

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-10-02 10:54:25 +02:00
Andrey Smirnov
7f048e962e
feat: update dependencies
Bump PKGS (Linux 6.16.9), tools, other go.mod dependencies.

Fix the linting issues.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-09-30 20:55:29 +04:00
Orzelius
65a66097a0
refactor: split cluster create logic into smaller parts
* Create the following packages under `/create`:
	- `flags` containing the pflag.Value implementations
	- `clusterops` containing the options for cluster creation
		- `configmaker` containing the logic that aids in creation of talos and provision configuration for cluster creation
			- internal `makers` and `siderolinkbuilder` packages that hide the internal logic that configmaker uses
* Remove code duplication of default values. Now all default values come from the clusterops Get functions.
* Add unit tests for flag implementations.
* Add tests that compare machine configs generated for cluster create to default configs.
	These tests also functions as snapshot tests and will asure no undesired changes pass through in the future unnoticed.

Signed-off-by: Orzelius <33936483+Orzelius@users.noreply.github.com>
2025-09-29 22:20:54 +09:00
Andrey Smirnov
493f7ed9d2
feat: support embedded config
Support embedding machine config via a virtual extension to
a fixed path.

Fixes #11824

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-09-26 16:27:53 +04:00
Mateusz Urbanek
9db6dc06c3
feat: stop mounting state partition
Fixes #11608

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-09-18 15:34:28 +02:00
Orzelius
272cb860d4
chore: drop the --input-dir flag from the cluster create command
* The flag unnecessarily complicated the logic of the dev create command
* The flag is no longer needed as machines can just me started in maintenance
  mode and the config can be applied manually

Signed-off-by: Orzelius <33936483+Orzelius@users.noreply.github.com>
2025-09-10 11:32:36 +09:00
Noel Georgi
895133de99
feat: support configuring PCR states to bind disk encryption
See 4b840414be for more information.

Talos versions prior to 1.12 locked to PCR 7 state and PCR 11 for signed policies.

In-order for backwards compatibility newer installs will still default to PCR 7 state. Locking to PCR 7 can be disabled by passing an empty list.

Fixes: #10677

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-09-05 20:08:01 +05:30
Orzelius
41af2d230c
refactor: clean up internal cluster creation code
* Split common code between `create docker` and `create qemu` commands into a helper
* Remove default value code duplication
* Enable kubeprism and cluster discovery to create qemu command

Signed-off-by: Orzelius <33936483+Orzelius@users.noreply.github.com>
2025-09-04 23:58:35 +09:00
Orzelius
3000d9e431
fix: don't bootstrap talos cluster if there's no config present
If the config is not provided to the nodes skip bootstrapping the Talos cluster.

Signed-off-by: Orzelius <33936483+Orzelius@users.noreply.github.com>
2025-09-04 23:16:36 +09:00
Dmitrii Sharshakov
9d98c2e891
feat: add a cgroup preset for PSI and --skip-cri-resolve
This flag helps debug in situations when containerd is responding slowly

Signed-off-by: Dmitrii Sharshakov <dmitry.sharshakov@siderolabs.com>
2025-09-01 19:39:50 +02:00
Noel Georgi
d635910697
chore: silence linter warnings
Silence the linter warnigs in vscode.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-08-25 22:58:21 +05:30
Orzelius
07eb4d7ec1
fix: set default ram unit to MiB instead of MB
previous logic assumed mebibytes, not megabytes.

Signed-off-by: Orzelius <33936483+Orzelius@users.noreply.github.com>
2025-08-25 22:00:41 +09:00
Orzelius
b6410914f7
feat: add human readable byte size cli flags
Add flags for memory and disk sizes where people can specify the capacity
freely in gb, mb tb etc. This change is backwards compatible and the values
without units used previously still work.

Signed-off-by: Orzelius <33936483+Orzelius@users.noreply.github.com>
2025-08-22 21:08:55 +09:00
Orzelius
f504639df4
feat: add a user-facing create qemu command
This command is the user-friendly qemu based cluster create command.
It has a new disks flag and uses the image factory for boot assets.

Also, unpersist the provisioner flag.

Signed-off-by: Orzelius <33936483+Orzelius@users.noreply.github.com>
2025-08-21 19:49:55 +09:00
Oguz Kilcan
2f5a16f5e4
fix: make --with-uuid-hostnames functionality available to qemu provider
Make --with-uuid-hostnames flag functionality available to qemu provider on `talosctl cluster create`

Signed-off-by: Oguz Kilcan <oguz.kilcan@siderolabs.com>
2025-08-20 17:24:54 +02:00
Andrey Smirnov
9c97ed886b
fix: version contract parsing in encryption keys handling
Fix issue introduced in #11532 (`main` only) with versionContract
parsing: wrong variable was returned (overwritten).

Also some small cleanups/nits (with Albert).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-08-18 15:12:54 +04:00
Mateusz Urbanek
1fc670a08d
fix: dial with proxy
Fixes #11536

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-08-18 09:53:14 +02:00
Oguz Kilcan
8817cc60cf
fix: actually use SIDEROV1_KEYS_DIR env var if it's provided
Use SIDEROV1_KEYS_DIR env var if it's provided

Signed-off-by: Oguz Kilcan <oguz.kilcan@siderolabs.com>
2025-08-15 15:27:38 +02:00
Oguz Kilcan
b08b20a100
feat: use key provider with fallback option for auth type SideroV1
Use key provider with fallback option for auth type SideroV1:
- Attempt to use $HOME/.talos/keys directory to read/remove existing PGP file if it exists or write new PGP file if directory is writable.
- Otherwise fallback to using $XDG_DATA_HOME/talos/keys directory.
- Add new talosctl flag --siderov1-key-dir (also configurable via SIDEROV1_KEYS_DIR env var) to allow customizing the directory to use for PGP keys

Update documentation to remove reference for $XDG_CONFIG_HOME for storing talosctl configuration, as it's not used anymore.

Signed-off-by: Oguz Kilcan <oguz.kilcan@siderolabs.com>
2025-08-15 13:16:25 +02:00
Orzelius
ea8289f550
feat: add a user facing docker command
Add a user facing cluster create docker command with the following changes:
* renamed flags for simplicity and uniformity
* removed the bulk of the unnecessary flags

Other changes:
* split internal logic such that it's separate from the qemu cluster create logic
* refactor internal code aiming for simplicity
Ä change drives flag behavior in anticipation of the user facing create-qemu command
* extract code into separate functions
* add some unit tests
* remove the docker support from the cluster create command (docker is only supported via the user-facing create-docker command)

Signed-off-by: Orzelius <33936483+Orzelius@users.noreply.github.com>
2025-08-15 19:45:21 +09:00
Andrey Smirnov
c079119337
chore: refactor how tools are being installed
Move stuff into `tools/go.mod`.

Also fix linting issues on the way (updating golangci-lint).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-08-14 17:45:39 +04:00
Andrey Smirnov
326a005382
feat: implement talos.config.early command line arg
Fixes #11449

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-08-01 22:41:29 +04:00
Andrey Smirnov
a5f3000f2e
feat: implement encryption locking to STATE
Fixes #10676

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-08-01 18:24:56 +04:00
Andrey Smirnov
c1e65a3425
docs: remove talos API flags from mgmt commands
Move them to be present only for `talos` subtree commands.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-08-01 16:39:57 +04:00
Andrey Smirnov
5f442159b2
feat: unify disk encryption configuration
Deprecate/hide old v1alpha1 disk encryption config, and move to
unified approach via `VolumeConfig` resource.

Allow only encryption configuration for `STATE` (for now).

Fixes #10749

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-07-24 19:08:48 +04:00
Andrey Smirnov
451c2c4c39
test: add talosctl:latest to the image cache
It is used in the Talos API from Kubernetes access test.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-07-22 16:00:59 +04:00
Andrey Smirnov
7e6052e63a
feat: increase boot partition to 2 GiB
See https://github.com/siderolabs/talos/discussions/10994

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-07-22 14:48:00 +04:00
Mateusz Urbanek
9920da3e1a
feat: add etcd downgrade API
Fixes #11058

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2025-07-16 15:33:51 +02:00
Noel Georgi
35b45ae6e7
feat(talosctl): support tpm operation on mac
Support TPM operations when developing on Mac.

`brew install swtpm` is all that is needed.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2025-07-11 22:28:59 +05:30