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}} `, })