Commit Graph

156 Commits

Author SHA1 Message Date
Timofei Larkin
d65d293fbc [kubernetes] Make worker version configurable
## What this PR does

The kubelet version of tenant k8s clusters is baked into the worker VM
image. Previously, selecting any version of tenant k8s had an impact
only on the controlplane, the workers were fixed at v1.33. This patch
modifies the KubeadmConfigTemplate to attempt to download the
user-selected versions of kubelet and kubeadm and replace the baked-in
versions with those. If failing, the bootstrap continues with the
baked-in versions.

### Release note

```release-note
[kubernetes] Make kubelet versions on tenant k8s clusters' worker nodes
user-configurable.
```

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-11-08 15:25:18 +03:00
Andrei Kvapil
cf5b2f2bbb [cozystack-controller] improve API tests
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-11-07 22:57:28 +01:00
nbykov0
c19cddf08e [core] rm talos lldp extension
Signed-off-by: nbykov0 <166552198+nbykov0@users.noreply.github.com>
2025-11-04 12:21:23 +03:00
IvanHunters
e2eb1e267b [e2e] Increase Kubernetes connection timeouts
This patch increases the connection and request timeouts used in the
E2E tests when communicating with the Kubernetes API. The change improves
test stability under high load and slow cluster response conditions.

