Skip to content

Commit

Permalink
Add etcd CLI to arkade
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Harding <kyle@balena.io>
  • Loading branch information
klutchell committed Jul 14, 2023
1 parent a4dd601 commit 303ddd1
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,6 @@ There are 56 apps that you can install on your cluster.
| [bun](https://github.com/oven-sh/bun) | Bun is an incredibly fast JavaScript runtime, bundler, transpiler and package manager – all in one. |
| [butane](https://github.com/coreos/butane) | Translates human readable Butane Configs into machine readable Ignition Configs |
| [caddy](https://github.com/caddyserver/caddy) | Caddy is an extensible server platform that uses TLS by default |
| [cilium](https://github.com/cilium/cilium-cli) | The cilium CLI. |
| [cilium](https://github.com/cilium/cilium-cli) | CLI to install, manage & troubleshoot Kubernetes clusters running Cilium. |
| [civo](https://github.com/civo/cli) | CLI for interacting with your Civo resources. |
| [clusterawsadm](https://github.com/kubernetes-sigs/cluster-api-provider-aws) | Kubernetes Cluster API Provider AWS Management Utility |
Expand All @@ -730,6 +729,7 @@ There are 56 apps that you can install on your cluster.
| [doctl](https://github.com/digitalocean/doctl) | Official command line interface for the DigitalOcean API. |
| [eksctl](https://github.com/weaveworks/eksctl) | Amazon EKS Kubernetes cluster management |
| [eksctl-anywhere](https://github.com/aws/eks-anywhere) | Run Amazon EKS on your own infrastructure |
| [etcd](https://github.com/etcd-io/etcd) | Distributed reliable key-value store for the most critical data of a distributed system. |
| [faas-cli](https://github.com/openfaas/faas-cli) | Official CLI for OpenFaaS. |
| [firectl](https://github.com/firecracker-microvm/firectl) | Command-line tool that lets you run arbitrary Firecracker MicroVMs |
| [flux](https://github.com/fluxcd/flux2) | Continuous Delivery solution for Kubernetes powered by GitOps Toolkit. |
Expand Down Expand Up @@ -817,7 +817,7 @@ There are 56 apps that you can install on your cluster.
| [run-job](https://github.com/alexellis/run-job) | Run a Kubernetes Job and get the logs when it's done. |
| [scaleway-cli](https://github.com/scaleway/scaleway-cli) | Scaleway CLI is a tool to help you pilot your Scaleway infrastructure directly from your terminal. |
| [seaweedfs](https://github.com/seaweedfs/seaweedfs) | SeaweedFS is a fast distributed storage system for blobs, objects, files, and data lake, for billions of files! |
| [sops](https://github.com/mozilla/sops) | Simple and flexible tool for managing secrets |
| [sops](https://github.com/getsops/sops) | Simple and flexible tool for managing secrets |
| [stern](https://github.com/stern/stern) | Multi pod and container log tailing for Kubernetes. |
| [syft](https://github.com/anchore/syft) | CLI tool and library for generating a Software Bill of Materials from container images and filesystems |
| [talosctl](https://github.com/siderolabs/talos) | The command-line tool for managing Talos Linux OS. |
Expand All @@ -838,6 +838,6 @@ There are 56 apps that you can install on your cluster.
| [waypoint](https://github.com/hashicorp/waypoint) | Easy application deployment for Kubernetes and Amazon ECS |
| [yq](https://github.com/mikefarah/yq) | Portable command-line YAML processor. |
| [yt-dlp](https://github.com/yt-dlp/yt-dlp) | Fork of youtube-dl with additional features and fixes |
There are 137 tools, use `arkade get NAME` to download one.
There are 138 tools, use `arkade get NAME` to download one.

> Note to contributors, run `arkade get --format markdown` to generate this list
52 changes: 52 additions & 0 deletions pkg/get/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,58 @@ func Test_DownloadK9s(t *testing.T) {
}
}

func Test_DownloadEtcd(t *testing.T) {
tools := MakeTools()
name := "etcd"

tool := getTool(name, tools)

const toolVersion = "v3.4.27"

tests := []test{
{
os: "linux",
arch: arch64bit,
version: toolVersion,
url: `https://github.com/etcd-io/etcd/releases/download/v3.4.27/etcd-v3.4.27-linux-amd64.tar.gz`,
},
{
os: "darwin",
arch: arch64bit,
version: toolVersion,
url: `https://github.com/etcd-io/etcd/releases/download/v3.4.27/etcd-v3.4.27-darwin-amd64.zip`,
},
{
os: "windows",
arch: arch64bit,
version: toolVersion,
url: `https://github.com/etcd-io/etcd/releases/download/v3.4.27/etcd-v3.4.27-windows-amd64.zip`,
},
{
os: "linux",
arch: archARM64,
version: toolVersion,
url: `https://github.com/etcd-io/etcd/releases/download/v3.4.27/etcd-v3.4.27-linux-arm64.tar.gz`,
},
{
os: "ming",
arch: arch64bit,
version: toolVersion,
url: `https://github.com/etcd-io/etcd/releases/download/v3.4.27/etcd-v3.4.27-windows-amd64.zip`,
},
}

for _, tc := range tests {
got, err := tool.GetURL(tc.os, tc.arch, tc.version, false)
if err != nil {
t.Fatal(err)
}
if got != tc.url {
t.Errorf("want: %s, got: %s", tc.url, got)
}
}
}

func Test_DownloadCivo(t *testing.T) {
tools := MakeTools()
name := "civo"
Expand Down
28 changes: 28 additions & 0 deletions pkg/get/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,34 @@ https://storage.googleapis.com/kubernetes-release/release/{{.Version}}/bin/{{$os
{{- end -}}`,
})

tools = append(tools,
Tool{
Owner: "etcd-io",
Repo: "etcd",
Name: "etcd",
Description: "Distributed reliable key-value store for the most critical data of a distributed system.",
BinaryTemplate: `
{{$ext := "zip"}}
{{- if eq .OS "linux" -}}
{{$ext = "tar.gz"}}
{{- end -}}
{{$arch := .Arch}}
{{ if (eq .Arch "x86_64") -}}
{{$arch = "amd64"}}
{{- else if eq .Arch "aarch64" -}}
{{$arch = "arm64"}}
{{- end -}}
{{$osString:= .OS}}
{{ if HasPrefix .OS "ming" -}}
{{$osString = "windows"}}
{{- end -}}
{{.Name}}-{{.Version}}-{{$osString}}-{{$arch}}.{{$ext}}
`,
})

tools = append(tools,
Tool{
Owner: "cnrancher",
Expand Down

0 comments on commit 303ddd1

Please sign in to comment.