Skip to content

Commit

Permalink
fix the arch usage
Browse files Browse the repository at this point in the history
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
  • Loading branch information
dims committed May 15, 2024
1 parent 242717b commit c0aa7b9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions pkg/build/nodeimage/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/build/nodeimage/internal/kube/builder_remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c0aa7b9

Please sign in to comment.