```release-note
[e2e] Increase connection and request timeouts for Kubernetes API calls in E2E tests to improve stability.
```

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-11-03 10:53:47 +03:00
IvanHunters
ebbc76582c fix tests
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-10-22 02:03:33 +03:00
IvanHunters
8e57ac487e fix tests
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-10-21 23:57:02 +03:00
IvanHunters
766f6e9a9e fix tests
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-10-21 21:38:43 +03:00
Andrei Kvapil
9e635fcc3f [feature] add ferretdb tests (#1464)
<!-- Thank you for making a contribution! Here are some tips for you:
- Start the PR title with the [label] of Cozystack component:
- For system components: [platform], [system], [linstor], [cilium],
[kube-ovn], [dashboard], [cluster-api], etc.
- For managed apps: [apps], [tenant], [kubernetes], [postgres],
[virtual-machine] etc.
- For development and maintenance: [tests], [ci], [docs], [maintenance].
- If it's a work in progress, consider creating this PR as a draft.
- Don't hesistate to ask for opinion and review in the community chats,
even if it's still a draft.
- Add the label `backport` if it's a bugfix that needs to be backported
to a previous version.
-->

## What this PR does


### Release note

<!--  Write a release note:
- Explain what has changed internally and for users.
- Start with the same [label] as in the PR title
- Follow the guidelines at
https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md.
-->

```release-note
[feature] add ferretdb tests
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- Tests
- Added an end-to-end test that provisions a FerretDB instance on
Kubernetes, waits for readiness and init completion, verifies
connectivity to read/write Postgres services (including endpoint
convergence), accounts for known RO delays, and performs full cleanup.
Uses timeouts and retries for stability.
- Chores
  - No user-facing product changes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-10-17 08:43:55 +02:00
IvanHunters
2791e3e96a add ferretdb tests
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-10-17 09:13:27 +03:00
IvanHunters
1a49cbef2d The Cozystack Kubernetes tests are now POSIX-compatible and more robust.
This patch replaces bash-specific [[ ... ]] expressions in the
run_kubernetes_test function with POSIX-compliant case and test
constructs. It ensures that the Kubernetes version on each worker node
is verified correctly and that required components (CoreDNS, Cilium,
ingress-nginx, vsnap-crd) are ready before proceeding. Now the tests
work reliably even when executed with /bin/sh, such as in Bats.

```release-note
[tests] Make Kubernetes tests POSIX-compliant and more reliable:
verify worker node versions and ensure required releases (CoreDNS,
Cilium, ingress-nginx, vsnap-crd) are installed and ready.
```

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-10-13 14:21:59 +03:00
Timofei Larkin
857416d1d2 [maintenance] Resolve merge conflicts
Resolve conflicts for FoundationDB feature by @insignia96

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-10-10 11:58:01 +03:00
Timofei Larkin
43c222decf [installer] Even more rigorous migration
Due to a deficiency of cozypkg (--with-source reconciles the HelmChart,
but not the HelmRepository), we have to use workarounds to bulletproof
the latest migration, by applying directly from the assets server.

```release-note
[installer] Run 20th migration using helm charts directly from the
assets server instead of relying on cozypkg to reconcile its resources
properly.
```

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-10-09 21:34:14 +03:00
Timofei Larkin
4e766ed82e [api,platform] Decouple CozyRDs from API HR
This commit patches the Cozystack API server to tolerate an absence of
Cozystack Resource Definitions either registered as CRDs on the k8s API
or simply as an absence of CozyRDs persisted to etcd. This decouples the
upgrade of the CozyRD CRD from the upgrade of the Cozystack API.

```release-note
[api,platform] Decouple the Cozystack API from the Cozystack Resource
Definitions, allowing independent upgrades of either one and a more
reliable migration from 0.36 to 0.37.
```

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-10-08 16:18:47 +03:00
Timofei Larkin
1ee3d00128 [etcd] Add VPA for etcd (#1489)
## What this PR does

The etcd tenant module deploys by default with a large resource
limit/request and these values are not exposed at deploy time. This
patch lowers the default resources and adds a VPA to autoconfigure them
according to the real needs.

### Release note

```release-note
[etcd] Attach VPA to etcd and lower initial default resource requests.
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- New Features
- Enabled automatic resource autoscaling for etcd with a Vertical Pod
Autoscaler (VPA).

- Chores
- Updated default etcd resource requests to CPU 1000m and memory 512Mi
(previously 4 and 1Gi), reflected across chart values and API schema.
  - Changed the output location for generated CRDs.

- Documentation
- Revised README to document the new default CPU and memory values for
etcd.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-10-06 23:43:40 +04:00
Andrei Kvapil
dfb0838a1e feat/impruvement-kubernetes-tests (#1485)
<!-- Thank you for making a contribution! Here are some tips for you:
- Start the PR title with the [label] of Cozystack component:
- For system components: [platform], [system], [linstor], [cilium],
[kube-ovn], [dashboard], [cluster-api], etc.
- For managed apps: [apps], [tenant], [kubernetes], [postgres],
[virtual-machine] etc.
- For development and maintenance: [tests], [ci], [docs], [maintenance].
- If it's a work in progress, consider creating this PR as a draft.
- Don't hesistate to ask for opinion and review in the community chats,
even if it's still a draft.
- Add the label `backport` if it's a bugfix that needs to be backported
to a previous version.
-->

## What this PR does


### Release note

<!--  Write a release note:
- Explain what has changed internally and for users.
- Start with the same [label] as in the PR title
- Follow the guidelines at
https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md.
-->

```release-note
Improved tests for verifying installed kubernetes client clusters
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* New Features
* Added node readiness checks (expected node count, detailed node
display) and kubelet version validation with compatibility handling.

* Improvements
* Increased API port-forward timeout and extended rollout/machine
deployment waits for more reliable rollouts.
  * Added per-component readiness waits for core cluster services.

* Chores
  * Bumped default Kubernetes version to v1.33.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-10-06 20:59:59 +02:00
Timofei Larkin
42c9d65c7c [etcd] Add VPA for etcd
The etcd tenant module deploys by default with a large resource
limit/request and these values are not exposed at deploy time. This
patch lowers the default resources and adds a VPA to autoconfigure them
according to the real needs.

```release-note
[etcd] Attach VPA to etcd and lower initial default resource requests.
```

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-10-06 21:57:33 +03:00
IvanHunters
012906cd59 feat/impruvement-kubernetes-tests
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-10-03 10:54:09 +03:00
IvanHunters
f2cd585b45 feat/impruvement-kubernetes-tests
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-10-03 10:42:28 +03:00
IvanHunters
6937b8e2b6 feat/impruvement-kubernetes-tests
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-10-03 10:33:28 +03:00
IvanHunters
a8562f03d1 feat/impruvement-kubernetes-tests
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-10-03 10:25:34 +03:00
IvanHunters
2383bc9f13 feat/impruvement-kubernetes-tests
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-10-03 09:30:58 +03:00
IvanHunters
670341f6bd feat/impruvement-kubernetes-tests
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-10-03 09:07:14 +03:00
Timofei Larkin
66004c83e2 [lineage, controller] Implement name selectors
This patch implements name-based selectors for
`CozystackResourceDefinitions.spec.secrets`. Application developers may
now specify secrets that should or should not be visible to end users by
specifying a `resourceNames` field with a string slice of acceptable
names. This will, for instance, let developers exclude a secret like
`postgres-dbname-superuser` that has a predictable name even if it does
not have predictable labels. Simple templates are supported, so
`postgres-{{ .name }}-superuser` is also a valid entry under
`resourceNames`.

```release-note
[lineage, controller] Let application developers determine resource
visibility for end users by name, as well as by labels.
```

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-10-01 12:29:04 +03:00
Andrei Kvapil
0afc3c1e86 [cozystack-api] Implement TenantNamespace, TenantModules, TenantSecret and TenantSecretsTable resources
[cozystack-controller] Introduce new dashboard-controller
[dashboard] Introduce new dashboard based on openapi-ui

Co-authored-by: kklinch0 <kklinch0@gmail.com>
Signed-off-by: kklinch0 <kklinch0@gmail.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-09-24 18:27:54 +02:00
Andrei Kvapil
f871fbdb1e Remove versions_map logic
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-09-24 12:32:37 +02:00
Isaiah Olson
edc12e3f7e Add FoundationDB configuration values for storage engine and redundancy mode, update tests, and fix workload monitor
Signed-off-by: Isaiah Olson <isaiah@olson-network.com>
2025-09-17 01:16:19 -05:00
Isaiah Olson
a3be02132d Update Foundation DB tests and update chart to make sure they pass
Signed-off-by: Isaiah Olson <isaiah@olson-network.com>
2025-09-17 01:16:16 -05:00
Isaiah Olson
5b58ec5cdd Update FoundationDB to use latest stable version supported by the operator by default
Signed-off-by: Isaiah Olson <isaiah@olson-network.com>
2025-09-17 01:16:14 -05:00
Isaiah Olson
5654ac4e3d Initial support for FoundationDB operator
Signed-off-by: Isaiah Olson <isaiah@olson-network.com>
2025-09-17 01:16:09 -05:00
Andrei Kvapil
4dd062d9cd Feat/tests with resource quota (#1389)
<!-- Thank you for making a contribution! Here are some tips for you:
- Start the PR title with the [label] of Cozystack component:
- For system components: [platform], [system], [linstor], [cilium],
[kube-ovn], [dashboard], [cluster-api], etc.
- For managed apps: [apps], [tenant], [kubernetes], [postgres],
[virtual-machine] etc.
- For development and maintenance: [tests], [ci], [docs], [maintenance].
- If it's a work in progress, consider creating this PR as a draft.
- Don't hesistate to ask for opinion and review in the community chats,
even if it's still a draft.
- Add the label `backport` if it's a bugfix that needs to be backported
to a previous version.
-->

## What this PR does


### Release note

<!--  Write a release note:
- Explain what has changed internally and for users.
- Start with the same [label] as in the PR title
- Follow the guidelines at
https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md.
-->

```release-note
Feat/tests with resource quota
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Tenant resource quotas now accept explicit cpu, memory, and storage
values per namespace.
- Default container limits and requests added via a LimitRange (CPU,
memory, ephemeral storage).

- **Behavior Changes**
- Resource quota output simplified: quotas emitted at the root and
storage limit entries omitted from flattened output.

- **Tests**
- Increased timeouts for VM disk readiness and PVC binding; added
runtime checks validating ResourceQuota and LimitRange defaults.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-09-09 19:25:19 +02:00
IvanHunters
3e03b1bd86 add resource quota for testing ns
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-09-09 17:42:52 +03:00
Timofei Larkin
f59d072ef1 [ci] Fix garbage output in cozyreport
Some "while read NAMESPACE NAME _" steps in the cozyreport script that
collects debug info weren't omitting the headers in `kubectl get` output
and trying to get objects named NAME in namespace NAMESPACE. This patch
adds `--no-header` to some places where it was forgotten.

```release-note
[ci] Fix an error in cozyreport that tried to parse non-existent objects
and generated garbage output in CI debug logs
```

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-09-04 11:03:08 +03:00
IvanHunters
8e906be9df fix race conditions for seaweedfs and fix tests preparing
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-09-01 16:32:49 +03:00
cozystack-bot
ffa28d0dc0 Prepare release v0.35.2
Signed-off-by: cozystack-bot <217169706+cozystack-bot@users.noreply.github.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-08-27 01:32:05 +02:00
Andrei Kvapil
32a857fbf2 [talos] Add lldpd extension to image (#1351)
This patch adds the lldpd extension to Cozystack's Talos build.
Additionally it changes the profile generation scripts to use
Siderolabs' recommended way to get appropriate extension image versions
to include with Talos.

### Release note
```release-note
[talos] Add LLDP support in default Talos build.
```

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-08-26 14:36:12 +02:00
Timofei Larkin
868148709c [talos] Add lldpd extension to image
This patch adds the lldpd extension to Cozystack's Talos build.
Additionally it changes the profile generation scripts to use
Siderolabs' recommended way to get appropriate extension image versions
to include with Talos.

Release note:
```release-note
[talos] Add LLDP support in default Talos build.
```

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-08-26 11:10:23 +03:00
Andrei Kvapil
a2134ecce7 Add test for openapi schema
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-08-21 16:51:21 +02:00
Andrei Kvapil
168a24ffdf [tests] Add more space for e2e tests
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-08-11 13:04:00 +03:00
Nick Volynkin
f864b40a85 [apps] Use new OpenAPI schema and README generator for packages/apps
- clickhouse
- ferretdb
- http-cache
- kafka
- kubernetes
- mysql
- nats
- rabbitmq
- redis
- tcp-balancer
- vm-disk
- vm-instance
- vpn

Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-08-11 12:59:50 +03:00
Timofei Larkin
771fbc817f [ci] Stop using personal domain for CI
Migrate away from using a private domain for build infra.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-08-07 17:52:48 +03:00
Andrei Kvapil
be31370540 [clickhouse] add clickhouse keeper (#1298)
<!-- Thank you for making a contribution! Here are some tips for you:
- Start the PR title with the [label] of Cozystack component:
- For system components: [platform], [system], [linstor], [cilium],
[kube-ovn], [dashboard], [cluster-api], etc.
- For managed apps: [apps], [tenant], [kubernetes], [postgres],
[virtual-machine] etc.
- For development and maintenance: [tests], [ci], [docs], [maintenance].
- If it's a work in progress, consider creating this PR as a draft.
- Don't hesistate to ask for opinion and review in the community chats,
even if it's still a draft.
- Add the label `backport` if it's a bugfix that needs to be backported
to a previous version.
-->

## What this PR does


### Release note

<!--  Write a release note:
- Explain what has changed internally and for users.
- Start with the same [label] as in the PR title
- Follow the guidelines at
https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md.
-->

```release-note
- update ch operator
- add chk
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added support for deploying ClickHouse Keeper for cluster
coordination, with configurable enablement, resource presets, and
storage size.
* Introduced new Kubernetes resources and monitoring for ClickHouse
Keeper, including metrics integration and workload monitoring.
* Enhanced configuration flexibility with new parameters for Keeper in
both values and schema files.

* **Documentation**
* Updated documentation to describe new ClickHouse Keeper parameters and
deployment options.
* Improved Helm chart and CRD documentation for ClickHouse Operator,
including new features, configuration options, and secret integration.

* **Bug Fixes**
* Updated Grafana dashboards for compatibility with latest versions and
improved metric queries.

* **Chores**
  * Incremented chart and operator versions.
  * Updated test scripts to include ClickHouse Keeper scenarios.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-08-07 11:45:14 +02:00
IvanHunters
c4a2bef4c9 [test] fix vm tests
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
(cherry picked from commit 299d006d20)
2025-08-06 17:05:13 +03:00
kklinch0
85063cf624 clickhouse add chk
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-08-04 18:22:43 +03:00
Andrei Kvapil
856720004f [seaweed] add tests for S3 buckets (#1283)
<!-- Thank you for making a contribution! Here are some tips for you:
- Start the PR title with the [label] of Cozystack component:
- For system components: [platform], [system], [linstor], [cilium],
[kube-ovn], [dashboard], [cluster-api], etc.
- For managed apps: [apps], [tenant], [kubernetes], [postgres],
[virtual-machine] etc.
- For development and maintenance: [tests], [ci], [docs], [maintenance].
- If it's a work in progress, consider creating this PR as a draft.
- Don't hesistate to ask for opinion and review in the community chats,
even if it's still a draft.
- Add the label `backport` if it's a bugfix that needs to be backported
to a previous version.
-->

## What this PR does
Introduced automated end-to-end testing for SeaweedFS bucket creation
and verification in Kubernetes environments.

### Release note

<!--  Write a release note:
- Explain what has changed internally and for users.
- Start with the same [label] as in the PR title
- Follow the guidelines at
https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md.
-->

```release-note
[seaweed] add tests for S3 buckets
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Introduced an end-to-end test for SeaweedFS Bucket resources,
including creation, credential verification, file upload, and cleanup.
* **Chores**
* Updated test scripts to include SeaweedFS in tenant configuration and
extended wait times for application readiness.
* Enhanced test environment by adding the MinIO client to the Docker
image for improved S3 compatibility testing.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-08-01 12:52:33 +02:00
IvanHunters
fa4fff2292 [monitoring] add seaweedfs monitoring
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-30 15:17:46 +03:00
kklinch0
830ec252b9 Scaffold CozyRD CRD
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-07-29 17:03:22 +03:00
IvanHunters
730584bd15 [seaweed] add tests
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-28 16:18:07 +03:00
Timofei Larkin
640d0f10ac [ci] Refactor testing logic
* Simplify test discovery logic in workflow.
* Delete Clickhouse after successful test.
* Separate two k8s tests into separate jobs.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-07-23 14:00:24 +03:00
IvanHunters
6023dffd6d [tests] fix versions.yaml path
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-15 13:06:48 +03:00
IvanHunters
d63aac727c [kubernetes] refactoring checking k8s version for nitpick comment by rabbit
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-15 12:48:10 +03:00