Open jonrichards opened 5 years ago
Somewhat related to #1903 (on the control plane side).
I think https://github.com/linkerd/linkerd2/pull/2274 would be pretty slick as part of the CLI update, fwiw
@grampelberg @olix0r I am planning to work on auto-update feature for gsoc. This issue was referred to in the gsoc issue and i find it suitable for me at this stage. I have started implementing a solution. Firstly, we will list all the version of linkerd2 using github api, then use will select one. If the $HOME/.linkerd2/bin is present then replace the linkerd2 binary, else ask use to choose directory or use which. And for major version changes seek user permission. This will work like node version manager.
Rather than needing to run
curl -sL https://run.linkerd.io/install | sh
to get a new version of the CLI, it would be nice if the CLI provided a mechanism for updating itself (e.g.linkerd cli-update
).A naive implementation would just be to wrap
curl -sL https://run.linkerd.io/install | sh
into something likelinkerd cli-update
. That might be a suitable first step. Some things to consider:curl -sL https://run.linkerd.io/install | sh
installs the linkerd CLI to$HOME/.linkerd2/bin
. However, the end user may have moved the CLI to a different location, so at minimum acli-update
command should verify$HOME/.linkerd2/bin
exists before proceeding. If it doesn't exist, it's probably best not to "update" a new version there. Maybe the update logic should attempt to locate wherelinkerd
is at (which linkerd
?), or prompt the user to provide a location?