20 Commits

Author SHA1 Message Date
Oguz Kilcan
1b7fa208d4
fix: correct SQLite size metrics to include indexes and freelist
Table size queries (`omni_sqlite_subsystem_size_bytes`) filtered by dbstat name, missing index sizes. Join with sqlite_master to attribute index pages to their parent table.

DB size (`omni_sqlite_db_size_bytes`) used dbstat sum which excludes freelist pages. Use page_count * page_size to match actual file size.

Add `omni_sqlite_db_freelist_size_bytes` metric to track wasted space.

Signed-off-by: Oguz Kilcan <oguz.kilcan@siderolabs.com>
(cherry picked from commit e85ab384c343ca26987ce65ca1f9f4a9ee7d2361)
2026-03-18 18:00:24 +03:00
Oguz Kilcan
72cb85a4ff
feat: add configurable bandwidth rate limiting for SideroLink tunnel
Introduce token-bucket based bandwidth rate limiting for the SideroLink WireGuard tunnel, configurable via services.siderolink.bandwidthLimitMbps and services.siderolink.bandwidthLimitBurstBytes config fields (with corresponding CLI flag fallbacks).
Rate limiting is applied in both directions: outbound via a wrapped conn.Bind and inbound via a TUN input packet filter. A shared limiter drops packets exceeding the budget, relying on TCP congestion control to throttle senders. Disabled by default (0 = unlimited).

Also adds a Grafana service to docker-compose with pre-built Omni dashboards for local development observability.

Signed-off-by: Oguz Kilcan <oguz.kilcan@siderolabs.com>
2026-03-12 11:20:57 +01:00
Edward Sammut Alessi
a566261b91
feat(frontend): allow specifying date range for audit logs
Replace the audit log download button with a modal which includes a date range for filtering to keep file sizes down. Includes a warning if trying to download logs for longer than 7 days. Modal includes a bytes downloaded indicator to convey progres. Download is canceled if modal is closed.

Signed-off-by: Edward Sammut Alessi <edward.sammutalessi@siderolabs.com>
2026-03-10 11:23:21 +01:00
Edward Sammut Alessi
d3ae77c0cc
chore: bump copyright to 2026
Bump copyright for conformance to 2026

Signed-off-by: Edward Sammut Alessi <edward.sammutalessi@siderolabs.com>
2026-01-21 15:30:49 +01:00
Edward Sammut Alessi
8f6d017077
chore: bump node to 24.13
Bump node to 24.13 to address CVEs https://nodejs.org/en/blog/vulnerability/december-2025-security-releases

Signed-off-by: Edward Sammut Alessi <edward.sammutalessi@siderolabs.com>
2026-01-15 16:33:56 +01:00
Utku Ozdemir
9bf690ef2e
refactor: do SQLite migrations unconditionally, rework the config flags
Remove the flags for turning on SQLite storage for:
- Discovery service state
- Audit logs
- Machine logs

Instead, migrate them unconditionally to SQLite on the next startup.

Remove many flags which are no longer meaningful. Only keep the ones which are required for the migrations.

Additionally: Make the `--sqlite-storage-path` (or its config counterpart `.storage.sqlite.path`) required with no default value, as a default value does not make sense for it in most of the cases.
Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2025-12-12 12:47:04 +01:00
Edward Sammut Alessi
9d3ae445d2
chore(frontend): update node to latest lts
Update the node version used by the frontend to the latest LTS version 24.11.0

Signed-off-by: Edward Sammut Alessi <edward.sammutalessi@siderolabs.com>
2025-10-29 11:59:37 +01:00
Edward Sammut Alessi
ef6584f951
chore(frontend): update dependencies
Update frontend dependencies

