From 7dd71ab3a679a6c2575d08f13e9cc1265cac3a53 Mon Sep 17 00:00:00 2001 From: Christian Schlotter Date: Fri, 30 Aug 2024 14:05:36 +0200 Subject: [PATCH] fix creating tags --- .../vcsim/controllers/vcsim_controller.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/infrastructure/vcsim/controllers/vcsim_controller.go b/test/infrastructure/vcsim/controllers/vcsim_controller.go index fe675b7ccd..000f28d960 100644 --- a/test/infrastructure/vcsim/controllers/vcsim_controller.go +++ b/test/infrastructure/vcsim/controllers/vcsim_controller.go @@ -269,15 +269,16 @@ func createGovmomiFailureDomainTags(vCenterSimulator *vcsimv1.VCenterSimulator) datacenterName := vcsimhelpers.DatacenterName(0) computeClusterName := vcsimhelpers.ClusterName(0, 0) commands := [][]string{ - {"tags.category.create", govcURLArg, "-t=Datacenter", "k8s-region"}, - {"tags.category.create", govcURLArg, "k8s-zone"}, - {"tags.create", govcURLArg, "-c", "k8s-region", datacenterName}, - {"tags.create", govcURLArg, "-c", "k8s-zone", computeClusterName}, - {"tags.attach", govcURLArg, "-c", "k8s-region", datacenterName, "/" + datacenterName}, - {"tags.attach", govcURLArg, "-c", "k8s-zone", computeClusterName, "/" + datacenterName + "/host/" + computeClusterName}, + {"tags.category.create", "-k=true", govcURLArg, "-t=Datacenter", "k8s-region"}, + {"tags.category.create", "-k=true", govcURLArg, "k8s-zone"}, + {"tags.create", "-k=true", govcURLArg, "-c", "k8s-region", datacenterName}, + {"tags.create", "-k=true", govcURLArg, "-c", "k8s-zone", computeClusterName}, + {"tags.attach", "-k=true", govcURLArg, "-c", "k8s-region", datacenterName, "/" + datacenterName}, + {"tags.attach", "-k=true", govcURLArg, "-c", "k8s-zone", computeClusterName, "/" + datacenterName + "/host/" + computeClusterName}, } for _, command := range commands { + fmt.Printf("Running command: %s", strings.Join(command, " ")) exit := cli.Run(command) if exit != 0 { return fmt.Errorf("failed to run command: %s", strings.Join(command, " "))