mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-04 11:07:03 +09:00
## What this PR does Renames the misleading `subnets` field to `networks` in VMInstance. The old field name implied the VM was creating subnets, when in reality it attaches the VM to existing VPC network attachments (NetworkAttachmentDefinitions). This change: - Adds a new `networks` field as the primary way to attach VMs to VPC networks - Keeps `subnets` as deprecated with backward-compatible fallback via Helm `default` - Fails with a clear error if both `networks` and `subnets` are set simultaneously - Adds an API-backed dropdown selector for `networks[].name` listing available NetworkAttachmentDefinitions in the namespace - Hides the deprecated `subnets` field from the dashboard UI ### Release note ```release-note [vm-instance] Rename `subnets` field to `networks` in VMInstance for clarity. The old `subnets` field is deprecated but still supported for backward compatibility. A dropdown selector for available networks has been added to the dashboard. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added native networks field for VM attachments and a UI dropdown to select network attachments; UI hides deprecated subnet fields for VM instances. * **Deprecations** * subnets is deprecated; use networks moving forward (subnets retained for backward compatibility). * **Chores / Migration** * Added a migration to copy existing subnets into networks and bumped platform migration target version. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
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