Signed-off-by: Edward Sammut Alessi <edward.sammutalessi@siderolabs.com>
2025-10-08 21:25:17 +02:00
Edward Sammut Alessi
9521b30294
chore: switch from bun to node
Some checks are pending
default / default (push) Waiting to run
default / e2e-backups (push) Blocked by required conditions
default / e2e-cluster-import (push) Blocked by required conditions
default / e2e-forced-removal (push) Blocked by required conditions
default / e2e-omni-upgrade (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
Switch from bun to node. Also replaces bun test with vitest. Updated apexcharts to satisfy peerDependencies and removed unused dependencies. Fixed type issues that were being silently missed in the previous setup.

Fixes #1398

Signed-off-by: Edward Sammut Alessi <edward.sammutalessi@siderolabs.com>
2025-08-07 19:50:03 +02:00
Artem Chernyshev
88f5116301
chore: run inspector in the dev docker-compose
Some checks are pending
default / default (push) Waiting to run
default / e2e-backups (push) Blocked by required conditions
default / e2e-cluster-import (push) Blocked by required conditions
default / e2e-forced-removal (push) Blocked by required conditions
default / e2e-omni-upgrade (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
The inspector will start on `0.0.0.0:12000` if the compose is started
`WITH_DEBUG=true`.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2025-07-25 14:50:28 +03:00
Utku Ozdemir
77ab722294
chore: rekres, bump Go, regenerate, fix docker-compose targets
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
The docker-compose targets were missing recently added `GOMOCK_VERSION` env var.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2025-03-27 11:31:50 +03:00
Utku Ozdemir
1e721e57c8
feat: cleanup orphan config patches
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
User-owned config patches are only deleted when the resource they are assigned to (cluster/machine set/cluster machine/machine) is deleted.

This causes some dangling/orphan config patches to accumulate over time - namely the patches with no matching owner.

Implement a controller to clean them up after some period of time.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2025-03-11 14:07:32 +01:00
Artem Chernyshev
ed946b30a6
feat: display OMNI_ENDPOINT in the service account creation UI
Fixes: https://github.com/siderolabs/omni/issues/858

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2025-01-29 15:27:36 +03:00
Artem Chernyshev
b3dc48ad33
chore: bump dependencies
Some checks are pending
default / default (push) Waiting to run
default / e2e-backups (push) Blocked by required conditions
default / e2e-scaling (push) Blocked by required conditions
default / e2e-short (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
Bump go, JS deps. Container images.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2024-10-22 20:07:26 +03:00
Dmitriy Matrenichev
d194d59be8
feat: implement audit log
This PR implements audit logs. To enable it you have to set the `--audit-log-dir` flag
to a directory where the audit logs will be stored. The audit logs are stored in a JSON format.

Example:
```json
{"event_type":"update","resource_type":"PublicKeys.omni.sidero.dev","event_ts":1722537710182,"event_data":{"user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36","ip_address":"<snip>","user_id":"a19a7a38-1793-4262-a9ef-97bc00c7a155","role":"Admin","email":"useremail@userdomain.com","confirmation_type":"auth0","fingerprint":"15acb974f769bdccd38a4b28f282b78736b80bc7","public_key_expiration":1722565909}}
```

Keep in mind that `event_ts` are in milliseconds instead of seconds.
Field `event_data` contains all relevant information about the event.

To enabled it in the development environment you will have to add the
`--audit-log-dir /tmp/omni-data/audit-logs` line to `docker-compose.override.yml`
or run `generate-certs` again.

For #37

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-08-02 03:15:31 +03:00
Artem Chernyshev
60355b61be
test: run prometheus in tests and check metrics after talemu tests
Make the tests fail if the metrics do not meet the expected thresholds.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2024-07-29 17:45:34 +03:00
Artem Chernyshev
ad74f85279
chore: bump deps
Bump vault container version in the compose script.
Bump auth0 and uuid lib versions in the `package.json`.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2024-07-24 21:04:06 +03:00
Artem Chernyshev
3bab8bf089
chore: migrate to Vite and Bun to build the frontend
Dropped some dependencies which no longer worked:

- monaco-editor-vue3 - replaced with a tiny wrapper.
- polyfill for streaming classes - replaced with vite plugin for
  polyfills.
- buffer - replaced base64 encoding with calls from the `fetch.pb.ts`.

Dropped the code that sets up monaco in `main.ts` in favor of Vite
monaco plugin that does that for you.

Updated `monaco-yaml` as the old version didn't work with Vite.

Switched from `Jest` to `bun:test`.

Use TypeScript in the tailwind config, as it imports `colors.ts` now.
Had to use TypeScript for `colors` as Vite can't import CommonJS
modules.

Add eslint linter to the `lint` dependencies, enable a bit more linters
and fix all detected errors.

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

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
2024-06-06 18:40:07 +03:00
Dmitriy Matrenichev
d3e3eef0fa
chore: support WG over GRPC in Omni
This PR adds the support for WG over GRPC. New field `VirtualAddrport`
in `SiderolinkSpec` should allow for both
setting the virtual addr and loading it after the Omni restart.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-04-10 18:50:49 +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