@@ -64,15 +64,16 @@ func setupSpecNamespace(ctx context.Context, specName string, clusterProxy frame
6464}
6565
6666type cleanupInput struct {
67- SpecName string
68- ClusterProxy framework.ClusterProxy
69- ArtifactFolder string
70- Namespace * corev1.Namespace
71- CancelWatches context.CancelFunc
72- Cluster * clusterv1.Cluster
73- IntervalsGetter func (spec , key string ) []interface {}
74- SkipCleanup bool
75- AdditionalCleanup func ()
67+ SpecName string
68+ ClusterProxy framework.ClusterProxy
69+ ClusterctlConfigPath string
70+ ArtifactFolder string
71+ Namespace * corev1.Namespace
72+ CancelWatches context.CancelFunc
73+ Cluster * clusterv1.Cluster
74+ IntervalsGetter func (spec , key string ) []interface {}
75+ SkipCleanup bool
76+ AdditionalCleanup func ()
7677}
7778
7879func dumpSpecResourcesAndCleanup (ctx context.Context , input cleanupInput ) {
@@ -90,9 +91,11 @@ func dumpSpecResourcesAndCleanup(ctx context.Context, input cleanupInput) {
9091 Byf ("Dumping all the Cluster API resources in the %q namespace" , input .Namespace .Name )
9192 // Dump all Cluster API related resources to artifacts before deleting them.
9293 framework .DumpAllResources (ctx , framework.DumpAllResourcesInput {
93- Lister : input .ClusterProxy .GetClient (),
94- Namespace : input .Namespace .Name ,
95- LogPath : filepath .Join (input .ArtifactFolder , "clusters" , input .ClusterProxy .GetName (), "resources" ),
94+ Lister : input .ClusterProxy .GetClient (),
95+ KubeConfigPath : input .ClusterProxy .GetKubeconfigPath (),
96+ ClusterctlConfigPath : input .ClusterctlConfigPath ,
97+ Namespace : input .Namespace .Name ,
98+ LogPath : filepath .Join (input .ArtifactFolder , "clusters" , input .ClusterProxy .GetName (), "resources" ),
9699 })
97100
98101 if input .SkipCleanup {
@@ -104,8 +107,9 @@ func dumpSpecResourcesAndCleanup(ctx context.Context, input cleanupInput) {
104107 // that cluster variable is not set even if the cluster exists, so we are calling DeleteAllClustersAndWait
105108 // instead of DeleteClusterAndWait
106109 framework .DeleteAllClustersAndWait (ctx , framework.DeleteAllClustersAndWaitInput {
107- ClusterProxy : input .ClusterProxy ,
108- Namespace : input .Namespace .Name ,
110+ ClusterProxy : input .ClusterProxy ,
111+ ClusterctlConfigPath : input .ClusterctlConfigPath ,
112+ Namespace : input .Namespace .Name ,
109113 }, input .IntervalsGetter (input .SpecName , "wait-delete-cluster" )... )
110114
111115 Byf ("Deleting namespace used for hosting the %q test spec" , input .SpecName )
0 commit comments