mirror of https://github.com/linkerd/linkerd2.git
## What This change moves the `linkerd check --multicluster` functionality under it's own multicluster subcommand: `linkerd multicluster check`. There should be no functional changes as a result of this change. `linkerd check` no longer checks for anything multicluster related and the `--multicluster` flag has been removed. ## Why Closes #5208 The bulk of these changes are moving all the multicluster checks from `pkg/healthcheck` into the multicluster package. Doing this completely separates it from core Linkerd. It still uses `pkg/healtcheck` when possible, but anything that is used only by `multicluster check` has been moved. **Note the the `kubernetes-api` and `linkerd-existence` checks are run.** These checks are required for setting up the Linkerd health checker. They set the health checker's `kubeAPI`, `linkerdConfig`, and `apiClient` fields. These could be set manually so that the only check the user sees is `linkerd-multicluster`, but I chose not to do this. If any of the setting functions errors, it would just tell the user to run `linkerd check` and ensure the installation is correct. I find the user error handling to be better by including these required checks since they should be run in the first place. ## How to test Installing Linkerd and multicluster should result in a basic check output: ``` $ bin/linkerd install |kubectl apply -f - .. $ bin/linkerd check .. $ bin/linkerd multicluster install |kubectl apply -f - .. $ bin/linkerd multicluster check kubernetes-api -------------- √ can initialize the client √ can query the Kubernetes API linkerd-existence ----------------- √ 'linkerd-config' config map exists √ heartbeat ServiceAccount exist √ control plane replica sets are ready √ no unschedulable pods √ controller pod is running √ can initialize the client √ can query the control plane API linkerd-multicluster -------------------- √ Link CRD exists Status check results are √ ``` After linking a cluster: ``` $ bin/linkerd multicluster check kubernetes-api -------------- √ can initialize the client √ can query the Kubernetes API linkerd-existence ----------------- √ 'linkerd-config' config map exists √ heartbeat ServiceAccount exist √ control plane replica sets are ready √ no unschedulable pods √ controller pod is running √ can initialize the client √ can query the control plane API linkerd-multicluster -------------------- √ Link CRD exists √ Link resources are valid * k3d-y √ remote cluster access credentials are valid * k3d-y √ clusters share trust anchors * k3d-y √ service mirror controller has required permissions * k3d-y √ service mirror controllers are running * k3d-y × all gateway mirrors are healthy probe-gateway-k3d-y.linkerd-multicluster mirrored from cluster [k3d-y] has no endpoints see https://linkerd.io/checks/#l5d-multicluster-gateways-endpoints for hints Status check results are × ``` Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com> |
||
---|---|---|
.. | ||
charts | ||
cmd | ||
service-mirror | ||
static | ||
values |