8000 Allow building storage-provisioner for other arch by afbjorklund · Pull Request #6257 · kubernetes/minikube · GitHub
[go: up one dir, main page]

Skip to content

Allow building storage-provisioner for other arch - #6257

Merged
tstromberg merged 2 commits into
kubernetes:masterfrom
afbjorklund:storage-provisioner-arch-image
Jan 30, 2020
Merged

tstromberg merged 2 commits into
kubernetes:masterfrom
afbjorklund:storage-provisioner-arch-image

Conversation

@afbjorklund
@afbjorklund afbjorklund commented Jan 9, 2020 •
Copy link
Copy Markdown
Collaborator

For #6007

Also allow building the static binary in docker


By setting GOARCH, you can cross-compile.
The default is to build for the local architecture.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 9, 2020
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afbjorklund

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 9, 2020
@codecov-io
codecov-io commented Jan 9, 2020 •
Copy link
Copy Markdown

Codecov Report

Merging #6257 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6257   +/-   ##
=======================================
  Coverage   38.23%   38.23%           
=======================================
  Files         123      123           
  Lines        8269     8269           
=======================================
  Hits         3162     3162           
  Misses       4696     4696           
  Partials      411      411

@priyawadhwa priyawadhwa left a comment •
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of having a Dockerfile per architecture, could we pass in GOARCH as a build arg to docker build?

Then we could have one Dockerfile that looks like:

FROM scratch
ARG arch
COPY out/storage-provisioner-$(arch) storage-provisioner
CMD ["/storage-provisioner"]

and one docker build command:

docker build -t $(REGISTRY)/storage-provisioner:$(STORAGE_PROVISIONER_TAG) -f deploy/storage-provisioner/Dockerfile  --build-arg arch=$(GOARCH) .

@afbjorklund
Copy link
Copy Markdown
Collaborator Author

I think that will work, would be good to add arm support - and drop ubuntu for the s390x.

Can't really verify whether that (scratch) works on the mainframe, but... it's a static binary ?

@priyawadhwa
Copy link
Copy Markdown

My guess is it would work? But that's just a guess 😅

@afbjorklund
Copy link
Copy Markdown
Collaborator Author

I think you have to be really interested, to set up a test machine for s390x:

https://astr0baby.wordpress.com/2018/06/03/installing-ubuntu-18-04-server-s390x-in-hercules-mainframe-simulator/

I would be surprised if it was more than a binary number of minikube users on it ?

And even if minikube works ok on arm/arm64, we don't really support the desktop.

@afbjorklund
afbjorklund force-pushed the storage-provisioner-arch-image branch from c0206ac to bfa7c13 Compare January 15, 2020 19:12
@afbjorklund
Copy link
Copy Markdown
Collaborator Author

@priyawadhwa : syntax was close enough, Dockerfile uses ${} while Makefile uses $()

@tstromberg
tstromberg merged commit f2b4ca4 into kubernetes:master Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

0