Skip to content

Add --pre flag for linkerd check command#1495

Closed
klingerf wants to merge 1 commit intomasterfrom
kl/pre-install-check
Closed

Add --pre flag for linkerd check command#1495
klingerf wants to merge 1 commit intomasterfrom
kl/pre-install-check

Conversation

@klingerf
Copy link
Contributor

This branch updates linkerd check to accept a --pre flag, which will cause the command to run a subset of checks to validate that linkerd can be installed (fixes #1470). It will also validate that the linkerd namespace does not already exist (fixes #1473).

I made one additional change as part of this branch, which is to bypass the kubernetes server version check when running other linkerd subcommands. As it was previously written, those subcommands would preemptively fail if the kubernetes cluster did not meet the minimum required version. It seems better to let those commands run, and only warn in the check output if the minimum server version is not met.

Fixes #1470.
Fixes #1473.

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
@klingerf klingerf self-assigned this Aug 20, 2018
@klingerf klingerf requested review from dadjeibaah and rmars August 20, 2018 22:38
@siggy siggy added the review label Aug 20, 2018
@klingerf
Copy link
Contributor Author

The pre-install check output looks like this:

$ ./bin/go-run cli check --pre --expected-version $(bin/root-tag)
kubernetes-api: can initialize the client..................................[ok]
kubernetes-api: can query the Kubernetes API...............................[ok]
kubernetes-api: is running the minimum Kubernetes API version..............[ok]
linkerd-api: control plane namespace does not already exist................[ok]
linkerd-version: can get the latest version................................[ok]
linkerd-version: cli is up-to-date.........................................[ok]

Status check results are [ok]

Copy link

@rmars rmars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐎 🐑 nice!!!

@klingerf klingerf closed this Aug 20, 2018
@siggy siggy removed the review label Aug 20, 2018
@klingerf klingerf changed the base branch from kl/check-refactor to master August 21, 2018 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add pre-install check to validate that linkerd is not already installed Update linkerd check with support for --pre flag

3 participants