16 Commits

Author SHA1 Message Date
Artem Chernyshev
0cdb5a58c8
feat: support raw bytes in the inline fields for manifests/patches
Now inline supports all three variants:
- a single inline map (backward compatibility for config patches).
- a list of inline maps
- raw bytes, that can also contain multiple documents.

`omnictl cluster template export` command was updated to export config
patches/manifests as raw bytes to ensure that multiple values are
properly supported.

Fixes: https://github.com/siderolabs/omni/issues/2683

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2026-04-30 19:07:46 +03:00
Artem Chernyshev
78544a8557
feat: restrict directories for included files in the cluster templates
By default only allow to include files from the same directory where the
template file lives.
This is to prevent malicious cluster templates that include something
like `/etc/passwd`.
Fixes: https://github.com/siderolabs/omni/issues/2590

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2026-04-16 19:28:33 +03:00
Artem Chernyshev
6efb0f2f0a
feat: support Kubernetes manifests in the cluster templates
Fixes: https://github.com/siderolabs/omni/issues/2172

Leverage kubernetes manifest resources and expose them through cluster
templates.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2026-03-26 14:10:14 +03:00
Artem Chernyshev
0573893737
feat: support setting upgrade parallelism in templates and UI
Fixes: https://github.com/siderolabs/omni/issues/2425

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2026-03-04 13:57:26 +03:00
Artem Chernyshev
f8a42eeb04
chore: move graceful upgrades to the lowest level
Rewrite `TalosUpgradeStatus` controller to use the completely different
flow:
- update all `ClusterMachineTalosVersion` resources immediately.
- to control quotas and rollout sequence use `UpgradeRollout` resource,
  it has a single field which is a map of MachineSetName -> Current
  Quota:
  - if control plane is updating it sets quota 0 on all other machine
    sets.
  - the number of not running/unhealthy machines is subtracted from the
    quota.
  - quota is now copied from the new `UpgradeStrategy`, so it's possible
    to have more than one machine updated in parallel.
- `ClusterMachineConfigStatus` controller now adds a new finalizer for
  upgrades on all `ClusterMachines` which are currently being updated to
  acquire/release locks and reads quotas from the `UpgradeRollout`.

Fixes: https://github.com/siderolabs/omni/issues/2393

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2026-03-03 20:02:59 +03:00
Utku Ozdemir
01bf663854
feat: support kernel args management in cluster templates
Implement kernel args support in cluster templates.

Managing kernel args via templates is opt-in: only and only if the `kernelArgs` YAML key is defined on a `Cluster`, `ControlPlane`, `Worker` or `Machine`, the matching `KernelArgs` resource will be created/updated.

Lower levels override higher levels (Cluster -> MachineSet -> Machine).

