@@ -327,7 +327,7 @@ func ClusterUpgradeWithRuntimeSDKSpec(ctx context.Context, inputGetter func() Cl
327
327
}
328
328
329
329
By ("Dumping resources and deleting the workload cluster; deletion waits for BeforeClusterDeleteHook to gate the operation" )
330
- dumpAndDeleteCluster (ctx , input .BootstrapClusterProxy , namespace .Name , clusterName , input .ArtifactFolder )
330
+ dumpAndDeleteCluster (ctx , input .BootstrapClusterProxy , input . ClusterctlConfigPath , namespace .Name , clusterName , input .ArtifactFolder )
331
331
332
332
beforeClusterDeleteHandler (ctx , input .BootstrapClusterProxy .GetClient (), clusterRef , input .E2EConfig .GetIntervals (specName , "wait-delete-cluster" ))
333
333
@@ -347,7 +347,7 @@ func ClusterUpgradeWithRuntimeSDKSpec(ctx context.Context, inputGetter func() Cl
347
347
348
348
AfterEach (func () {
349
349
// Dump all the resources in the spec namespace and the workload cluster.
350
- framework .DumpAllResourcesAndLogs (ctx , input .BootstrapClusterProxy , input .ArtifactFolder , namespace , clusterResources .Cluster )
350
+ framework .DumpAllResourcesAndLogs (ctx , input .BootstrapClusterProxy , input .ClusterctlConfigPath , input . ArtifactFolder , namespace , clusterResources .Cluster )
351
351
352
352
if ! input .SkipCleanup {
353
353
// Delete the extensionConfig first to ensure the BeforeDeleteCluster hook doesn't block deletion.
@@ -360,9 +360,10 @@ func ClusterUpgradeWithRuntimeSDKSpec(ctx context.Context, inputGetter func() Cl
360
360
// that cluster variable is not set even if the cluster exists, so we are calling DeleteAllClustersAndWait
361
361
// instead of DeleteClusterAndWait
362
362
framework .DeleteAllClustersAndWait (ctx , framework.DeleteAllClustersAndWaitInput {
363
- Client : input .BootstrapClusterProxy .GetClient (),
364
- Namespace : namespace .Name ,
365
- ArtifactFolder : input .ArtifactFolder ,
363
+ ClusterProxy : input .BootstrapClusterProxy ,
364
+ ClusterctlConfigPath : input .ClusterctlConfigPath ,
365
+ Namespace : namespace .Name ,
366
+ ArtifactFolder : input .ArtifactFolder ,
366
367
}, input .E2EConfig .GetIntervals (specName , "wait-delete-cluster" )... )
367
368
368
369
Byf ("Deleting namespace used for hosting the %q test spec" , specName )
@@ -749,7 +750,7 @@ func clusterConditionShowsHookBlocking(cluster *clusterv1.Cluster, hookName stri
749
750
strings .Contains (conditions .GetMessage (cluster , clusterv1 .TopologyReconciledCondition ), hookName )
750
751
}
751
752
752
- func dumpAndDeleteCluster (ctx context.Context , proxy framework.ClusterProxy , namespace , clusterName , artifactFolder string ) {
753
+ func dumpAndDeleteCluster (ctx context.Context , proxy framework.ClusterProxy , clusterctlConfigPath , namespace , clusterName , artifactFolder string ) {
753
754
By ("Deleting the workload cluster" )
754
755
755
756
cluster := framework .GetClusterByName (ctx , framework.GetClusterByNameInput {
@@ -763,9 +764,11 @@ func dumpAndDeleteCluster(ctx context.Context, proxy framework.ClusterProxy, nam
763
764
764
765
// Dump all Cluster API related resources to artifacts before deleting them.
765
766
framework .DumpAllResources (ctx , framework.DumpAllResourcesInput {
766
- Lister : proxy .GetClient (),
767
- Namespace : namespace ,
768
- LogPath : filepath .Join (artifactFolder , "clusters-beforeClusterDelete" , proxy .GetName (), "resources" )})
767
+ Lister : proxy .GetClient (),
768
+ KubeConfigPath : proxy .GetKubeconfigPath (),
769
+ ClusterctlConfigPath : clusterctlConfigPath ,
770
+ Namespace : namespace ,
771
+ LogPath : filepath .Join (artifactFolder , "clusters-beforeClusterDelete" , proxy .GetName (), "resources" )})
769
772
770
773
By ("Deleting the workload cluster" )
771
774
framework .DeleteCluster (ctx , framework.DeleteClusterInput {
0 commit comments