173 Commits

Author SHA1 Message Date
Dario Tranchitella
01e07ab411 feat: kubernetes 1.35 support (#1038)
* feat: supporting k8s v1.35

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

* feat: upgrading deployment also in sleeping mode

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

* feat(deps): bumping ko to v0.18.1

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

* feat(deps): bumping controller-gen to v0.20.0

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

* chore(crds): aligning to k8s v1.35

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

* docs: alinging to k8s v1.35

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

* test: upgrading to k8s 1.35

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

* feat(helm): updating artifact hub changes

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-12-20 12:06:48 +01:00
Léonard Suslian
d3fb03a752 feat: add support for multiple Datastores (#961)
* feat: add support for multiple Datastores

* docs: add guide for datastore overrides

* feat(datastore): add e2e test for dataStoreOverrides

* ci: reclaim disk space from runner to fix flaky tests
2025-12-12 12:10:02 +01:00
Alfredo Suarez
880b36e0fa feat: gateway api support (#1000)
* Feat: Gateway Routes Specs, plus resource and status init progress

* Generated content, RBAC and start of e2e

* latest code POC Working but e2e fails

* Use Gateway API v1.2.0

* Remove draft comment

* Use TCPRoute

* Revert the charts folder to reduce noise

* Use the correct controller-gen version

* Rename fields and fix tcp/tls typos

* Rename TLSRouteSpec to GatewayRouteSpec

* Remove last instance of tcproute

* Renaming more fields to match the gateway api naming

* Remove ownership of the gateway

* Revert Ko to 0.14.1 and makefile comments

* service discovery, webhooks, and deadcode removal.

* add conditional check for gateway api resources and mark is as owned!

* removing duplicated code and note for maybe a refactor later

* E2E now works!

* e2e suite modifications to support Gateway API v1alpha2 TLSRoute

* Suggestions commit, naming and other related.

* First pass at the status update

* Rename route to gateway

* Only allow one hostname in gateway

* Update status types

* WIP: testing conditions

* Update status API

* Add tests

* Detect endpoint

* Update manifests

* Remove old code and use proper condition check

* Fix compilation error

* Watch the Gateway resources

* Rename fields

* Add missing port

* Add ingress endpoint to the kubeadm

* Error if access points are empty

* Check the spec and status to delay the creation of the kubeadm

* Use the spec for the hostname

* Update api/v1alpha1/tenantcontrolplane_types.go

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

* PR fixes, CEL k8s validations, proper status updates checks

* more context and separation of functions

* resolve all pr comments, with indexer

* merge master - go {sum,mod} updates dependabot

* Feat: Gateway Routes Specs, plus resource and status init progress

* Use Gateway API v1.2.0

* merge master - go {sum,mod} updates dependabot

* sum go mod tidy

* leftover comments

* clean go.sum

* fix: missing generated crds spec

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

* docs: gateway api support

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

* golint comments

* linting and test fix.

* Gateway API resource watching was made conditional to prevent crashes when CRDs are absent, and TLSRoute creation now returns an error when the service isn't ready instead of creating invalid resources with empty rules.

* unit test was incorrect after all the fixes we did, gracefull errors are not expected due to conditional adds

* fix(conditional-indexer): Gateway Indexer should also be conditional

* fix(conditional-indexer): Gateway Indexer should also be conditional

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
Co-authored-by: Hadrien Kohl <hadrien.kohl@gmail.com>
Co-authored-by: Dario Tranchitella <dario@tranchitella.eu>
2025-11-26 10:34:09 +01:00
Dario Tranchitella
081b4c72b3 feat: additional service ports (#999)
* feat: additional service ports

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

* docs: additional service ports

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-10-30 13:22:15 +01:00
Timofei Larkin
8d25078c47 feat: don't clobber 3rd-party labels (#992)
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-10-17 17:35:20 +02:00
Dario Tranchitella
de459fb5da feat!: write permissions (#937)
* fix: decoding object only if requested

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

* feat(api): limiting write permissions

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

* feat: write permissions handlers, routes, and controller

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

* docs: write permissions

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-10-03 14:30:58 +02:00
Loïc Brun
285cef0f02 fix(konnectivity): rotate certicate during certificate authority rotation (#976) 2025-10-02 16:17:59 +02:00
dependabot[bot]
b0faf7d31e feat(deps): bump sigs.k8s.io/controller-runtime from 0.22.0 to 0.22.1 (#953)
* feat(deps): bump sigs.k8s.io/controller-runtime from 0.22.0 to 0.22.1

Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.22.0 to 0.22.1.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.22.0...v0.22.1)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-version: 0.22.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(golangci-lint): apply is no more deprecated

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dario Tranchitella <dario@tranchitella.eu>
2025-09-11 15:25:42 +02:00
Dario Tranchitella
17869a4e0f fix(controller-manager): supporting extra args override (#959)
* fix(controller-manager): supporting extra args override

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

* chore: removing deprecated intstr.FromInt usage

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-09-10 14:23:32 +02:00
Dario Tranchitella
2a7749839e feat!: inflecting version for konnectivity components from tcp (#934)
* feat(api)!: inflecting version for konnectivity components from tcp

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

* feat: inflecting version for konnectivity components from tcp

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

* docs(konnectivity): warning about missing container artefacts

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-09-10 12:19:33 +02:00
Dario Tranchitella
1a0858d350 fix: konnectivity logs and nil pointer dereference (#951)
* fix(konnectivity): avoiding nil pointer reconcile for agent

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

* fix(log): ignoring not found errors for konnectivity cleanup

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-09-07 11:02:44 +02:00
Dario Tranchitella
e2a0648989 fix: default values for schema and username (#941)
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-09-05 15:32:10 +02:00
Dario Tranchitella
4a474d5749 fix: handling create or update for patch resources (#942)
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-09-05 09:42:17 +02:00
Dario Tranchitella
b9fee273eb fix: patching of kube-proxy and coredns advanced objects (#940)
* fix(coredns): using patch for deployment and service reconciliation

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

* feat(kubeproxy): using patch for daemonset reconciliation

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-09-04 16:56:09 +02:00
Mateusz Kwiatkowski
f52fe45c46 feat: add hostNetwork support for the Konnectivity Agent (#883)
This commit extends CRD API: Added hostNetwork field to KonnectivityAgentSpec struct.
It's false by default so it's backwards compatible.

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-07-30 22:31:38 +02:00
Dario Tranchitella
5e68fd8fe0 fix: honouring certificate expiratin threshold (#886)
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-07-28 09:40:16 +02:00
Philipp Riederer
0990317595 feat!: support setting the username for the relational database (#891)
* Support setting the username for the relational database

fixes #889

* update crd+documentation
2025-07-24 14:05:26 +02:00
Dario Tranchitella
cac1631523 feat: rotating certificates via annotation (#877)
* fix(kubeconfig): checking certificate authority data for validity

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

* feat: rotating certificates via annotation

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

* docs: rotating certificates via annotation

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-07-21 09:23:29 +02:00
Dario Tranchitella
d1eb860918 feat!: support for konnectivity deployment mode (#875)
* feat(konnectivity): support for deployment mode

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

* feat(helm)!: support for konnectivity deployment mode

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

* chore(sample): support for konnectivity deployment mode

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

* docs: support for konnectivity deployment mode

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-07-21 09:21:35 +02:00
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
b68010e072 feat!: introducing sleeping status (#773)
* feat(api): introducing sleeping status

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

* chore(helm)!: introducing sleeping status

Marking this commit as breaking since a CustomResourceDefinition update
is required for users dealing with scale to zero since the introduction
of the new enum for the status field.

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

* docs: introducing sleeping status

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-04-07 16:44:13 +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
Dario Tranchitella
8b22f22bd3 fix: check cert names and ips including tcp address (#758)
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-03-27 18:34:57 +01:00
Pandry
09a5b05a9c feat: removes LoadBalancerIP field from service spec (#713)
Addresses #688, this commit removes the deprecated `spec.loadBalancerIP`.
With the property being set in the service, the AWS cloud controller complained and caused issues.
2025-03-21 07:55:12 +01:00
Dario Tranchitella
c87d6ffc47 fix(crypto): validating cp endpoint for api server cert (#737)
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-03-21 07:53:37 +01:00
daseul cho
e7df0f15d8 fix: cleanup ingress managed by kamaji (#726) 2025-03-16 11:14:06 +01:00
Dario Tranchitella
9d48eaecb3 fix!(kubeadm): cluster-info configmap reconciliation (#715)
This commit introduces a breaking change such as the removal of
the default bootstrap token created by kubeadm on an idempotent basis.

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-03-12 15:17:47 +01:00
Mario Valderrama
d5ed4db445 fix: wait until deployment stabilizes to set status Ready (#718)
Signed-off-by: Mario Valderrama <mario.valderrama@ionos.com>
2025-03-12 13:10:53 +01: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
3de661b4e6 feat: validating api server cert sans (#701)
* feat(webhook): validating api server cert sans

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

* feat(controller): validating api server cert sans

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-02-20 15:43:22 +01:00
Dario Tranchitella
1d72802abd refactor: avoid logging error and sentinel for status (#673)
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-01-22 11:08:01 +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
11e1e6c25b fix(cert): checking api server certificate SAN entries (#641)
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-12-01 15:06:02 +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
Dario Tranchitella
fdd0035915 feat: load balancer class support (#620)
* feat: load balancer class support

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

* chore(helm): load balancer class support

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

* docs: load balancer class support

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-10-28 14:19:04 +01:00
daseul cho
4e8c2b66c0 feat: loadbalancer source range (#611)
* feat(crd): add LoadBalancerSourceRanges field and integrate with service resource

* test(crd): add tests for CEL validation logic

* feat(webhook): implement LoadBalancerSourceRanges validation logic for CIDRs

* test(webhook): add tests for webhook validation logic

* test: modify Makefile for envtest setup

* docs: add LoadBalancerSourceRanges field to API reference
2024-10-25 19:12:55 +02:00
Dario Tranchitella
9ca69e91f9 fix(kubeadm): ensure admin clusterrolebinding with in-cluster client (#608)
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-10-21 21:21:53 +02:00
Dario Tranchitella
7e08b9a7ce feat: cluster domain customisation (#594)
* feat(api): customising cluster domain option

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

* feat(helm): customising cluster domain option

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

* docs: customising cluster domain option

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-10-06 09:40:20 +02:00
Simon Kienzler
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
08272fc37d fix: konnectivity clean-up and status updates (#574)
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-09-10 12:22:15 +02:00
Dario Tranchitella
83f855f2a2 fix: don't delete kubeproxy unless previously managed by kamaji (#572)
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-09-07 21:47:58 +02:00
Dario Tranchitella
438639dc71 fix(coredns): preserving externally managed coredns addon (#571)
A bug has been introduced with #527 which doesn't handle properly all the required business logic, such as the application of customised labels, as well as the handling of the controller Resource.

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-09-07 20:57:42 +02:00
Marlinc
62b05eda6d fix: don't delete coredns unless previously managed by kamaji (#527) 2024-09-06 08:16:39 +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
reoring
477989a214 chore: add concise error messages for non supported ingress hostname (#543)
* chore: improve error handling and logging for certificate operations

- Enhance error reporting in GenerateCertificatePrivateKeyPair function
- Add detailed error checks for CA certificate and private key parsing
- Implement check for expected number of certificate files
- Improve error logging in APIServerCertificate resource

This commit preserves more details about certificate-related issues,
aiding in debugging and troubleshooting.

* feat: support loadbalancer hostname resolution

Add functionality to resolve loadbalancer hostname to IP address in DeclaredControlPlaneAddress method.
This enhances the existing IP address handling by allowing the use of hostnames for loadbalancers.

- Add hostname check in addition to IP check
- Implement hostname resolution using net.LookupIP
- Return the first resolved IP address if available

* fix: Remove hostname support for LoadBalancer ingress

- Extract LoadBalancer address logic to separate function
- Remove hostname resolution for LoadBalancer ingress
- Add explanatory comments on reasons for not supporting hostnames

* fix: replace fmt and vet with golint

- Remove fmt and vet targets
- Update build target to use golint instead of fmt and vet
- Remove fmt and vet dependencies from run target

* fix: lint errors
2024-08-20 10:01:28 +02:00
Dario Tranchitella
2e17d6b701 fix(ingress): comparing status enhancement (#503)
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-07-29 09:40:04 +02:00
Johann Wagner
b541962163 fix(ipv6): use net.JoinHostPort instead of fmt.Sprintf 2024-07-11 13:20:02 +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