From c0aa7b9589a9412047eea882c2f849fb884ca057 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Wed, 15 May 2024 08:43:08 -0400 Subject: [PATCH] fix the arch usage Signed-off-by: Davanum Srinivas --- pkg/build/nodeimage/build.go | 3 --- pkg/build/nodeimage/internal/kube/builder_remote.go | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/build/nodeimage/build.go b/pkg/build/nodeimage/build.go index 8862f86ccd..624fc2d0cb 100644 --- a/pkg/build/nodeimage/build.go +++ b/pkg/build/nodeimage/build.go @@ -55,9 +55,6 @@ func Build(options ...Option) error { if ctx.kubeParam != "" { kubever, err := ParseKubernetesVersion(ctx.kubeParam) if err == nil { - if ctx.arch == "" { - ctx.arch = runtime.GOARCH - } builder, err := kube.NewRemoteBuilder(ctx.logger, "v" + kubever.String(), ctx.arch) if err != nil { return err diff --git a/pkg/build/nodeimage/internal/kube/builder_remote.go b/pkg/build/nodeimage/internal/kube/builder_remote.go index 26b459e07e..ccff6d2d1e 100644 --- a/pkg/build/nodeimage/internal/kube/builder_remote.go +++ b/pkg/build/nodeimage/internal/kube/builder_remote.go @@ -50,7 +50,7 @@ func NewRemoteBuilder(logger log.Logger, version, arch string) (Builder, error) // Build implements Bits.Build func (b *remoteBuilder) Build() (Bits, error) { - url := "https://dl.k8s.io/" + b.version + "/kubernetes-server-linux-amd64.tar.gz" + url := "https://dl.k8s.io/" + b.version + "/kubernetes-server-linux-" + b.arch + ".tar.gz" tmpDir, err := os.MkdirTemp(os.TempDir(), "k8s-tar-extract-") if err != nil {