Skip to content

Add ARM target for binaries - #1722

Merged
adamreese merged 4 commits into
helm:masterfrom
nlamirault:patch-1
Jan 3, 2017
Merged

adamreese merged 4 commits into
helm:masterfrom
nlamirault:patch-1

Conversation

@nlamirault

@nlamirault nlamirault commented Dec 19, 2016 •

Copy link
Copy Markdown
Contributor
$ make build-cross dist VERSION=v2.1.0
CGO_ENABLED=0 gox -output="_dist/{{.OS}}-{{.Arch}}/{{.Dir}}" -osarch='linux/arm'  -tags '' -ldflags ' -X k8s.io/helm/pkg/version.Version=v2.1.0 -X k8s.io/helm/pkg/version.GitCommit=b3d812b3462e5ac8192f656c7098b1b54f29ffa3 -X k8s.io/helm/pkg/version.GitTreeState=dirty -extldflags "-static"' k8s.io/helm/cmd/helm
Number of parallel builds: 3

-->       linux/arm: k8s.io/helm/cmd/helm
CGO_ENABLED=0 gox -output="_dist/{{.OS}}-{{.Arch}}/{{.Dir}}" -osarch='linux/arm'  -tags '' -ldflags ' -X k8s.io/helm/pkg/version.Version=v2.1.0 -X k8s.io/helm/pkg/version.GitCommit=b3d812b3462e5ac8192f656c7098b1b54f29ffa3 -X k8s.io/helm/pkg/version.GitTreeState=dirty -extldflags "-static"' k8s.io/helm/cmd/tiller
Number of parallel builds: 3

-->       linux/arm: k8s.io/helm/cmd/tiller
( \
        cd _dist && \
        find * -type d -exec cp ../LICENSE {} \; && \
        find * -type d -exec cp ../README.md {} \; && \
        find * -type d -exec tar -zcf helm-v2.0.0-{}.tar.gz {} \; && \
        find * -type d -exec zip -r helm-v2.0.0-{}.zip {} \; \
)
  adding: linux-arm/ (stored 0%)
  adding: linux-arm/README.md (deflated 60%)
  adding: linux-arm/helm (deflated 77%)
  adding: linux-arm/tiller (deflated 78%)
  adding: linux-arm/LICENSE (deflated 65%)
$ tar ztvf _dist/helm-v2.0.0-linux-arm.tar.gz
drwxr-xr-x nlamirault/nlamirault 0 2016-12-19 14:54 linux-arm/
-rw-r--r-- nlamirault/nlamirault 4377 2016-12-19 14:54 linux-arm/README.md
-rwxr-xr-x nlamirault/nlamirault 51778128 2016-12-19 14:52 linux-arm/helm
-rwxr-xr-x nlamirault/nlamirault 52868752 2016-12-19 14:54 linux-arm/tiller
-rw-r--r-- nlamirault/nlamirault    11373 2016-12-19 14:54 linux-arm/LICENSE

```
$ make build-cross dist VERSION=v2.2.0
CGO_ENABLED=0 gox -output="_dist/{{.OS}}-{{.Arch}}/{{.Dir}}" -osarch='darwin/amd64 linux/amd64 linux/386 windows/amd64 linux/arm'  -tags '' -ldflags ' -X k8s.io/helm/pkg/version
.Version=v2.1.0 -X k8s.io/helm/pkg/version.GitCommit=b3d812b3462e5ac8192f656c7098b1b54f29ffa3 -X k8s.io/helm/pkg/version.GitTreeState=dirty -extldflags "-static"' k8s.io/helm/cm
d/helm
Number of parallel builds: 3

-->    darwin/amd64: k8s.io/helm/cmd/helm
-->     linux/amd64: k8s.io/helm/cmd/helm
-->   windows/amd64: k8s.io/helm/cmd/helm
-->       linux/386: k8s.io/helm/cmd/helm
-->       linux/arm: k8s.io/helm/cmd/helm

```

```
$ ls -a _dist/
.   darwin-amd64                     helm-v2.2.0-linux-386.tar.gz    helm-v2.2.0-linux-arm.tar.gz      linux-386    linux-arm
..  helm-v2.2.0-darwin-amd64.tar.gz  helm-v2.2.0-linux-amd64.tar.gz  helm-v2.2.0-windows-amd64.tar.gz  linux-amd64  windows-amd64
```
@k8s-ci-robot

Copy link
Copy Markdown

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA.

Once you've signed, please reply here (e.g. "I signed it!") and we'll verify. Thanks.


Details

If you have questions or suggestions related to this bot's behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Dec 19, 2016
@nlamirault

Copy link
Copy Markdown
Contributor Author

I signed it!

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Dec 19, 2016
Comment thread Makefile Outdated
build-cross: LDFLAGS += -extldflags "-static"
build-cross:
CGO_ENABLED=0 gox -output="_dist/{{.OS}}-{{.Arch}}/{{.Dir}}" -osarch='$(TARGETS)' $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' k8s.io/helm/cmd/helm
CGO_ENABLED=0 gox -output="_dist/{{.OS}}-{{.Arch}}/{{.Dir}}" -osarch='$(TARGETS)' $(GOFLAGS) -tags '$(TAGS)' -ldflags '$(LDFLAGS)' k8s.io/helm/cmd/tiller

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would rather not do this for the following reasons:

  • it vastly inflates the size of the package -- sometimes over double the original package size
  • the only use case for running Tiller locally (rather than in-cluster) is (as far as I know) development, and in that case you tend to build from source.
  • I think it's confusing for users to find a binary tiller file installed locally, when it's not intended to be run locally

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Perhaps another thing we could do instead would be to add Tiller to its own package for those who need a prebuilt binary.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi,
Actually I needed an official ARM binary to build a Docker image for Raspberry. I change the makefile to creates 2 packages (one for helm and one for tiller).

Split helm and tiller packages.
@adamreese

Copy link
Copy Markdown
Member

It looks like this change would require an explicit binary to build. That would probably break our release process.

Maybe set APP=helm as a default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants