linkerd2/pkg/healthcheck
Tarun Pothulapati defdbbf738
checks: make hintBaseURL configurable (#5921)
* checks: make hintBaseURL configurable

Fixes #5740

Currently, When external binaries use the `healthcheck` pkg, They
can't really override the `hintBaseURL` variable which is used
to set the baseURL of the troubleshooting doc (in which hintAnchor
is used as a anchor).

This PR updates that by adding a new `hintBaseURL` field to
`healthcheck.Category`. This field has been added to `Category`
instead of `Checker` so as to reduce unecessary redundancy as
the chances of setting a different baseURL for checkers under
the same category is very low.

This PR also updates the `runChecks` logic to automatically fallback
onto the linkerd troubleshooting doc as the baseURL so that all
the current checks don't have to set this field. This can be done
otherwise (i.e removing the fallback logic and make all categories
specify the URL) if there is a problem.

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2021-03-23 23:16:56 +05:30
..
healthcheck.go checks: make hintBaseURL configurable (#5921) 2021-03-23 23:16:56 +05:30
healthcheck_output.go checks: make hintBaseURL configurable (#5921) 2021-03-23 23:16:56 +05:30
healthcheck_test.go checks: make hintBaseURL configurable (#5921) 2021-03-23 23:16:56 +05:30
sidecar.go docker: Access container images via cr.l5d.io (#5756) 2021-02-17 14:31:54 -08:00
sidecar_test.go docker: Access container images via cr.l5d.io (#5756) 2021-02-17 14:31:54 -08: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