7 Commits

Author SHA1 Message Date
Utku Ozdemir
98ef83ee42
fix: fix config patches encryption when encryption is disabled
When the resource compression was disabled in the Omni config, we were not generating the ClusterMachineConfigPatches correctly.

The issue was: it was attempting to "force-compress" the ClusterMachineConfigPatches when any of the patches' size was above the threshold. But when it was trying to do that, it did not override the global setting of false.

The default setting for resource compression is `true`, but when a config file is used to configure Omni, and it was not specified in the config YAML, it was getting overwritten to be `false` due to the boolean merging behavior, which was fixed in https://github.com/siderolabs/omni/pull/2150.

Also: fix the compression kicking in even in cases when it is disabled in config but above the threshold.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2026-01-26 19:04:21 +01:00
Pranav Patil
de6e2c66f7
refactor: make namespace implicit in omni resources
Refactor for code simplicity.

Signed-off-by: Pranav Patil <pranavppatil767@gmail.com>
Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2026-01-12 12:54:11 +01:00
Andrey Smirnov
75a9f3ee9f
feat: use sqlite as secondary resource storage
This pulls in https://github.com/cosi-project/state-sqlite/pull/2

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

See https://github.com/siderolabs/omni/issues/1768

Sample migration logs:

```
2025-11-05T11:18:47.340Z        ESC[34mINFOESC[0m       omni/state_sqlite.go:122        migrated resources from BoltDB to SQLite        {"namespace": "metrics"
, "type": "EtcdBackupOverallStatuses.omni.sidero.dev", "count": 1}
2025-11-05T11:18:47.340Z        ESC[34mINFOESC[0m       omni/state_sqlite.go:122        migrated resources from BoltDB to SQLite        {"namespace": "metrics"
, "type": "EtcdBackupStatuses.omni.sidero.dev", "count": 0}
2025-11-05T11:18:47.342Z        ESC[34mINFOESC[0m       omni/state_sqlite.go:122        migrated resources from BoltDB to SQLite        {"namespace": "metrics"
, "type": "MachineStatusLinks.omni.sidero.dev", "count": 2}
2025-11-05T11:18:47.342Z        ESC[34mINFOESC[0m       omni/state_sqlite.go:67 removed old BoltDB database after migration     {"path": "_out/secondary-storag
e/bolt.db"}
```

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2025-11-05 15:40:24 +04:00
Dmitriy Matrenichev
b519c6c571
chore: migrate ConfigPatches above threshold of 2048
Change `SetUncompressedData` methods to respect `compressionThresholdBytes` from
`internal/backend/runtime/omni/state_etcd.go` while we are at it.

Fix len(data) == 0 != nil bug.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
Co-authored-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2025-03-05 18:55:47 +03:00
Dmitriy Matrenichev
0cda77bbce
chore: bump Go and rekres
Run rekres, update Go version and update all files affected by linters.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2025-02-14 12:31:38 +03:00
Utku Ozdemir
920858754e
chore: bump Go, dependencies, rekres, regenerate
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
Bring things to their latest versions.

Signed-off-by: Utku Ozdemir <utku.ozdemir@siderolabs.com>
2025-01-15 14:32:45 +01: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