Limit VM of guest cluster in the same namespace

  • Related issues: #2354 [FEATURE] Limit all VMs of the Harvester guest cluster in the same namespace

Category:

  • Rancher integration

Verification Steps

  1. Import Harvester from Rancher
  2. Access Harvester via virtualization management
  3. Create a test project and ns1 namespace
  4. Create two RKE1 node template, one set to default namespace and another set to ns1 namespace
  5. Create a RKE1 cluster, select the first pool using the first node template
  6. Create another pool, check can’t select the second node template
  7. Create a RKE2 cluster, set the first pool using specific namespace
  8. Add another machine pool, check it will automatically assigned the same namespace as the first pool

Expected Results

  • On RKE2 cluster page, when we select the first machine pool to specific namespace, then the second pool will automatically and can only use the same namespace as the first pool

    • Using default namespace
      image
    • Using custrom namespace image
  • On RKE1 node template page, when we create two node template with different namespace image

    • In RKE1 cluster page, pool 1 can select both rke1-template and rke1-template2 image

    • But pool 2 can’t select rke1-template2 if rke1-template have already selected by pool image