Commit Graph

162 Commits

Author SHA1 Message Date
Nick Volynkin
e3a4e284de [apps,extra] Update all app versions after updating OpenAPI schemas
Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
2025-08-18 15:55:01 +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
kklinch0
85063cf624 clickhouse add chk
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-08-04 18:22:43 +03:00
Timofei Larkin
c74df866e6 [kubernetes] Disable VPA for VPA in tenant k8s (#1301)
## What this PR does

This patch disables the VPA for VPA deployment in tenant kubernetes
clusters. This feature was never designed for deployment in tenant
clusters and causes unexpected errors.

### Release note

```release-note
[kubernetes] Disable VPA for VPA feature for tenant clusters, fixing an unintended regression.
```

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

* **New Features**
* Added a new configuration option to enable or disable vertical pod
autoscaling for the autoscaler itself.

* **Chores**
  * Updated the Kubernetes application chart version to 0.26.3.
  * Updated version mapping for the Kubernetes package.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-08-04 18:46:37 +04:00
Timofei Larkin
080289fa00 [kubernetes] Disable VPA for VPA in tenant k8s
This patch disables the VPA for VPA deployment in tenant kubernetes
clusters. This feature was never designed for deployment in tenant
clusters and causes unexpected errors.

[kubernetes] Disable VPA for VPA feature for tenant clusters, fixing an
unintended regression.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-08-04 16:47:48 +03:00
Timofei Larkin
44fabd4abc [virtual-machine] Disable instanceType validation
Workaround for #1299. If a Cozystack installation provides custom
instance types for virtual machines, the static validation rules prevent
such instance types from being used, as they are included in the OpenAPI
schema of the Cozystack API server and then once more applied in the
dependent HelmRelease, offering users no easy way to remedy this in
runtime.

[virtual-machine] Disable instanceType validation to enable using custom
instance types.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-08-04 15:16:32 +03:00
kklinch0
efb2c632e2 k8s make volumesnapshot crd name shorter
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-07-30 13:28:23 +03:00
Andrei Kvapil
02436f312f [kubernetes] Add dependency for snapshot CRD and migration to latest version
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-24 20:27:26 +02:00
kklinch0
6598213b58 fix net pod policy
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-07-24 17:28:10 +03:00
kklinch0
a0b1914972 fix add vm job resources
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-07-17 22:05:19 +03:00
Andrei Kvapil
5199021b8d Update FerretDB v2.4.0 (#1206)
## What this PR does

This PR updates FerretDB from v1 to v2

**Breaking change**: before upgrading your ferretdb, please backup and
restore your data, using this guide:
- https://docs.ferretdb.io/migration/migrating-from-v1/

### 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
[ferretdb] Introduce FerretDB v2.4.0
```

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

* **New Features**
* Upgraded FerretDB application to version 2.4.0 with Helm chart version
1.0.0.
* Added support for scheduled backups via a new `ScheduledBackup`
resource.

* **Improvements**
* Default resource sizing for FerretDB replicas increased from "nano" to
"micro" for better performance.
* PostgreSQL configuration enhanced with additional extensions, improved
security settings, and automated extension setup.
* Streamlined environment variable configuration for PostgreSQL
connection.
* Backup configuration updated for more flexible retention, scheduling
(including seconds), destination paths, and bootstrap recovery options.

* **Removals**
* Removed Kubernetes initialization job and related scripts for
PostgreSQL user and role management, simplifying deployment.
* Deleted legacy backup CronJob, backup scripts, and backup secrets
templates.

* **Chores**
* Updated version mappings and added a new Makefile target to streamline
image and version updates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-16 22:20:26 +02:00
Timofei Larkin
f2a8c3d0d1 [kubernetes] User-selectable cluster version (#1191)
## What this PR does

This patch adds a new version field to the kubernetes chart, letting
end-users specify the version of kubernetes they want to deploy.

### Release note

```release-note
[kubernetes] Let users specify desired version of tenant k8s cluster.
```

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

* **New Features**
* Added a configurable Kubernetes version parameter, allowing selection
of specific minor versions for cluster deployments.
* Introduced a version mapping system to ensure clusters use precise
Kubernetes patch versions.
* **Bug Fixes**
* Ensured only supported Kubernetes versions can be selected, reducing
configuration errors.
* **Documentation**
* Updated documentation to describe the new version parameter and its
usage.
* **Tests**
* Enhanced end-to-end tests to cover deployments with both the latest
and previous Kubernetes versions.
* **Chores**
* Consolidated version references for multiple packages to streamline
version management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-16 22:12:00 +04:00
Andrei Kvapil
4d62961c89 Update FerretDB v2.4.0
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-16 15:22:16 +02:00
kklinch0
c5d3fe9aaa bugfix fix pg LB frontend
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-07-16 11:56:45 +03:00
Timofei Larkin
19b79b7ca4 Merge branch 'main' into feat/select-k8s-fix-conflict
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-07-15 15:48:56 +04:00
Timofei Larkin
0de9a0a262 Fixing versions_map
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-07-15 14:43:19 +03:00
Timofei Larkin
c7376ef3c9 [kubernetes] User-selectable cluster version
This patch adds a new version field to the kubernetes chart, letting
end-users specify the version of kubernetes they want to deploy.

[kubernetes] Let users specify desired version of tenant k8s cluster.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
2025-07-15 12:48:10 +03:00
Nick Volynkin
55cfdb3a38 [apps] Remove preset 'none' from app charts and README
Preset 'none' is in fact disallowed since cozystack/cozystack#1156

Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
2025-07-14 19:31:10 +03:00
klinch0
c1a4a58500 [oidc] make keycloak deletable (#1178)
<!-- 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
[oidc] make keycloak deletable
```

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

## Summary by CodeRabbit

* **New Features**
* Added automated cleanup of Keycloak-related resources during
uninstallation to ensure smooth deletion.
* **Bug Fixes**
* Improved conditional logic for enabling OIDC and Keycloak-related
resources, ensuring they are only activated when explicitly set to
"true".
* **Chores**
  * Updated version numbers and references for the tenant application.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-11 09:02:34 +03:00
kklinch0
1faf40cd81 [oidc] make keycloak deletable
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-07-10 20:10:54 +03:00
Andrei Kvapil
f628e7d9c7 [docs] Add backup and restore instructions for PostgreSQL (#1141)
## What this PR does

Rephrase the descriptions for backup and restore variables

### Release note

```release-note
[docs] Add backup and restore instructions for PostgreSQL 
```

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

* **Documentation**
* Updated PostgreSQL backup restore instructions to use a YAML
configuration approach for bootstrapping from a backup, replacing
previous shell command examples.
* Clarified and restructured backup and recovery documentation,
including detailed configuration examples for enabling backups with
S3-compatible storage.
* Improved descriptions and default values for backup-related
configuration parameters for better clarity and consistency.

* **Chores**
  * Incremented the PostgreSQL app chart version.
  * Updated version mapping for the PostgreSQL package.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-09 11:24:10 +02:00
kklinch0
8fde834e39 make velero addon deletable
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-07-09 11:52:44 +03:00
kklinch0
e99d238647 [docs] Add backup and restore instructions for PostgreSQL
Rephrase the descriptions for backup and restore variables

Co-authored-by: Nick Volynkin <nick.volynkin@gmail.com>
Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
2025-07-09 10:47:09 +02:00
Andrei Kvapil
1079472a2a [vm-instance] Add bus option; Always specify bootOrder
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-08 17:47:34 +02:00
kklinch0
f251cba363 bugfix: vm and vmi add svc to dashboard
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-07-08 10:02:34 +03:00
Andrei Kvapil
91a07dcda6 [postgres] Restrict password change for user postgres (#1164)
Restrict password change for user postgres

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

* **Chores**
  * Updated the chart version for Postgres from 0.16.0 to 0.17.0.
* Updated the versions map to reference the latest commit and added the
new version.

* **Bug Fixes**
* Enhanced initialization script to forbid creating a user named
"postgres," providing clear error messaging.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-08 09:25:11 +03:00
Ahmad Murzahmatov
f6eaca3843 [postgres] do not allow change postgres pwd
Signed-off-by: Ahmad Murzahmatov <gwynbleidd2106@yandex.com>
2025-07-08 08:52:29 +06:00
Timofei Larkin
8d3324f958 [kubevirt-csi] Update Role of CSI controller
Following a [recent update](0171916b01),
the KubeVirt CSI controller now needs new permissions to manage volumes
for tenant k8s clusters.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-07-07 19:12:51 +03:00
Timofei Larkin
bd9e283d3b [platform] Always set resources for managed apps
This patch removes the loophole to leave resource requests and limits
unspecified in managed apps. Any of cpu, memory, and ephemeral storage
are now filled in from the resource preset (default or user-specified)
if not explicitly specified in .Values.resources. "none" is no longer an
accepted value in resourcePresets and the primary resources now always
have some explicit value for proper billing and isolation.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-07-03 17:45: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
klinch0
ca772fae2e platform add velero (#1132)
<!-- 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
[]
```

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

* **New Features**
* Added Velero integration as an optional addon for Kubernetes cluster
backup and restore.
* Introduced configurable parameters to enable Velero and override its
settings.
* Included a comprehensive Helm chart, manifests, and configuration
files for deploying Velero.
* Added support for Velero-related Kubernetes resources, including
backup, restore, schedule, and data mover management.
* Enabled Prometheus monitoring and metrics for Velero components with
PodMonitor and ServiceMonitor support.
* Provided customizable backup storage and volume snapshot location
settings.
  * Added automated Helm hooks for CRD upgrades and cleanup jobs.
  * Included node-agent DaemonSet deployment for Velero.

* **Documentation**
* Updated documentation to describe new Velero addon parameters,
installation, upgrade, and usage instructions.

* **Chores**
  * Incremented Kubernetes app chart version to reflect new features.
  * Updated version mapping and bundle configurations to include Velero.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-03 09:59:34 +03:00
Andrei Kvapil
fb831c05c0 vms add sockets to resources (#1131)
<!-- 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
- Allow to set socket count for VM and VMI
```

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

* **New Features**
* Added support for specifying the number of CPU sockets
(resources.sockets) in virtual machine configurations for both
virtual-machine and vm-instance applications.

* **Documentation**
* Updated documentation to describe the new resources.sockets parameter
and its role in defining vCPU topology.

* **Chores**
* Incremented chart versions for virtual-machine (to 0.12.0) and
vm-instance (to 0.9.0).
  * Updated version mappings to reflect the latest releases.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-02 17:33:29 +03:00
kklinch0
98194a7414 platform add velero
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-07-02 16:47:44 +03:00
kklinch0
70c7978306 vms add sockets to resources
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-07-02 15:17:30 +03:00
Andrei Kvapil
d5521df9bd [tenant] Respect cpu-allocation-ratio in resourceQuotas
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-07-02 15:14:56 +03:00
Andrei Kvapil
512277fa93 [kubernetes] Add option for exposing ingress-nginx via LoadBalancer (#1114)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


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

## Summary by CodeRabbit

- **New Features**
- Added a new configuration option to choose the method for exposing the
Ingress-NGINX controller: "Proxied" or "LoadBalancer".
- **Documentation**
- Updated documentation to describe the new `exposeMethod` option and
clarified the conditions under which domain names are used.
- **Bug Fixes**
- Improved conditional logic to ensure Ingress resources are only
created when the appropriate expose method is selected.
- **Chores**
	- Incremented the chart version to 0.25.0.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-07-02 10:52:44 +02:00
Andrei Kvapil
c6ee006d6b [kubernetes] Add option for exposing ingress-nginx via LoadBalancer
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-06-25 14:44:52 +02:00
Timofei Larkin
848abc4bd1 Create LoadBalancer service for single-node MySQL
[mysql] Bugfix: external=true did not work for MySQL deployed with a
single replica, since the MariaDB operator does not create separate
primary and secondary services for a single-node DB. A special condition
is added to make the "all-node" service a LoadBalancer if external=true
and replicas=1.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-06-25 14:24:45 +03:00
Andrei Kvapil
654778a0c7 [apps] Refactor resources
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-06-24 17:35:26 +02:00
Andrei Kvapil
a0526be17d [clickhouse][kafka] increase resources
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-06-24 16:56:00 +02:00
kklinch0
7c45335abb [postgres] add backup and restore
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-06-23 15:38:34 +02:00
kklinch0
b16e73ad42 [bugfix] fix monitoring agents hr for tenant clusters
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-06-18 18:38:54 +03:00
Andrei Kvapil
3f6b6798f4 [kubernetes] Fixes for resources and migration to v0.32.4
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-06-17 01:34:54 +02:00
Andrei Kvapil
3b8a9f9d2c Configure all apps to use new function to generate subjects
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-06-16 20:32:11 +02:00
klinch0
b14c82d606 [bugfix] add-resource-quotas-for-pg-jobs-and-fix-install-generate (#1051)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added default resource specifications for PostgreSQL jobs to ensure
consistent CPU and memory allocation.
- **Chores**
  - Updated the chart version for the PostgreSQL application.
  - Refreshed version mapping to reflect the latest release.
- Improved Node.js setup and package installation in the pre-commit
workflow.
- **Tests**
- Increased memory allocation for QEMU virtual machines in end-to-end
tests.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-12 10:10:26 +03:00
kklinch0
8e79f24c5b add rq for pg
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-06-11 22:48:09 +03:00
Andrei Kvapil
10af98e158 [kubernetes] Update Kubevirt-CCM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-06-11 10:30:13 +02:00
Andrei Kvapil
cee820e82c [platform] Introduce cluster-domain option and unhardcode cozy.local
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-06-10 10:11:09 +02:00
Andrei Kvapil
ba97a4593c [kafka] specify mimimal working resource presets
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-06-09 15:52:08 +02:00