Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add kwokctl to arkade get tools
Browse files Browse the repository at this point in the history
Signed-off-by: Czékus Máté <mate@picloud.hu>

--amend

Signed-off-by: Czékus Máté <mate@picloud.hu>
Shikachuu committed Nov 12, 2023
1 parent 1ed0e39 commit 0638b55
Showing 3 changed files with 62 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -814,6 +814,8 @@ There are 56 apps that you can install on your cluster.
| [kubeval](https://github.com/instrumenta/kubeval) | Validate your Kubernetes configuration files, supports multiple Kubernetes versions |
| [kumactl](https://github.com/kumahq/kuma) | kumactl is a CLI to interact with Kuma and its data |
| [kustomize](https://github.com/kubernetes-sigs/kustomize) | Customization of kubernetes YAML configurations |
| [kwok](https://github.com/kubernetes-sigs/kwok) | KWOK stands for Kubernetes WithOut Kubelet, responsible for simulating the lifecycle of fake nodes, pods, and other Kubernetes API resources |
| [kwokctl](https://github.com/kubernetes-sigs/kwok) | CLI tool designed to streamline the creation and management of clusters, with nodes simulated by `kwok` |
| [kyverno](https://github.com/kyverno/kyverno) | CLI to apply and test Kyverno policies outside a cluster. |
| [lazygit](https://github.com/jesseduffield/lazygit) | A simple terminal UI for git commands. |
| [linkerd2](https://github.com/linkerd/linkerd2) | Ultralight, security-first service mesh for Kubernetes. |
@@ -868,6 +870,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 141 tools, use `arkade get NAME` to download one.
There are 143 tools, use `arkade get NAME` to download one.

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

func Test_DownloadKwokctl(t *testing.T) {
var (
tools = MakeTools()
name = "kwokctl"
toolVersion = "v0.4.0"
tool = getTool(name, tools)
)

tests := []test{
{
os: "linux",
version: toolVersion,
arch: arch64bit,
url: `https://github.com/kubernetes-sigs/kwok/releases/download/v0.4.0/kwokctl-linux-amd64`,
},
{
os: "darwin",
version: toolVersion,
arch: archDarwinARM64,
url: `https://github.com/kubernetes-sigs/kwok/releases/download/v0.4.0/kwokctl-darwin-arm64`,
},
{
os: "darwin",
version: toolVersion,
arch: arch64bit,
url: `https://github.com/kubernetes-sigs/kwok/releases/download/v0.4.0/kwokctl-darwin-amd64`,
},
}

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)
}
}
}
19 changes: 19 additions & 0 deletions pkg/get/tools.go
Original file line number Diff line number Diff line change
@@ -3911,5 +3911,24 @@ https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Repo}}
kwok-{{$os}}-{{$arch}}{{$ext}}`,
})

tools = append(tools,
Tool{
Owner: "kubernetes-sigs",
Repo: "kwok",
Name: "kwokctl",
Description: "CLI tool designed to streamline the creation and management of clusters, with nodes simulated by `kwok`",
BinaryTemplate: `
{{ $os := .OS }}
{{ $arch := .Arch }}
{{- if (or (eq .Arch "aarch64") (eq .Arch "arm64")) -}}
{{ $arch = "arm64" }}
{{- else if eq .Arch "x86_64" -}}
{{ $arch = "amd64" }}
{{- end -}}
kwokctl-{{$os}}-{{$arch}}`,
})
return tools
}

0 comments on commit 0638b55

Please sign in to comment.