Commit Graph
41 Commits
Author SHA1 Message Date
Dario Tranchitella 3230a70475 feat(migration): enhancements and customisable timeout (#845)
* feat(migration): customising timeout via tcp annotation

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>

* docs: customising migration timeout via tcp annotation

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>

* fix(migrate): delete job in case of timeout change

This will delete the failed job due to an incorrect timeout and performs
the creation of a new object rather than updating it, since its
immutability in the API specification.

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-06-20 19:32:49 +02:00
Dario Tranchitella 32ef65820d feat: toggable cleanup schema prior migration (#840)
* feat(migration): cleanup prior migration

When using the annotation `kamaji.clastix.io/cleanup-prior-migration`
with a true boolean value, Kamaji will perform a clean-up on the target
DataStore to avoid stale resources when back and forth migrations occur.

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>

* docs: cleanup prior migration

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-06-13 08:06:24 +02:00
Dario Tranchitella eeb12c232b feat(metrics): exposing resource handlers time bucket (#836)
* refactor: static names and avoiding clash

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>

* feat(metrics): exposing resource handlers time bucket

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-06-10 17:28:10 +02:00
Dario Tranchitella b2ec531183 chore(go): upgrading to 1.24 (#766)
* chore(go): upgrading to 1.24

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>

* chore(ci): building golanci-lint from source

* chore(golangci-lint): aligning to v2 release

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-04-01 21:09:46 +02:00
Johann Wagner 899da1aec4 fix: evaluate all conditions of a migration job to find out if completed (#706) 2025-02-28 16:17:20 +01:00
Dario Tranchitella 2b17282b0e chore(go): bumping up to go1.23 (#643)
* chore(go): bumping up to go1.23

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>

* chore(golangci-lint): bumping up to v1.62.2

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-12-01 16:09:26 +01:00
Dario Tranchitella b334ea59f1 fix: retrying datastore finalizer removal (#631)
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-11-12 10:48:11 +01:00
Simon KienzlerandDario Tranchitella 8b71843325 feat: make datastore schema (prefix) configurable (#554)
* feat: Add DataStoreSchema field to TCP spec

* feat: Read DB_SCHEMA from TCP spec field

* feat: Default DataStoreSchema in webhook

* fix: Catch unsetting the dataStore via CEL

* fix: Apply all patches, not only the first

This also includes converting OnUpdate() to a no-op, as the
existence and immutability of the fields are already checked
by the API server, thanks to kubebuilder markers.

The webhook ensures that fields like dataStore, dataStoreSchema
are defaulted during creation (if unset), and the CEL expressions
prohibit unsetting them during update.

* test: Add tests for defaulting webhook

* fix: typo

* fix: Linter issues

* fix: make apidoc

* Update TCP CRD in charts folder

* fix: Don't run E2E tests during `make test`

* fix: Use proper `metav1` import name

* feat: Handle updates of TCPs without dataStoreSchema (+ tests)

* fix: Prioritize Status over Spec

Co-authored-by: Dario Tranchitella <dario@tranchitella.eu>

* Update goDoc on DataStore field

* make apidoc

---------

Co-authored-by: Dario Tranchitella <dario@tranchitella.eu>
2024-10-02 17:33:28 +02:00
Dario Tranchitella 65ffdf8e3a chore!: ko support for container image build (#560)
* feat(chore): migrating to ko

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>

* chore(helm): avoiding hard-coded command

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>

* chore(go)!: avoiding hard-coded command

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-08-29 15:30:49 +02:00
Dario Tranchitella 511a08889e fix: nil pointer in datastore certificate handler
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-05-31 12:04:28 +02:00
Dario Tranchitella d1910cd389 fix(nats): blocking reconciliation for missing multi-tenancy
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-05-09 16:55:01 +02:00
TheCodeAssassinandDario Tranchitella 9ce8da0b37 feat: making DataStore TLS configuration optional
Co-authored-by: Dario Tranchitella <dario@tranchitella.eu>
2024-05-09 11:34:50 +02:00
TheCodeAssassin 28a098af21 feat: initial support for NATS as Datastore (#442) 2024-04-22 15:31:35 +02:00
Dario Tranchitella 755cc5bacd refactor(golangci-lint): aligning to new linters
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2023-12-15 13:02:49 +01:00
Dario Tranchitella 045c5bbd7c fix(migrate): preventing 63 characters pod name limit
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2023-12-12 12:24:22 +01:00
Dario Tranchitella 0f1a4f28de fix: blocking datastore secret deletion with finalizer 2023-09-29 10:56:28 +02:00
Dario Tranchitella 7e94ecdbab feat: kubeconfig and certificates rotation 2023-08-03 18:03:54 +02:00
Dario Tranchitella abcc662c96 fix(datastore): replacing dash with underscore 2023-07-05 22:20:55 +02:00
Dario Tranchitella a8a41951cb refactor!: keeping labels consistent
The label kamaji.clastix.io/soot is deprecated in favour of
kamaji.clastix.io/name, every external resource referring to this must
be aligned prior to updating to this version.
2023-02-13 11:24:36 +01:00
Dario Tranchitella a0485c338b refactor(checksum): using helper functions 2023-02-10 15:31:28 +01:00
Dario Tranchitella 830d86a38a feat: introducing enqueueback reconciliation status
Required for the changes introduced with 74f7157e8b
2023-02-06 22:12:50 +01:00
Dario Tranchitella beebaf0364 fix(storage): wrong variable while assigning finalizers 2022-12-20 20:45:09 +01:00
Dario Tranchitella 7db8a64bdd fix(etcd): using stored username for cert common name 2022-12-19 16:28:48 +01:00
Dario Tranchitella 18c60461e5 refactor: conforming finalizers management 2022-12-16 22:44:42 +01:00
Dario Tranchitella 28c47d9d13 refactor: moving migrate webhook handling from tcp to soot manager 2022-12-12 16:22:36 +01:00
Dario Tranchitella 68006b1102 fix(datastore): coalesce for storage configuration 2022-12-11 21:39:36 +01:00
Dario Tranchitella e25f95d7eb feat(migrate): making image configurable 2022-12-08 14:33:20 +01:00
Dario Tranchitella 723fef5336 feat(migrate): injecting webhook into tcp 2022-12-08 14:13:45 +01:00
Dario Tranchitella 8d1d8598c1 refactor: moving datastore migrate resource to its module 2022-12-08 14:13:45 +01:00
Dario Tranchitella 0c415707d7 fix(datastore): not deleting database content upon certificates change 2022-12-03 12:04:04 +01:00
Dario Tranchitella 7a6b0a8de3 fix(datastore): ensuring to update status upon any change 2022-12-03 12:04:04 +01:00
Dario Tranchitella c17a31ef82 fix: avoiding collision of datastore schemes 2022-11-29 18:25:52 +01:00
Dario Tranchitella 0d607dfe5d refactor: adding finalizer upon datastore setu 2022-11-27 17:26:34 +01:00
Dario Tranchitella df8ca7c1d1 refactor: checksum for configmap and secret data 2022-09-12 09:38:36 +02:00
Dario Tranchitella 65519d4f22 refactor: using kamaji prefix for checksum annotation 2022-09-12 09:38:36 +02:00
Dario Tranchitella 41eddc0462 refactor(crypto): eliminating bloated certs functions 2022-09-12 09:38:36 +02:00
Dario Tranchitella b7adb314ad refactor: logging errors with stacktrace
Using the log facade and logging the error directly in the resource
handler we're getting a more detailed overview of the errors, along with
other metadata useful to understand quicker where the reconciliation
failed.
2022-09-12 09:38:36 +02:00
Dario Tranchitella 00ea4a562d refactor: moving cert functions to datastore resource 2022-09-12 09:38:36 +02:00
Dario Tranchitella 2a33844c68 refactor(utilities): decreasing bloating functions 2022-09-12 09:38:36 +02:00
Dario Tranchitella d59f494a69 feat: support for tcp specific data store 2022-08-30 16:22:06 +02:00
Dario Tranchitella 1ddaeccc94 feat: storage homogeneity 2022-08-27 15:16:31 +02:00