Skip to content

Commit 6ba41fb

Browse files
authored
Merge pull request #17507 from hakman/azure-test
azure: Use creation timestamp tag in e2e tests
2 parents b00fdd1 + 8bcaa7e commit 6ba41fb

File tree

2 files changed

+4
-2
lines changed
  • protokube/pkg/gossip/azure
  • tests/e2e/kubetest2-kops/deployer

2 files changed

+4
-2
lines changed

protokube/pkg/gossip/azure/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (m *instanceComputeMetadata) GetTags() (map[string]string, error) {
4242
tags := map[string]string{}
4343
l := strings.Split(m.Tags, ";")
4444
for _, t := range l {
45-
tl := strings.Split(t, ":")
45+
tl := strings.SplitN(t, ":", 2)
4646
if len(tl) != 2 {
4747
return nil, fmt.Errorf("unexpected tag format: %s", tl)
4848
}

tests/e2e/kubetest2-kops/deployer/up.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ func (d *deployer) createCluster(zones []string, adminAccess string, yes bool) e
192192
args = appendIfUnset(args, "--master-size", "c5.large")
193193
}
194194
case "azure":
195-
args = appendIfUnset(args, "--cloud-labels", "DO-NOT-DELETE=kOps")
195+
// Ensure https://github.com/Azure/rg-cleanup deletes removes resources
196+
args = appendIfUnset(args, "--cloud-labels", "creationTimestamp="+time.Now().Format(time.RFC3339))
197+
// Use SKUs for which there is enough quota
196198
args = appendIfUnset(args, "--control-plane-size", "Standard_D4s_v3")
197199
args = appendIfUnset(args, "--node-size", "Standard_D2s_v3")
198200
case "gce":

0 commit comments

Comments
 (0)