Skip to content

Commit

Permalink
feat: add duplik8s to tools
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Gee <richard@technologee.co.uk>
  • Loading branch information
rgee0 authored and alexellis committed Oct 26, 2024
1 parent 152bacb commit 2350f09
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,7 @@ There are 52 apps that you can install on your cluster.
| [dive](https://github.com/wagoodman/dive) | A tool for exploring each layer in a docker image |
| [docker-compose](https://github.com/docker/compose) | Define and run multi-container applications with Docker. |
| [doctl](https://github.com/digitalocean/doctl) | Official command line interface for the DigitalOcean API. |
| [duplik8s](https://github.com/Telemaco019/duplik8s) | kubectl plugin to duplicate resources in a Kubernetes cluster. |
| [eksctl](https://github.com/eksctl-io/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. |
Expand All @@ -799,6 +800,7 @@ There are 52 apps that you can install on your cluster.
| [fstail](https://github.com/alexellis/fstail) | Tail modified files in a directory. |
| [fzf](https://github.com/junegunn/fzf) | General-purpose command-line fuzzy finder |
| [gh](https://github.com/cli/cli) | GitHub’s official command line tool. |
| [glab](https://github.com/gitlab-org/cli) | A GitLab CLI tool bringing GitLab to your command line. |
| [golangci-lint](https://github.com/golangci/golangci-lint) | Go linters aggregator. |
| [gomplate](https://github.com/hairyhenderson/gomplate) | A flexible commandline tool for template rendering. Supports lots of local and remote datasources. |
| [goreleaser](https://github.com/goreleaser/goreleaser) | Deliver Go binaries as fast and easily as possible |
Expand Down Expand Up @@ -913,6 +915,6 @@ There are 52 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 155 tools, use `arkade get NAME` to download one.
There are 157 tools, use `arkade get NAME` to download one.

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

func Test_Download_duplik8s(t *testing.T) {
tools := MakeTools()
name := "duplik8s"
const toolVersion = "v0.3.0"

tool := getTool(name, tools)

tests := []test{
{
os: "darwin",
arch: arch64bit,
version: toolVersion,
url: "https://github.com/Telemaco019/duplik8s/releases/download/v0.3.0/duplik8s_Darwin_x86_64.tar.gz",
},
{
os: "darwin",
arch: archDarwinARM64,
version: toolVersion,
url: "https://github.com/Telemaco019/duplik8s/releases/download/v0.3.0/duplik8s_Darwin_arm64.tar.gz",
},
{
os: "linux",
arch: arch64bit,
version: toolVersion,
url: "https://github.com/Telemaco019/duplik8s/releases/download/v0.3.0/duplik8s_Linux_x86_64.tar.gz",
},
{
os: "linux",
arch: archARM64,
version: toolVersion,
url: "https://github.com/Telemaco019/duplik8s/releases/download/v0.3.0/duplik8s_Linux_arm64.tar.gz",
},
{
os: "mingw64_nt-10.0-18362",
arch: arch64bit,
version: toolVersion,
url: "https://github.com/Telemaco019/duplik8s/releases/download/v0.3.0/duplik8s_Windows_x86_64.zip",
},
{
os: "mingw64_nt-10.0-18362",
arch: archARM64,
version: toolVersion,
url: "https://github.com/Telemaco019/duplik8s/releases/download/v0.3.0/duplik8s_Windows_arm64.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.Fatalf("\nwant: %s\ngot: %s", tc.url, got)
}
}
}
30 changes: 30 additions & 0 deletions pkg/get/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -4297,5 +4297,35 @@ https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Name}}
https://gitlab.com/{{.Owner}}/{{.Repo}}/-/releases/{{.Version}}/downloads/{{.Name}}_{{.VersionNumber}}_{{$osStr}}_{{$arch}}.{{$extStr}}`,
})

tools = append(tools,
Tool{
Owner: "Telemaco019",
Repo: "duplik8s",
Name: "duplik8s",
Description: "kubectl plugin to duplicate resources in a Kubernetes cluster.",
BinaryTemplate: `
{{ $os := .OS }}
{{ $arch := .Arch }}
{{ $ext := "tar.gz" }}
{{- if (or (eq .Arch "aarch64") (eq .Arch "arm64")) -}}
{{ $arch = "arm64" }}
{{- end -}}
{{ if HasPrefix .OS "ming" -}}
{{$os = "Windows"}}
{{ $ext = "zip" }}
{{- end -}}
{{- if eq .OS "darwin" -}}
{{$os = "Darwin"}}
{{- else if eq .OS "linux" -}}
{{ $os = "Linux" }}
{{- end -}}
duplik8s_{{$os}}_{{$arch}}.{{$ext}}
`,
})
return tools
}

0 comments on commit 2350f09

Please sign in to comment.