cozystack/packages/apps
Nikita 7fa875db52
[virtual-machine,vm-instance] Add nodeAffinity for Windows VMs based on scheduling config (#1693)
This PR adds nodeAffinity configuration to virtual-machine and
vm-instance charts to support dedicated nodes for Windows VMs.

## Changes
- Added logic to check `cozystack-scheduling` ConfigMap in `cozy-system`
namespace
- If `dedicatedNodesForWindowsVMs` is enabled, adds appropriate
nodeAffinity:
- **Windows VMs**: Strong affinity (required) to nodes with label
`scheduling.cozystack.io/vm-windows=true`
- **Non-Windows VMs**: Soft affinity (preferred) to nodes without the
Windows label

## Implementation
- Windows detection based on `instanceProfile` value starting with
"windows"
- Strong affinity uses `requiredDuringSchedulingIgnoredDuringExecution`
- Soft affinity uses `preferredDuringSchedulingIgnoredDuringExecution`
with weight 100

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

* **New Features**
* Added configurable node-affinity for VM scheduling: when the cluster
scheduling flag is enabled, Windows VMs are placed on dedicated Windows
nodes (required rule), while non-Windows VMs are preferred to avoid
those nodes (soft preference).
* Change is gated by the cluster scheduling configuration and only
affects placement rules; no other VM specs were altered.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-23 15:39:19 +03:00
..
bucket [cozystack-api] Implement TenantNamespace, TenantModules, TenantSecret and TenantSecretsTable resources 2025-09-24 18:27:54 +02:00
clickhouse [dx] JSDoc compatible syntax for values.yaml 2025-10-29 08:57:26 +05:00
ferretdb [dx] JSDoc compatible syntax for values.yaml 2025-10-29 08:57:26 +05:00
foundationdb [dx] JSDoc compatible syntax for values.yaml 2025-10-29 08:57:26 +05:00
http-cache Release v0.38.1 (#1668) 2025-11-27 15:53:53 +01:00
kafka [dx] JSDoc compatible syntax for values.yaml 2025-10-29 08:57:26 +05:00
kubernetes Granular kubernetes application extensions dependencies (#1683) 2025-12-05 14:44:53 +01:00
mysql [mariadb] Add version management system with automated version updates 2025-12-02 00:36:00 +01:00
nats Use dig function to check for existing secret in NATS app template and prevent nil indexing 2025-11-05 18:12:23 -06:00
postgres [postgres] Add version management system with automated version updates 2025-12-01 23:56:55 +01:00
rabbitmq [dx] JSDoc compatible syntax for values.yaml 2025-10-29 08:57:26 +05:00
redis [redis] Add version management system with automated version updates 2025-12-02 00:34:52 +01:00
tcp-balancer [dx] JSDoc compatible syntax for values.yaml 2025-10-29 08:57:26 +05:00
tenant Introduce better cleanup logic 2025-11-26 19:01:03 +01:00
virtual-machine [virtual-machine,vm-instance] Add nodeAffinity for Windows VMs based on scheduling config (#1693) 2025-12-23 15:39:19 +03:00
vm-disk [virtual-machine] Improve check for resizing job 2025-12-09 17:08:16 +01:00
vm-instance [virtual-machine,vm-instance] Add nodeAffinity for Windows VMs based on scheduling config 2025-12-09 13:27:55 +01:00
vpc [vpc] Fix access to subnet details configmap 2025-11-17 19:00:41 +03:00
vpn [dx] JSDoc compatible syntax for values.yaml 2025-10-29 08:57:26 +05:00
Makefile Allign timeouts for HelmReleases 2025-09-24 16:54:17 +02:00
README.md [clickhouse] add clickhouse keeper 2025-08-07 14:07:05 +03:00

How to test packages local

cd packages/core/installer
make image-cozystack REGISTRY=YOUR_CUSTOM_REGISTRY
make apply
kubectl delete po -l app=source-controller -n cozy-fluxcd