From d33f0130ff80df2975730d0c0960d010ae1def9f Mon Sep 17 00:00:00 2001 From: Patrick Dillon Date: Tue, 14 May 2024 19:16:44 -0400 Subject: [PATCH] cluster-api: change temporary directory path Changes the temporary directory where clusterapi dependencies are unpacked from /bin/cluster-api to /cluster-api The clusterapi teardown function only removes the cluster-api dir, so we are leaking the bin dir. There are other ways we could resolve this issue, but ultimately we don't need to create a nested temporary directory. --- pkg/clusterapi/localcontrolplane.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/clusterapi/localcontrolplane.go b/pkg/clusterapi/localcontrolplane.go index 05839ad1d7..3ab38cbbd9 100644 --- a/pkg/clusterapi/localcontrolplane.go +++ b/pkg/clusterapi/localcontrolplane.go @@ -60,7 +60,7 @@ type localControlPlane struct { // Run launches the local control plane. func (c *localControlPlane) Run(ctx context.Context) error { // Create a temporary directory to unpack the cluster-api binaries. - c.BinDir = filepath.Join(command.RootOpts.Dir, "bin", "cluster-api") + c.BinDir = filepath.Join(command.RootOpts.Dir, "cluster-api") if err := UnpackClusterAPIBinary(c.BinDir); err != nil { return fmt.Errorf("failed to unpack cluster-api binary: %w", err) }