6 Commits

Author SHA1 Message Date
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
ada0360837
feat: add a way to sync Kubernetes manifests in Omni
Manifests support two modes:
- `FULL` - Omni will keep the manifest in sync always.
- `ONE_TIME` - Omni will apply the manifest only if it doesn't exist. If the manifest is removed by hand and then changed in Omni it will be applied too.

Manifests are applied using service side apply, Omni now has three inventories: `omni-internal-inventory`, `omni-user-inventory` and `omny-sync-one-time`:

- User inventory will be used for user managed manifests.
- Internal one will be used for the manifests which are created by Omni controllers (workloadproxy, advanced healtcheck service).
- One time inventory is used with NoPrune enabled. If the manifest is
  applied it's just removed from the list of applied manifests: that
  ensures that manifests changes are not going happen.

Manifests also support setting namespace to all namespaced resources. It might be useful for the huge manifest files which are supplied without the namespace (similar to `kubectl apply -n namespace -f manifest.yaml`).

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2026-03-23 15:29:49 +03:00
Artem Chernyshev
36c20175e6
fix: ignore labeled MachineSetNodes in the export and sync CLI cmds
Now as `MachineSetNodes` are no longer ever owned by the
`MachineSetNodeController` and marked with
`managed-by-machine-set-node-controller` label instead, CLI tools should
properly handle that and ignore such `MachineSetNodes` during export and
cluster sync.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2025-12-23 20:39:19 +03:00
Artem Chernyshev
e60c82116b
test: add more tests for the frontend API
Additionally verify it in the integration tests, not only in the unit
tests.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2025-10-17 15:50:57 +03:00
Utku Ozdemir
7c19c318e8
test: improve workload proxying tests
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
Add many more services and test scenarios to the workload proxying feature:
- Use two clusters, a 1+1 and a 1+2.
- Use multiple nginx workloads.
- Each workload serving its name in its `index.html` and it being asserted (i.e., we assert that we hit the correct service).
- Multiple exposed services per workload.
- Multiple parallel requests per exposed service.
- Toggle the feature off and on, assert service accessibility.
- Toggle an exposed service off and on by removing/readding the k8s service annotation, assert accessibility.
- Test explicit prefixes.

Additionally:
- Fix two bugs in workload services:
  - Check the cookies before returning 404 for a non-existing exposed service prefix.
  - Add timeouts to `inmem` proxy transport, so requests do not potentially hang forever.
- Bring back the logic the saving of a support bundle when an integration test fails, and fix its save path.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2025-06-04 17:41:30 +02:00
Artem Chernyshev
c9c4c8e10d
test: use go test to build and run Omni integration tests
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
All test modules were moved under `integration` tag and are now in
`internal/integration` folder: no more `cmd/integration-test`
executable.

New Kres version is able to build the same executable from the tests
directory instead.

All Omni related flags were renamed, for example `--endpoint` ->
`--omni.endpoint`.

2 more functional changes:

- Enabled `--test.failfast` for all test runs.
- Removed finalizers, which were running if the test has failed.

Both of these changes should make it easier to understand the test
failure: Talos node logs won't be cluttered with the finalizer tearing
down the cluster.

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

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2025-06-03 15:07:00 +03:00