From 101e7bbce072c58c745a035de88534262b7c6ec6 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Mon, 21 Sep 2020 10:37:55 +0300 Subject: [PATCH] Add support for ARMv7 --- .goreleaser.yml | 3 +++ cmd/gotk/install.go | 2 +- cmd/gotk/main.go | 2 +- docs/get-started/index.md | 2 +- docs/guides/installation.md | 14 +++++++++----- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index b9f9bb14..a213706b 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -9,6 +9,9 @@ builds: goarch: - amd64 - arm64 + - arm + goarm: + - 7 env: - CGO_ENABLED=0 archives: diff --git a/cmd/gotk/install.go b/cmd/gotk/install.go index 94ab6abf..62a4b9a9 100644 --- a/cmd/gotk/install.go +++ b/cmd/gotk/install.go @@ -275,7 +275,7 @@ images: {{- if eq $arch "amd64" }} newName: {{$registry}}/{{$component}} {{- else }} - newName: {{$registry}}/{{$component}}-{{$arch}} + newName: {{$registry}}/{{$component}}-arm64 {{- end }} {{- end }} {{- end }} diff --git a/cmd/gotk/main.go b/cmd/gotk/main.go index 8add651e..3ca762da 100644 --- a/cmd/gotk/main.go +++ b/cmd/gotk/main.go @@ -110,7 +110,7 @@ var ( defaultVersion = "latest" defaultNamespace = "gitops-system" defaultNotification = "notification-controller" - supportedArch = []string{"arm64", "amd64"} + supportedArch = []string{"amd64", "arm", "arm64"} supportedDecryptionProviders = []string{"sops"} supportedHelmChartSourceKinds = []string{sourcev1.HelmRepositoryKind, sourcev1.GitRepositoryKind} supportedLogLevels = []string{"debug", "info", "error"} diff --git a/docs/get-started/index.md b/docs/get-started/index.md index 7780ccd8..5dcb8411 100644 --- a/docs/get-started/index.md +++ b/docs/get-started/index.md @@ -34,7 +34,7 @@ curl -s https://toolkit.fluxcd.io/install.sh | sudo bash ``` The install script downloads the gotk binary to `/usr/local/bin`. -Binaries for macOS and Linux AMD64/ARM64 are available for download on the +Binaries for macOS and Linux AMD64/ARM are available for download on the [release page](https://github.com/fluxcd/toolkit/releases). To configure your shell to load gotk completions add to your Bash profile: diff --git a/docs/guides/installation.md b/docs/guides/installation.md index 2ed262af..5aacc7cc 100644 --- a/docs/guides/installation.md +++ b/docs/guides/installation.md @@ -23,10 +23,13 @@ With Bash: curl -s https://toolkit.fluxcd.io/install.sh | sudo bash # enable completions in ~/.bash_profile -. <(gotk completion) +. <(gotk completion bash) ``` -Binaries for macOS and Linux AMD64/ARM64 are available for download on the +Command-line completion for `zsh`, `fish`, and `powershell` +are also supported with their own sub-commands. + +Binaries for macOS and Linux AMD64/ARM are available for download on the [release page](https://github.com/fluxcd/toolkit/releases). Verify that your cluster satisfies the prerequisites with: @@ -58,9 +61,10 @@ gotk bootstrap \ --version=latest ``` -!!! hint "ARM64" - When deploying to a Kubernetes cluster with ARM 64-bit architecture, - you can use `--arch=arm64` to pull the linux/arm64 toolkit container images. +!!! hint "ARM" + When deploying to a Kubernetes cluster with ARM architecture, + you can use `--arch=arm` for ARMv7 32-bit container images + and `--arch=arm64` for ARMv8 64-bit container images. If you wish to install a specific version, use the toolkit [release tag](https://github.com/fluxcd/toolkit/releases) e.g. `--version=v0.0.14`.