Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
r2k1 committed Nov 21, 2024
1 parent d377f72 commit 1e4f26f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion e2e/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func getOrCreateCluster(ctx context.Context, t *testing.T, cluster *armcontainer
// we need to recreate in the case where the cluster is in the "Succeeded" provisioning state,
// though it's corresponding node resource group has been garbage collected
t.Logf("node resource group of cluster %s does not exist, will attempt to recreate", *cluster.Name)
return createNewAKSClusterWithRetry(ctx, t, cluster, config.ResourceGroupName)
return createNewAKSClusterWithRetry(ctx, t, cluster)
}
return &existingCluster.ManagedCluster, nil
case "Creating", "Updating":
Expand All @@ -180,6 +180,15 @@ func getOrCreateCluster(ctx context.Context, t *testing.T, cluster *armcontainer
}
}

func isExistingResourceGroup(ctx context.Context, resourceGroupName string) (bool, error) {
rgExistence, err := config.Azure.ResourceGroup.CheckExistence(ctx, resourceGroupName, nil)
if err != nil {
return false, fmt.Errorf("failed to get RG %q: %w", resourceGroupName, err)
}

return rgExistence.Success, nil
}

func createNewAKSCluster(ctx context.Context, t *testing.T, cluster *armcontainerservice.ManagedCluster) (*armcontainerservice.ManagedCluster, error) {
t.Logf("creating or updating cluster %s in rg %s\n", *cluster.Name, *cluster.Location)
// Note, it seems like the operation still can start a trigger a new operation even if nothing has changes
Expand Down

0 comments on commit 1e4f26f

Please sign in to comment.