Unlike other cluster template managed resources, they will never be destroyed, i.e, when they are removed from a template (removed completely, as in, `kernelArgs` key doesn't exist) or when `omnictl cluster template delete` is run. They instead will get updated to have the annotation `omni.sidero.dev/managed-by-cluster-templates` removed from them.

Add the new flag `--include-kernel-args` to the `omnictl cluster template export` command to optionally include them in the exported template. Note: when this flag is set, `kernelArgs` key is always included at per-machine level, not pulled up even if they are the same for all machines in a machine set or a cluster.

Update the frontend, specifically the kernel args update screen to warn the user if kernel args for that machine is managed by templates, similar to what we do for clusters.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2026-01-07 12:48:53 +01:00
Utku Ozdemir
535d733ea6
chore: drop migrations older than v1.1.0
Drop old migrations and deprecated types which were kept only for the migrations.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2026-01-06 14:50:11 +01:00
Utku Ozdemir
049ab877e9
chore: revert 'feat: add support for updating kernel args'
Some checks failed
chromatic / Run chromatic (push) Has been cancelled
default / default (push) Has been cancelled
default / e2e-backups (push) Has been cancelled
default / e2e-cluster-import (push) Has been cancelled
default / e2e-forced-removal (push) Has been cancelled
default / e2e-omni-upgrade (push) Has been cancelled
default / e2e-scaling (push) Has been cancelled
default / e2e-short (push) Has been cancelled
default / e2e-short-secureboot (push) Has been cancelled
default / e2e-templates (push) Has been cancelled
default / e2e-upgrades (push) Has been cancelled
default / e2e-workload-proxy (push) Has been cancelled
default / integration-test (push) Has been cancelled
default / lint (push) Has been cancelled
default / unit-tests (push) Has been cancelled
This reverts commit ae9d7cca4b3ef2c5923cc6476042a575d4158eee.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2025-10-14 18:40:58 +02:00
Utku Ozdemir
ae9d7cca4b
feat: add support for updating kernel args
Allow updating kernel args, similar to the set of extensions.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2025-10-08 12:08:53 +02:00
Utku Ozdemir
74a9ad36f4
fix: make cluster validations consistent between templates and UI
Some checks failed
default / default (push) Has been cancelled
default / e2e-backups (push) Has been cancelled
default / e2e-forced-removal (push) Has been cancelled
default / e2e-scaling (push) Has been cancelled
default / e2e-short (push) Has been cancelled
default / e2e-short-secureboot (push) Has been cancelled
default / e2e-templates (push) Has been cancelled
default / e2e-upgrades (push) Has been cancelled
default / e2e-workload-proxy (push) Has been cancelled
Move the cluster validations which do not require server-side information (access to resources) to a common place.

Use this new validator both from the server side validations and from the cluster templates validations.

This makes the validations consistent, resolving the inconsistency where cluster names (ID) were validated on templates but not by the server.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2025-05-19 12:24:04 +02:00
Artem Chernyshev
ff0323373e
fix: remove machine set allocation source option
Some checks are pending
default / default (push) Waiting to run
default / e2e-backups (push) Blocked by required conditions
default / e2e-forced-removal (push) Blocked by required conditions
default / e2e-scaling (push) Blocked by required conditions
default / e2e-short (push) Blocked by required conditions
default / e2e-short-secureboot (push) Blocked by required conditions
default / e2e-templates (push) Blocked by required conditions
default / e2e-upgrades (push) Blocked by required conditions
default / e2e-workload-proxy (push) Blocked by required conditions
This option is redundant. It was inteded for MCP, but the MCP
implementation will not be using it, so we should stop dragging it along
anymore.

This change was extracted from https://github.com/siderolabs/omni/pull/723

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2025-04-29 22:03:14 +03:00
Artem Chernyshev
8e4872393e
feat: support attaching machine sets to a machine request sets
With that it becomes possible to get the machines from the machine
request sets instead of the machine classes.

This opens the way for automated machine provisioning.
Fixes: https://github.com/siderolabs/omni/issues/595

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2024-09-19 17:29:42 +03:00
Utku Ozdemir
e3d46f949c
feat: implement compression of config fields on resources
Add compression support.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2024-09-11 14:48:57 +02:00
Utku Ozdemir
331fc31984
feat: run embedded discovery service in Omni
Run a discovery service instance inside Omni (enabled by default).

It listens only on the SideroLink interface on port 8093.

Clusters can opt in to use this embedded discovery service instead of the `discovery.talos.dev`. It is added as a new cluster feature both on frontend and in cluster templates.

Closes siderolabs/omni#20.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2024-06-06 01:11:17 +02:00
Artem Chernyshev
2107c0195b
feat: support setting extensions list in the cluster template
Fixes: https://github.com/siderolabs/omni/issues/45

Introduced new resource type `ExtensionsConfiguration` that allows
setting machine extensions list.

`SchematicConfiguration` is now readonly and is created by
`SchematicConfigurationController` from `ExtensionsConfiguration`
resource. It also ensures that schematic exists in the image factory by
calling the API.

This change is required to simplify the flow in the cluster templates
(no need to call `CreateSchematic` for each resource).

Export command support added as well.
Added cleanup hooks for the `ExtensionsConfiguration` for machine set, machine and cluster levels.

Changed the resource format to use `labels` instead of `target`. Now
it's the same as for config patches, except it doesn't merge several
resources, but gets the first one.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2024-03-27 17:11:20 +03:00
Andrey Smirnov
dfcbaae7d0
chore: initial commit
Omni is source-available under BUSL.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
Co-Authored-By: Artem Chernyshev <artem.chernyshev@talos-systems.com>
Co-Authored-By: Utku Ozdemir <utku.ozdemir@siderolabs.com>
Co-Authored-By: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
Co-Authored-By: Philipp Sauter <philipp.sauter@siderolabs.com>
Co-Authored-By: Noel Georgi <git@frezbo.dev>
Co-Authored-By: evgeniybryzh <evgeniybryzh@gmail.com>
Co-Authored-By: Tim Jones <tim.jones@siderolabs.com>
Co-Authored-By: Andrew Rynhard <andrew@rynhard.io>
Co-Authored-By: Spencer Smith <spencer.smith@talos-systems.com>
Co-Authored-By: Christian Rolland <christian.rolland@siderolabs.com>
Co-Authored-By: Gerard de Leeuw <gdeleeuw@leeuwit.nl>
Co-Authored-By: Steve Francis <67986293+steverfrancis@users.noreply.github.com>
Co-Authored-By: Volodymyr Mazurets <volodymyrmazureets@gmail.com>
2024-02-29 17:19:57 +04:00