alexellis / arkade

Open Source Marketplace For Developer Tools
https://blog.alexellis.io/kubernetes-marketplace-two-year-update/
MIT License
4.24k stars 287 forks source link

kubectl CLI is outdated by several versions #1048

Closed James5979 closed 6 months ago

James5979 commented 7 months ago

The default version of kubectl provided by arkade get kubectl should always track the latest version of the binary since Kubernetes uses version skew (i.e. +/- one version).

The binary for kubectl downloaded by arkade currently gives version v1.24.2 by default, i.e. when running: arkade get kubectl.

Please upgrade the default version to v1.29.3.

A nice way to automatically track the latest (stable) version of kubectl is to curl the following: curl -L -s https://dl.k8s.io/release/stable.txt.

If someone wishes to use an older version of kubectl with arkade then they can specify arkade get kubectl@TYPE_VERSION_HERE.

James5979 commented 7 months ago

arkade version output:

... Version: 0.11.6 Git Commit: acb1bd999ac81840fbbe49f3d1cc1fbd386f7fd4 ...

Apologies if you received any email noise from this issue, I accidentally submitted before I had finished writing.

alexellis commented 7 months ago

Hi @James5979 are you happy to send a PR to update to the latest version?

We can look separately at the version lookup later.

James5979 commented 7 months ago

Hi @James5979 are you happy to send a PR to update to the latest version?

Hi @alexellis,

Thank you for your quick reply.

I would create a PR, but unfortunately I do not know Go.

If you remember this being something trivial to update then I can always have a look for you.

We can look separately at the version lookup later.

Nothing major, just a suggestion for the future.

As a workaround, I can always track stable with:

arkade get kubectl@$(curl -L -s https://dl.k8s.io/release/stable.txt)

A bit out of context, but I purchased one of your inlets pro personal licenses the other day and it is amazing! I have been using the inlets operator and I will definitely update you on how it works out. 🙂

rgee0 commented 7 months ago

I've proposed a change covering the maintenance side of this

alexellis commented 6 months ago

I also updated kubectl without seeing Richard's PR.

We wanted to add a set of resolvers for versions, with the default being GitHub, then adding K8s and Hashicorp (if possible).

The Go templates won't contain a function, but would reference i.e. "resolver" as part of their definition to be used at runtime.

Would either of you like to have a go at breaking out one for GitHub releases and a separate one for the K8s stable.txt file?