linkerd / linkerd/linkerd2

idea: CLI update option

Open
#2,184 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/cli rfc
Dominant language
Go
Stars
11.5k
Forks
1.4k
Avg merge
3d 22h
Merged PRs (30d)
53

Description

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 like linkerd cli-update. That might be a suitable first step. Some things to consider:

  • Following semver, any minor version updates within the same major version should be backwards compatible and safe for the end user. Major version updates, if any, should potentially have a confirmation from the end user before proceeding. It's not clear if this is a use case that needs considered for the foreseeable future.
  • By default, running 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 a cli-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 where linkerd is at (which linkerd?), or prompt the user to provide a location?
  • Anything else?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the proposed linkerd cli-update entry point and the existing curl -sL https://run.linkerd.io/install | sh installer flow. Clarify version-update behavior, confirmation for major releases, and how to handle $HOME/.linkerd2/bin or the path returned by which linkerd; done means the CLI can safely update itself without overwriting an unknown location.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.