Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow building storage-provisioner for other arch #6257

Merged

Conversation

afbjorklund
Copy link
Collaborator

@afbjorklund afbjorklund commented Jan 9, 2020

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
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

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
Copy link

codecov-io commented Jan 9, 2020

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

Copy link

@priyawadhwa priyawadhwa left a comment

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
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

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

@afbjorklund
Copy link
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
Copy link
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