Commit Graph

141 Commits

Author SHA1 Message Date
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
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
IvanHunters
7b9a19c94b [kubernetes] refactoring doubles for difference k8s versions
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-15 12:48:10 +03:00
IvanHunters
7c918125e5 [kubernetes] add check for deployed Kubernetes server version using kubectl
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-15 12:48:10 +03:00
IvanHunters
259a2f5cab [kubernetes] modify tests for user-selectable cluster version case
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-15 12:48:10 +03:00
Andrei Kvapil
d2126b6703 Save a list of observed images after workflow (#1089)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added a process to list images used in the environment before deletion
during cleanup operations.
- **Chores**
- Enhanced environment cleanup workflow with improved visibility into
used images.
- Introduced a shared writable directory between host and container for
better file management during testing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-03 15:45:12 +03:00
Andrei Kvapil
8ec882ca5f [dx] Refactor collect-images functionality
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-03 14:26:56 +03:00
Timofei Larkin
f891d0bee6 Add exec bit to script, sanitize image list
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-07-03 13:56:41 +03:00
Timofei Larkin
210f3c7b6b Save images with unique filename
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-07-03 13:54:32 +03:00
Timofei Larkin
fa6442998a Save a list of observed images after workflow
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-07-03 13:54:32 +03:00
Andrei Kvapil
986de717f1 [virtual-machine] Refactor golden images
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-03 13:33:44 +03:00
Andrei Kvapil
d38c8aa5ab [CDI] golden disks feature for reuse
Use Golden Images to speed up VM / VMI deploy

Signed-off-by: gwynbleidd <gwynbleidd2106@yandex.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-03 13:23:44 +03:00
Andrei Kvapil
1f240387f9 [dx] fix: exclude ps from self destructing enviroments check
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-02 13:37:15 +03:00
Andrei Kvapil
cd7fec68fc [e2e] Add retries (#1123)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


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

* **Chores**
* Improved reliability of automated testing workflows by adding retry
logic to key setup and test steps.
* Simplified resource management in end-to-end tests by switching to a
consistent apply command for creating or updating Kubernetes resources.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-02 10:46:09 +02:00
Andrei Kvapil
d19d6b58d0 [dx] better check for processes in self destructing enviroments
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-02 11:37:32 +03:00
Andrei Kvapil
f953db50da [dx] Introduce cozyreport tool
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-02 10:37:40 +03:00
Andrei Kvapil
52714f5cce [tests] Introduce self destructing environments
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-02 03:42:14 +03:00