Skip to content

Conversation

@mergify
Copy link

@mergify mergify bot commented Jan 13, 2026

IMPORTANT: Please do not create a Pull Request without creating an issue first.

Problem:

If the name of the IPPool CR is not the same as its associated NetworkAttachmentDefinition (NAD) CR, all the VirtualMachineNetworkConfig (vmnetcfg) CR referencing the IPPool cannot be created automatically by the controller.

Solution:

Fix the vmnetcfg validating webhook logic.

Related Issue:

harvester/harvester#9710

Test plan:

  1. Create a single-node v1.7.0 Harvester cluster
  2. Enable the Managed DHCP add-on using the following manifest:
    apiVersion: harvesterhci.io/v1beta1
    kind: Addon
    metadata:
      name: harvester-vm-dhcp-controller
      namespace: harvester-system
      labels:
        addon.harvesterhci.io/experimental: "true"
    spec:
      enabled: true
      repo: https://charts.harvesterhci.io
      version: 1.6.0
      chart: harvester-vm-dhcp-controller
      valuesContent: |
        image:
          repository: starbops/harvester-vm-dhcp-controller
          tag: pool-name-hot-fix-head
        webhook:
          image:
            repository: starbops/harvester-vm-dhcp-webhook
            tag: pool-name-hot-fix-head
        agent:
          image:
            repository: starbops/harvester-vm-dhcp-agent
            tag: pool-name-hot-fix-head
  3. Create a Virtual Machine Network (NAD) called test-net
  4. Create an IPPool called test-pool (the name must be different from its associated NAD's name)
    apiVersion: network.harvesterhci.io/v1alpha1
    kind: IPPool
    metadata:
      name: test-pool
    spec:
     ipv4Config:
       cidr: 192.168.48.0/24   # please change the cidr accordingly to suit your network environment
     networkName: default/test-net
  5. Create a virtual machine test-vm and attach it to the test-net NAD
  6. The virtual machine should eventually get the allocated IP address (it should match the one reflected in the VirtualMachineNetworkConfig CR)

This is an automatic backport of pull request #77 done by [Mergify](https://mergify.com).

Signed-off-by: Zespre Chang <[email protected]>
(cherry picked from commit 52cef8c)
Signed-off-by: Zespre Chang <[email protected]>
(cherry picked from commit 854c82d)
Signed-off-by: Zespre Chang <[email protected]>
(cherry picked from commit 54275d2)
@starbops starbops merged commit 083b6c2 into v1.7 Jan 14, 2026
7 checks passed
@starbops starbops deleted the mergify/bp/v1.7/pr-77 branch January 14, 2026 00:09
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.

2 participants