Deny the vlanconfigs overlap with the other

  • Related issues: #2828 [BUG][FEATURE] Deny the vlanconfigs overlap with the other

Category:

  • Network

Verification Steps

  1. Prepare a 3 nodes Harvester on local kvm
  2. Each VM have five NICs attached.
  3. Create a cluster network cn1
  4. Create a vlanconfig config-all which applied to all nodes image
  5. Set one of the NIC image
  6. On the same cluster network, create another vlan network config-one which applied to only node 1 image
  7. Provide another NIC image
  8. Click the create button

Expected Results

Under the same Cluster Network:

  1. When we create vlanconfig on the node that already been applied earlier by another vlanconfig, it will promopt the following error to prevent creation admission webhook "validator.harvester-system.harvester-network-webhook" denied the request: Internal error occurred: could not create vlanConfig config-one because it overlaps with other vlanconfigs matching node(s) [n1-110rc3] image