Commit Graph

1043 Commits

Author SHA1 Message Date
Timofei Larkin
911ca64de0 Get instance type when reconciling WorkloadMonitor
When the WorkloadMonitor is reconciled and child Workload objects are
created, they will now get additional labels in the
`workloads.cozystack.io` namespace, containing metadata about the
workload. This particular commit checks if a pod targeted by a Workload
is owned by a VirtualMachineInstance (i.e. it launches a KubeVirt VMI)
and, if so, gets the VMI instance type and puts it in the
`kubevirt-vmi-instance-type` label.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-06-10 11:17:40 +03:00
klinch0
730ea4d5ef [fix] CloudInit (#1019)
If ssh key provided - deploy
If cloudinit provided - deploy
If ssh key and cloudinit provided - deploy both
If none provided - init empty to avoid issues w/
network

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

- **Refactor**
- Improved handling of SSH keys and cloud-init data in the Virtual
Machine setup, clearly distinguishing cases when SSH keys, cloud-init,
or both are provided.
  - Enhanced template readability with added spacing for better clarity.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-05 15:53:08 +03:00
klinch0
13fccdc465 bump tenant version (#1028) 2025-06-05 15:44:53 +03:00
kklinch0
f1b66c80f6 bump tenant version
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-06-05 15:40:45 +03:00
klinch0
f34f140d49 Add RBAC rules to allow portforward in kubevirt for SSH via virtctl (#1027)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Expanded user permissions to allow port forwarding for virtual machine
instances, enabling enhanced remote access capabilities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-05 11:07:53 +03:00
mattia
520fbfb2e4 Add RBAC rules to allow portforward in kubevirt for SSH via virtctl
Signed-off-by: mattia <mattia@hidora.io>
2025-06-05 09:38:40 +02:00
klinch0
25016580c1 (k8s) configure containerd for client k8s cluster (#979)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced granular Helm charts for Cluster API providers: bootstrap,
core, control plane, and infrastructure, each with dedicated
configuration, metadata, and compressed component packaging.
- Added a new configuration option to the Kubernetes app to enable using
a custom secret for patching containerd.
- Enhanced Kubernetes deployment to conditionally manage containerd
registry certificates and configuration using custom or copied secrets.

- **Documentation**
- Updated Kubernetes app documentation to include the new containerd
patching secret configuration option.

- **Chores**
- Updated version mappings and chart versions for Kubernetes and Cluster
API-related components.
- Decomposed the monolithic Cluster API provider release into multiple,
more manageable releases with explicit namespaces and dependencies.

- **Refactor**
- Removed the previous unified Cluster API provider template in favor of
new, separate provider resource definitions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-04 11:07:58 +03:00
kklinch0
f10f8455fc (k8s) configure containerd for client k8s cluster 2025-06-04 10:40:10 +03:00
Timofei Larkin
974581d39b [monitoring-agents] Add events and audit inputs (#948)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced log monitoring by adding support for Kubernetes events and
audit logs.
  - Introduced custom log parsers for improved log format handling.
  - Added log source tagging for easier identification of log origins.

- **Improvements**
- Refined log filtering and output formatting for better log
organization and delivery.
- Updated log outputs to support compressed JSON lines and ISO8601 date
formatting.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-04 10:33:58 +03:00
Timofei Larkin
7e24297913 Use library chart for resource management (#1025)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a shared library for resource configuration management
across multiple application charts.

- **Refactor**
- Updated resource configuration handling in several application charts
to use new centralized helpers for improved consistency and
sanitization.

- **Chores**
- Added references to the shared library in various application chart
directories.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-04 09:42:31 +03:00
Timofei Larkin
b6142cd4f5 Use library chart for resource management
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-06-04 09:05:21 +03:00
Timofei Larkin
e87994c769 Capture all resources by WorkloadMonitors (#1024)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced WorkloadMonitor resources for tcp-balancer, vm-disk, and
VPN applications, enabling enhanced workload monitoring capabilities.

- **Bug Fixes**
- Standardized Kubernetes resource labels across multiple applications
for improved consistency and compatibility.

- **Chores**
- Updated chart versions for several applications, including ClickHouse,
FerretDB, http-cache, MySQL, Postgres, Redis, tcp-balancer,
virtual-machine, vm-disk, vm-instance, and VPN.
- Updated Docker image reference for the installer to use the latest
version.
  - Refreshed internal version mappings for multiple packages.
- Added standardized instance labels to Kubernetes resources across
multiple applications for better tracking and management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-03 16:15:46 +03:00
Timofei Larkin
b140f1b57f Capture all resources by WorkloadMonitors
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-06-03 15:40:27 +03:00
Timofei Larkin
64936021d2 Release v0.31.0-rc.3 (#991)
This PR prepares the release `v0.31.0-rc.3`.

Signed-off by: Timofei Larkin <lllamnyp@gmail.com>
2025-06-03 14:10:11 +06:00
Andrei Kvapil
a887e19e6c Capture all resources by WorkloadMonitors (#1018)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced monitoring resources for HAProxy, NGINX, and generic HTTP
cache workloads, allowing improved workload observability.
- **Enhancements**
- Added standardized labels to MariaDB, Postgres, and Redis resources
for better integration and management within Kubernetes environments.
- Updated label selectors in Postgres resources to use standardized
Kubernetes app labels.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-02 09:28:30 +02:00
Andrei Kvapil
92b97a569e Fixed Gateway API manifest (#1016)
In current version of Cozystack, flux's HelmRelease will refuse to
install cozy-gateway-api-crds when gatewayAPI enabled, complaining
version '*'not found and breaking install of entire kubernetes app. This
patch adds working version match.

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

## Summary by CodeRabbit

- **Chores**
- Updated configuration to allow compatibility with all available
versions of the gateway-api-crds chart.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-06-02 09:25:25 +02:00
Timofei Larkin
0e22358b30 Capture all resources by WorkloadMonitors
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-06-02 09:44:27 +03:00
Zdenek Deu Janda
7429daf99c Fixed Gateway API manifest
Signed-off-by: Zdenek Deu Janda <zdenek.janda@cloudevelops.com>
2025-06-01 23:49:42 +02:00
Andrei Kvapil
b470b82e2a [tests] Fix concurrency for docker loing action (#1014)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


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

- **Chores**
- Updated workflow steps to use a job-specific temporary directory for
Docker configuration during build and container registry login
processes. This enhances isolation of Docker credentials in CI jobs.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-30 16:59:11 +02:00
Andrei Kvapil
a0700e7399 [tests] Fix concurrency for docker loing action
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-05-30 16:49:21 +02:00
Andrei Kvapil
228e1983bc Let users specify CPU requests in VCPUs (#972)
With this change a request for a virtual machine with 3 vCPUs will
reserve exactly the same amount of physical compute, as a request for a
Clickhouse instance with `{"resources": {"cpu": "3"}}` in its values,
with the scaling factor being KubeVirt's CPU allocation ratio.

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

- **New Features**
- Introduced configurable CPU allocation ratio for resource management,
allowing CPU requests to be scaled relative to limits.
- Added new templates for input validation and automatic loading of
configuration from Kubernetes ConfigMaps.

- **Bug Fixes**
- Improved resource sanitization and preset logic to handle CPU and
memory requests/limits more accurately.

- **Chores**
- Updated chart dependencies and versioning to reflect changes in
library usage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-30 12:50:21 +02:00
Timofei Larkin
7023abdba7 Let users specify CPU requests in VCPUs
With this change a request for a virtual machine with 3 vCPUs will
reserve exactly the same amount of physical compute, as a request for a
Clickhouse instance with `{"resources": {"cpu": "3"}}` in its values,
with the scaling factor being KubeVirt's CPU allocation ratio.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-05-30 00:55:19 +02:00
Timofei Larkin
1b43a5f160 Remove user-facing config of limits and requests
This patch introduces reusable library charts that provide
backward-compatibility for users that specify their resources as
explicit requests and limits for cpu, however this input is processed so
that limits are set equal to requests except for CPU which only gets
requests. Users can now embrace the new form by directly specifying
resources in the first level of nesting (e.g. resources.cpu=100m instead
of .resources.requests.cpu=100m). The order of precedence is top-level,
then requests, then limits, ensuring that nothing will break in terms of
scheduling, however workloads that specified limits much higher than
requests might get a performance hit, now that they cannot use all this
excess capacity. This should only affect memory-hungry workloads in
low-contention environments.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2025-05-30 00:55:19 +02:00
Andrei Kvapil
20f4066c16 [tests] fix: increase qemu system disk size (#1011)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-05-30 00:54:48 +02:00
Andrei Kvapil
ea0dd68e84 [tests] fix: increase qemu system disk size
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-05-30 00:54:09 +02:00
Andrei Kvapil
e0c3d2324f [ci] Split build artefacts (#1010)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


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

## Summary by CodeRabbit

- **Chores**
- Improved workflow for pull requests by separating artifact uploads and
downloads, resulting in clearer and more organized handling of installer
and image files during build and test processes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-30 00:53:54 +02:00
Andrei Kvapil
cb303d694c [ci] Split build artefacts
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-05-30 00:48:20 +02:00
Andrei Kvapil
6130f43d06 Release v0.31.1 (#1008)
This PR prepares the release `v0.31.1`.
v0.31.1
2025-05-30 00:18:28 +02:00
Andrei Kvapil
4db55ac5eb [ci] Add Github token to fetch draft releases
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-05-30 00:16:03 +02:00
github-actions
bfd20a5e0e Prepare release v0.31.1
Signed-off-by: github-actions <github-actions@github.com>
2025-05-29 23:44:58 +02:00
Andrei Kvapil
977141bed3 [ci] Fix download released artifacts (#1009)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-05-29 23:42:32 +02:00
Andrei Kvapil
c4f8d6a251 [ci] Fix download released artifacts
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-05-29 23:42:21 +02:00
Andrei Kvapil
9633ca4d25 Update Talos Linux v1.10.3 and fix assets (#1006)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


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

- **New Features**
- Installer artifacts now include an additional asset, improving the
completeness of installation resources.

- **Bug Fixes**
- End-to-end tests and cluster setup now verify the presence of all
required installer asset files, reducing setup errors.

- **Chores**
- Updated installer and system extension images to newer versions for
improved stability and compatibility.
- Improved build and test workflows to handle multiple installer assets
and streamline artifact management.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-29 23:27:12 +02:00
Andrei Kvapil
f798cbd9f9 Update Talos Linux v1.10.3
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-05-29 23:18:53 +02:00
Andrei Kvapil
cf87779f7b [ci] separate build and testing jobs (#1005)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


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

- **Chores**
- Improved pull request workflow by separating build and test phases,
enhancing reliability and maintainability of automated checks.
- Updated testing process to use a pre-generated installer artifact,
streamlining test execution and environment setup.
- Enhanced release workflow to generate manifests before running tests,
ensuring up-to-date configurations during verification.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-29 18:41:40 +02:00
Andrei Kvapil
c69135e0e5 [ci] separate build and testing jobs
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-05-29 17:44:50 +02:00
Nick Volynkin
a9c3a4c601 [docs] Write a full release post for v0.31.0 (#999)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Documentation**
- Expanded and restructured the changelog for v0.31.0 to provide
detailed information on new features, improvements, bug fixes, testing
updates, CI/CD changes, and community contributions. The changelog now
offers clearer insight into the release contents and lifecycle.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-29 15:34:02 +07:00
Nick Volynkin
d1081c86b3 [docs] Write a full release post for v0.31.0
Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
2025-05-29 10:05:53 +03:00
Andrei Kvapil
beadc80778 Release v0.31.0 (#1003)
This PR prepares the release `v0.31.0`.
v0.31.0
2025-05-29 01:24:13 +02:00
github-actions
5bbb5a6266 Prepare release v0.31.0
Signed-off-by: github-actions <github-actions@github.com>
2025-05-28 21:40:20 +00:00
Andrei Kvapil
0664370218 [apps] Add topologySpreadConstraints for managed PostgreSQL and tenant Kubernetes clusters. (#995)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added support for injecting custom topology spread constraints into
virtual machine templates, PostgreSQL clusters, and monitoring
components based on a ConfigMap in the cluster.

- **Chores**
- Updated chart versions for Kubernetes (0.21.0), Postgres (0.12.0), and
Monitoring (1.10.0).
- Updated version mappings for Kubernetes, Postgres, and Monitoring
packages.
- Increased memory allocation for QEMU virtual machine tests from 8 GB
to 14 GB.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-28 23:20:11 +02:00
kklinch0
225d103509 [k8s] add topologySpreadConstraints for client k8s cluster
Signed-off-by: kklinch0 <kklinch0@gmail.com>
2025-05-28 23:17:00 +02:00
Andrei Kvapil
0e22e3c12c [virtual-machine] fix: specify ports even for wholeIP mode (#1000)
There is an issue with wholeIP services: internal communication from
pods doesn't work as expected.

Cilium intercepts pod-to-pod traffic, preventing cozy-proxy from
rewriting the source IP in return packets.

This PR allows Cilium to handle specified ports, enabling hairpin
traffic to work correctly at least for these cases.

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

## Summary by CodeRabbit

- **Bug Fixes**
- Improved service port configuration to ensure explicit port
definitions are respected when using the "WholeIP" method. Now, custom
external ports will not be overridden, providing more accurate and
expected service exposure.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-28 20:53:20 +02:00
Andrei Kvapil
7b8e7e40ce [virtual-machine] fix: specify ports even for wholeIP mode
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-05-28 20:12:30 +02:00
Nick Volynkin
c941e487fb [docs] Review the tenant Kubernetes cluster docs (#969)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Documentation**
- Completely overhauled and expanded the Managed Kubernetes Service
guide for Cozystack.
- Added detailed explanations of service architecture, tenant isolation,
and use cases.
- Included step-by-step instructions for accessing tenant clusters and
kubeconfig files.
- Expanded configuration parameters with clear tables and
recommendations.
- Introduced a comprehensive resource reference and improved
descriptions of instance types and series.
- Enhanced configuration schema descriptions for clearer resource
specification and standardized addon settings.
- Updated configuration file comments for improved clarity and
consistency without changing functionality.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-28 21:00:06 +07:00
Nick Volynkin
8386e985f2 [docs] Review the tenant Kubernetes cluster docs
Signed-off-by: Nick Volynkin <nick.volynkin@gmail.com>
2025-05-28 15:15:03 +03:00
Andrei Kvapil
e4c944488f [dx] remove version_map and building for library charts (#998)
We do not build helm charts directly for library, since in run-time they
are useless.
Let's remove version_map for them as well

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


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

## Summary by CodeRabbit

- **Chores**
- Simplified project build scripts by removing obsolete version mapping
and related checks.
  - Deleted the outdated versions mapping file for the library package.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-28 13:10:50 +02:00
Andrei Kvapil
99a7754c00 [virtual-machine] Set PortList method by default (#996)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>


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

- **New Features**
- Updated default traffic passthrough method for virtual machine and VM
instance apps to use specific port forwarding instead of whole IP
forwarding.

- **Documentation**
- Updated documentation to reflect the new default passthrough method
for both virtual machine and VM instance apps.

- **Chores**
- Incremented version numbers for virtual machine and VM instance apps
to reflect recent updates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-28 13:02:06 +02:00
Andrei Kvapil
6cbfab9b2a [dx] remove version_map and building for library charts
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-05-28 12:01:31 +02:00
Andrei Kvapil
461f756c88 [virtual-machine] Set PortList method by default
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2025-05-28 11:55:52 +02:00