From 102beeee35259d296356b0aaa52fc4629c0c0cc9 Mon Sep 17 00:00:00 2001 From: Richard Gee Date: Wed, 5 Jun 2024 18:12:08 +0100 Subject: [PATCH 1/2] remove k10multicluster from downloads Signed-off-by: Richard Gee --- README.md | 3 +-- pkg/get/get_test.go | 5 +++-- pkg/get/tools.go | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cd7284e49..75a39d671 100644 --- a/README.md +++ b/README.md @@ -823,7 +823,6 @@ There are 56 apps that you can install on your cluster. | [just](https://github.com/casey/just) | Just a command runner | | [k0s](https://github.com/k0sproject/k0s) | Zero Friction Kubernetes | | [k0sctl](https://github.com/k0sproject/k0sctl) | A bootstrapping and management tool for k0s clusters | -| [k10multicluster](https://github.com/kastenhq/external-tools) | Multi-cluster support for K10. | | [k10tools](https://github.com/kastenhq/external-tools) | Tools for evaluating and debugging K10. | | [k3d](https://github.com/k3d-io/k3d) | Helper to run Rancher Lab's k3s in Docker. | | [k3s](https://github.com/k3s-io/k3s) | Lightweight Kubernetes | @@ -915,6 +914,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 154 tools, use `arkade get NAME` to download one. +There are 153 tools, use `arkade get NAME` to download one. > Note to contributors, run `arkade get --format markdown` to generate this list diff --git a/pkg/get/get_test.go b/pkg/get/get_test.go index fef593d2e..910ddf1ba 100644 --- a/pkg/get/get_test.go +++ b/pkg/get/get_test.go @@ -3326,7 +3326,8 @@ func Test_DownloadKubestr(t *testing.T) { } } -func Test_DownloadK10multicluster(t *testing.T) { +//(Temporarily disable k10multicluster as the binaries are not available at v7.0.0) +/*func Test_DownloadK10multicluster(t *testing.T) { tools := MakeTools() name := "k10multicluster" v := "4.0.6" @@ -3358,7 +3359,7 @@ func Test_DownloadK10multicluster(t *testing.T) { } }) } -} +}*/ func Test_DownloadK10tools(t *testing.T) { tools := MakeTools() diff --git a/pkg/get/tools.go b/pkg/get/tools.go index 080e0f6de..874d2bad7 100644 --- a/pkg/get/tools.go +++ b/pkg/get/tools.go @@ -2034,7 +2034,8 @@ https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Repo}} BinaryTemplate: `{{.Name}}`, }) - tools = append(tools, + //(Temporarily disable k10multicluster as the binaries are not available at v7.0.0) + /* tools = append(tools, Tool{ Owner: "kastenhq", Repo: "external-tools", @@ -2055,7 +2056,7 @@ https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Repo}} {{.Name}}_{{.Version}}_{{$osStr}}_{{$archStr}}.tar.gz`, }) - + */ tools = append(tools, Tool{ Owner: "kastenhq", From 7b80c5a12561018f173b9c91de4f3975eabd3717 Mon Sep 17 00:00:00 2001 From: Richard Gee Date: Wed, 5 Jun 2024 18:44:25 +0100 Subject: [PATCH 2/2] repoint cmctl references to new github location Signed-off-by: Richard Gee --- README.md | 2 +- pkg/get/get_test.go | 23 +++++++++++++++-------- pkg/get/tools.go | 8 ++++---- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 75a39d671..6f2d47207 100644 --- a/README.md +++ b/README.md @@ -778,7 +778,7 @@ There are 56 apps that you can install on your cluster. | [cloud-hypervisor](https://github.com/cloud-hypervisor/cloud-hypervisor) | Cloud Hypervisor is an open source Virtual Machine Monitor (VMM) that runs on top of the KVM hypervisor and the Microsoft Hypervisor (MSHV). | | [clusterawsadm](https://github.com/kubernetes-sigs/cluster-api-provider-aws) | Kubernetes Cluster API Provider AWS Management Utility | | [clusterctl](https://github.com/kubernetes-sigs/cluster-api) | The clusterctl CLI tool handles the lifecycle of a Cluster API management cluster | -| [cmctl](https://github.com/cert-manager/cert-manager) | cmctl is a CLI tool that helps you manage cert-manager and its resources inside your cluster. | +| [cmctl](https://github.com/cert-manager/cmctl) | cmctl is a CLI tool that helps you manage cert-manager and its resources inside your cluster. | | [conftest](https://github.com/open-policy-agent/conftest) | Write tests against structured configuration data using the Open Policy Agent Rego query language | | [consul](https://github.com/hashicorp/consul) | A solution to connect and configure applications across dynamic, distributed infrastructure | | [copa](https://github.com/project-copacetic/copacetic) | CLI for patching container images | diff --git a/pkg/get/get_test.go b/pkg/get/get_test.go index 910ddf1ba..dcc88ed55 100644 --- a/pkg/get/get_test.go +++ b/pkg/get/get_test.go @@ -6415,44 +6415,51 @@ func Test_DownloadCmctl(t *testing.T) { tool := getTool(name, tools) - const toolVersion = "v1.14.5" + const toolVersion = "v2.0.0" tests := []test{ { os: "linux", arch: arch64bit, version: toolVersion, - url: `https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager-cmctl-linux-amd64.tar.gz`, + url: `https://github.com/cert-manager/cmctl/releases/download/v2.0.0/cmctl_linux_amd64`, }, { os: "darwin", arch: arch64bit, version: toolVersion, - url: `https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager-cmctl-darwin-amd64.tar.gz`, + + url: `https://github.com/cert-manager/cmctl/releases/download/v2.0.0/cmctl_darwin_amd64`, }, { os: "linux", arch: archARM64, version: toolVersion, - url: `https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager-cmctl-linux-arm64.tar.gz`, + url: `https://github.com/cert-manager/cmctl/releases/download/v2.0.0/cmctl_linux_arm64`, }, { os: "darwin", arch: archDarwinARM64, version: toolVersion, - url: `https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager-cmctl-darwin-arm64.tar.gz`, + url: `https://github.com/cert-manager/cmctl/releases/download/v2.0.0/cmctl_darwin_arm64`, }, { os: "linux", arch: archARM7, version: toolVersion, - url: `https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager-cmctl-linux-arm.tar.gz`, + url: `https://github.com/cert-manager/cmctl/releases/download/v2.0.0/cmctl_linux_arm`, }, { os: "ming", arch: arch64bit, version: toolVersion, - url: `https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager-cmctl-windows-amd64.zip`, + url: `https://github.com/cert-manager/cmctl/releases/download/v2.0.0/cmctl_windows_amd64.exe`, + }, + { + os: "ming", + arch: archARM64, + version: toolVersion, + url: `https://github.com/cert-manager/cmctl/releases/download/v2.0.0/cmctl_windows_arm64.exe`, }, } @@ -6462,7 +6469,7 @@ func Test_DownloadCmctl(t *testing.T) { t.Fatal(err) } if got != tc.url { - t.Errorf("want: %s, got: %s", tc.url, got) + t.Errorf("\nwant: %s, \n got: %s", tc.url, got) } } } diff --git a/pkg/get/tools.go b/pkg/get/tools.go index 874d2bad7..1ff14077f 100644 --- a/pkg/get/tools.go +++ b/pkg/get/tools.go @@ -3593,13 +3593,13 @@ https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Repo}} tools = append(tools, Tool{ Owner: "cert-manager", - Repo: "cert-manager", + Repo: "cmctl", Name: "cmctl", Description: "cmctl is a CLI tool that helps you manage cert-manager and its resources inside your cluster.", BinaryTemplate: ` {{$os := .OS}} {{$arch := "arm"}} - {{$ext := "tar.gz"}} + {{$ext := ""}} {{- if or (eq .Arch "aarch64") (eq .Arch "arm64") -}} {{$arch = "arm64"}} {{- else if eq .Arch "x86_64" -}} @@ -3607,9 +3607,9 @@ https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Repo}} {{- end -}} {{ if HasPrefix .OS "ming" -}} {{$os = "windows"}} - {{$ext = "zip"}} + {{$ext = ".exe"}} {{- end -}} - cert-manager-cmctl-{{$os}}-{{$arch}}.{{$ext}} + cmctl_{{$os}}_{{$arch}}{{$ext}} `, })