Skip to content

fix(vm): make virtualMachineCIDRs optional#2591

Draft
diafour wants to merge 1 commit into
mainfrom
fix/vm/main-network-is-optional-cidrs-not-required-in-module-config
Draft

fix(vm): make virtualMachineCIDRs optional#2591
diafour wants to merge 1 commit into
mainfrom
fix/vm/main-network-is-optional-cidrs-not-required-in-module-config

Conversation

@diafour

@diafour diafour commented Jul 3, 2026

Copy link
Copy Markdown
Member

Description

Allow ModuleConfig without spec.settings.virtualMachineCIDRs.

What changed:
- Make virtualMachineCIDRs optional in OpenAPI schema.
- Stop blocking module enablement when CIDRs are not configured.
  - Make ModuleConfig CIDR parsing safe when the field is absent.
  - Skip CIDR overlap checks when virtualMachineCIDRs is not set.
- New behavior when CIDRs are not configured:
  - Reject VMs with explicit Main network.
  - Reject VMIP usage and VirtualMachineIPAddress resources.
- Validate changing ModuleConfig: protect removing CIDRs if VMIP leases are present.

Also updated docs and tests.

Why do we need it, and what problem does it solve?

What is the expected result?

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: vm
type: fix
summary: "Allow VM creation when ModuleConfig configured without spec.settings.virtualMachineCIDRs."

@diafour diafour added this to the v1.10.0 milestone Jul 3, 2026
Allow ModuleConfig without spec.settings.virtualMachineCIDRs.

What changed:
- Make virtualMachineCIDRs optional in OpenAPI schema.
- Stop blocking module enablement when CIDRs are not configured.
  - Make ModuleConfig CIDR parsing safe when the field is absent.
  - Skip CIDR overlap checks when virtualMachineCIDRs is not set.
- New behavior when CIDRs are not configured:
  - Reject VMs with explicit Main network.
  - Reject VMIP usage and VirtualMachineIPAddress resources.
- Validate changing ModuleConfig: protect removing CIDRs if VMIP leases are present.

Also updated docs and tests.

Signed-off-by: Ivan Mikheykin <ivan.mikheykin@flant.com>
@diafour diafour force-pushed the fix/vm/main-network-is-optional-cidrs-not-required-in-module-config branch from 69366eb to a8a31b9 Compare July 3, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant