linkerd2/pkg/healthcheck
Alejandro Pedraza a04b30d2ab
Simplify SelfCheck API (#5665)
Fixes #5575

Now that only viz makes use of the `SelfCheck` api, merged the `healthcheck.proto` into `viz.proto`.

Also removed the "checkRPC" functionality that was used for handling multiple API responses and was only used by `SelfCheck`, because the extra complexity was not granted. Revert to use the plain vanilla "check" by just concatenating error responses.

## Success Output

```bash
$ bin/linkerd viz check
...
linkerd-viz
-----------
...
√ viz extension self-check
```

## Failure Examples

Failure when viz fails to connect to the k8s api:
```bash
$ bin/linkerd viz check
...
linkerd-viz
-----------
...
× viz extension self-check
    Error calling the Kubernetes API: someerror
    see https://linkerd.io/checks/#l5d-api-control-api for hints

Status check results are ×
```

Failure when viz fails to connect to Prometheus:
```bash
$ bin/linkerd viz check
...
linkerd-viz
-----------
...
× viz extension self-check
    Error calling Prometheus from the control plane: someerror
    see https://linkerd.io/checks/#l5d-api-control-api for hints

Status check results are ×
```

Failure when viz fails to connect to both the k8s api and Prometheus:
```bash
$ bin/linkerd viz check
...
linkerd-viz
-----------
...
× viz extension self-check
    Error calling the Kubernetes API: someerror
    Error calling Prometheus from the control plane: someerror
    see https://linkerd.io/checks/#l5d-api-control-api for hints

Status check results are ×
```
2021-02-05 10:13:45 -05:00
..
healthcheck.go Simplify SelfCheck API (#5665) 2021-02-05 10:13:45 -05:00
healthcheck_output.go Extract from public-api all the Prometheus dependencies, and moves things into a new viz component 'linkerd-metrics-api' (#5560) 2021-01-21 18:26:38 -05:00
healthcheck_test.go Simplify SelfCheck API (#5665) 2021-02-05 10:13:45 -05:00
sidecar.go Push docker images to ghcr.io instead of gcr.io (#4953) 2020-09-10 15:16:24 -05:00
sidecar_test.go Add unit test for pkg/healthcheck/sidecar.go (#5609) 2021-01-27 16:56:14 -05:00
version.go Consolidate timeouts for `linkerd check` (#2191) 2019-02-05 11:38:30 -05:00
version_test.go Enable `unused` linter (#2357) 2019-02-23 11:05:39 -08:00