Commit Graph

92 Commits

Author SHA1 Message Date
Dario Tranchitella
e366dc3959 feat: pausing reconciliation of controlled objects (#874)
* feat: pausing reconciliation of controlled objects

Objects such as TenantControlPlane and Secret can be annotated with
kamaji.clastix.io/paused to prevent controllers from processing them.

This will stop reconciling objects for debugging or other purposes.
Annotation value is irrelevant, just the key presence is evaluated.

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

* docs: pausing reconciliation of controlled objects

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

* chore(logs): typo for deleted resources

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-07-16 10:44:48 +02:00
Parth Yadav
d6a94dfa5e fix(controlplane): Prioritize InternalIP in kubelet-preferred-address-types (#859)
This patch switches default kubelet-preferred-address-types to
"InternalIP,ExternalIP,Hostname" to avoid failures in kube-apiserver
connection to kubelet when node hostnames are not resolvable by the
external DNS server. This improves out-of-the-box reliability across
most environments by choosing node `InternalIP` as the preferred mode
to reach Kubelet.

Signed-off-by: Parth Yadav <parthyadav3105@gmail.com>
2025-06-29 21:59:20 +02:00
Dario Tranchitella
3fd1882e43 fix: wrong jsonpath for installed version (#857)
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-06-27 17:11:31 +02:00
Alessandro
c97767b54f feat(api): display status version in TenantControlPlane columns (#852)
Signed-off-by: alecristofanilli <cristofanillia@gmail.com>
2025-06-26 21:01:42 +02:00
Dario Tranchitella
f750073af6 refactor!: k8s api server validation for kubelet preferred address type uniqueness (#812)
* feat(api): relying on k8s list set for unique items

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

* feat(crd)!: relying on k8s list set for unique items

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

* chore(webhook): removing unused webhook for kubelet preferred address type

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

* docs(crd): kubelet preferred address type uniqueness

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-05-07 12:13:00 +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
ec443e6eac fix(crds): datastore driver is immutable (#767)
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-04-02 01:07:56 +01: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
Ammar Yasser
0f3de13d26 feat: validate datastores with cel (#762)
* feat: Validate DataStores with CEL using the following rules

- certificateAuthority privateKey must have secretReference or content when driver is etcd
- clientCertificate must have secretReference or content when driver is etcd
- clientCertificate privateKey must have secretReference or content when driver is etcd
- When driver is not etcd and tlsConfig exists, certificateAuthority must be null or contain valid content
- When driver is not etcd and tlsConfig exists, clientCertificate must be null or contain valid content
- When driver is not etcd and basicAuth exists, username must have secretReference or content
- When driver is not etcd and basicAuth exists, password must have secretReference or content
- When driver is not etcd, either tlsConfig or basicAuth must be provided

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Add extra rule

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: ginkgo flag ordering

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix: Fix syntax of tls or basic auth rule and remove the certificate authority rule

Signed-off-by: aerosouund <aerosound161@gmail.com>

* test: Add ginkgo tests for validations

Signed-off-by: aerosouund <aerosound161@gmail.com>

* fix(test): missing default values

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

* chore(ci): running integration tests as gh job

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

---------

Signed-off-by: aerosouund <aerosound161@gmail.com>
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
Co-authored-by: Dario Tranchitella <dario@tranchitella.eu>
2025-03-31 19:03:55 +02:00
Dario Tranchitella
a8f8582ea6 fix(datastore): handling datastore with no client certificate (#745)
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2025-03-23 22:29:33 +01:00
dependabot[bot]
f82350f17b feat(deps): bump sigs.k8s.io/controller-runtime from 0.19.3 to 0.20.0 (#670)
* feat(deps): bump sigs.k8s.io/controller-runtime from 0.19.3 to 0.20.0

Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.19.3 to 0.20.0.
- [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.19.3...v0.20.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>

* chore(generate): upgrade to k8s.io/kubernetes v0.32.1

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

* chore(helm): descriptions upgrade to k8s.io/kubernetes v0.32.1

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

* docs: descriptions upgrade to k8s.io/kubernetes v0.32.1

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-01-21 18:46:48 +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
e330690b7f fix: loadbalancerclass must be set at creation time (#630)
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-11-06 20:39:15 +01:00
Dario Tranchitella
c4a5b4a5fd fix: cel for load balancer class (#628)
* fix: cel for load balancer class

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

* fix(helm): cel for load balancer class

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-11-03 14:55:01 +01:00
Dario Tranchitella
0c0111094e feat: making default datastore optional (#597)
* feat: making default datastore optional

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

* feat(helm): making default datastore optional

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

* docs: making default datastore optional

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-10-30 20:23:34 +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
Dario Tranchitella
7c0eb8d41d feat: automatically set dns service address (#618)
* feat: automatically set dns service address

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

* feat(helm): automatically set dns service address

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

* docs: automatically set dns service address

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-10-27 10:55:21 +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
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
5757e4a48c chore: dropping kustomize dependency in favor of yq (#565)
* chore(makefile): installing cert-manager via helm

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

* chore: removing need of kustomize in favor of yq

By removing kustomize generation files we can simply release, despite
the bundles must be removed since based on kustomize despite never being
used.

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

* chore(ci): aligning to latest manifest generation strategy

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

---------

Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-09-01 11:29:27 +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
Mario Valderrama
84e669316a chore: update default konnectivity version (#492)
Signed-off-by: Mario Valderrama <mario.valderrama@ionos.com>
2024-07-17 11:34:43 +02:00
Mario Valderrama
6217f2ca25 feat: add category to CRD 2024-05-24 18:01:27 +02:00
Dario Tranchitella
90aef60c18 feat: konnectivity agent tolerations support
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
2024-05-09 11:36:07 +02:00
TheCodeAssassin
9ce8da0b37 feat: making DataStore TLS configuration optional
Co-authored-by: Dario Tranchitella <dario@tranchitella.eu>
2024-05-09 11:34:50 +02:00
Hamza BOUDOUCHE
37616865b4 feat: support for custom service account 2024-04-23 11:03:33 +02:00
Hamza BOUDOUCHE
d31b3eab0a feat: pod additional metadata 2024-04-22 17:55:38 +02:00
TheCodeAssassin
28a098af21 feat: initial support for NATS as Datastore (#442) 2024-04-22 15:31:35 +02:00
Andrei Kvapil
ced34a50e6 Allow overriding secretKey for kubeadm kubeconfig
During reconciliation, the bootstrap provider copies the content from the secret provided by Kamaji, named `<cluster>-admin-kubeconfig` into a `cluster-info` configmap of tenant cluster, which then used by kubeadm to join nodes.

This change introduces a new annotation, `kamaji.clastix.io/kubeconfig-secret-key`, for the TenantControlPlane resource. This annotation instructs kamaji to read the kubeconfig from a specific key (the default one is super-admin.conf).

Example:

```
kamaji.clastix.io/kubeconfig-secret-key: super-admin.svc
```

This will instruct the system to use `super-admin.svc` a kubeconfig with a local service FQDN (introduced by https://github.com/clastix/kamaji/pull/403).

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2024-04-18 10:57:16 +02:00
Jason Witkowski
7ac8e5e539 fix: kube-apiserver extra args override
Co-authored-by: Jason Witkowski <jwitkowski@zscaler.com>
Co-authored-by: Dario Tranchitella <dario@tranchitella.eu>
2024-03-04 11:45:27 +01:00
Jason Witkowski
cec4f9136d fix: konnectivity extra args override
Co-authored-by: Jason Witkowski <jwitkowski@zscaler.com>
2024-03-04 11:31:10 +01:00
Dario Tranchitella
dc97d69d0c fix: tcp deployment replica to pointer 2023-09-01 09:13:00 +01:00
Dario Tranchitella
eca04893a8 refactor: abstracting webhook management 2023-06-05 17:03:35 +02:00
Dario Tranchitella
877314f53d feat: container registry settings 2023-06-01 16:05:15 +02:00
Dario Tranchitella
27480ba66a feat(api): container registry settings 2023-06-01 16:05:15 +02:00
Dario Tranchitella
2c6360ad82 feat(api): resource claims support 2023-05-30 16:24:18 +02:00
Matteo Ruina
a5b7605e27 chore(api): tcp deployment mangling 2023-05-30 16:00:11 +02:00
Dario Tranchitella
743ea1343f feat(api): kube-apiserver kubelet-preferred-address-types support 2023-01-22 14:56:47 +01:00
Dario Tranchitella
f03e250cf8 feat(api): deployment strategy support 2023-01-17 10:01:21 +01:00
Dario Tranchitella
8e94039962 feat(api)!: introducing ca rotating status 2023-01-13 19:09:03 +01:00
Dario Tranchitella
7ed3c44401 refactor(datastore): using webhooks for secrets instead of finalizers 2022-12-20 20:54:41 +01:00
Dario Tranchitella
6e6ea0189f refactor(k8s): upgrade to 1.26 2022-12-17 15:57:47 +01:00
Dario Tranchitella
1eb1e0f17c feat: support for runtime class 2022-12-14 21:24:01 +01:00
Dario Tranchitella
3ea721cf2b feat(kubeadm): moving phases to soot manager 2022-12-14 21:23:47 +01:00
Dario Tranchitella
9d55e77902 refactor(api): no more need of checksum for addons 2022-12-14 12:22:49 +01:00
Dario Tranchitella
4c51eafc90 feat(konnectivity): reconciliation performed by soot manager 2022-12-12 16:22:36 +01:00
Dario Tranchitella
1a80fc5b28 fix(api): wrong konnectivity defaults 2022-12-12 16:22:36 +01:00
Dario Tranchitella
c00df62ff7 feat(konnectivity)!: support for extra args 2022-12-08 14:23:31 +01:00
Dario Tranchitella
5241fa64ed refactor(konnectivity)!: decoupling agent and server structs 2022-12-08 14:23:31 +01:00