-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
Background
The CLI's code for running healthchecks, creating k8s clients, and public API clients has evolved organically. Much of it currently lives in:
- https://github.com/linkerd/linkerd2/blob/c56766a923a07e7eebb4d92f2cc305d7e77407e9/cli/cmd/public_api.go
- https://github.com/linkerd/linkerd2/blob/c56766a923a07e7eebb4d92f2cc305d7e77407e9/pkg/healthcheck/healthcheck.go
Proposal
Reevaluate the underlying APIs provided to the CLI, with these basic use cases:
- Consolidate k8s APIs #2747 create a k8s client (maybe strictly a clientset, consider deprecating
KubernetesAPI?) - create a public API client
- run some arbitrary set of healthchecks
- use
cobra.SilenceUsage, so we can return errors fromRunE, rather than callingos.Exit(1)as we do inLine 690 in c56766a
func exitIfClusterExists() { - move
public_api.goout of./cli/cmd, since it's not really a command
motivated by: #2719 (comment)
Reactions are currently unavailable