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 committed Oct 17, 2024
1 parent 0f87fbd commit e2e21d8
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 1 deletion.
3 changes: 2 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 Down Expand Up @@ -913,6 +914,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 156 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 @@ -7816,3 +7816,59 @@ func Test_Download_labctl(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 @@ -4266,5 +4266,35 @@ https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Name}}
labctl_{{$os}}_{{$arch}}.{{$ext}}
`,
})

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 e2e21d8

Please sign in to comment.