Commit Graph

8 Commits

Author SHA1 Message Date
Alex Leong 22a5e5fe44
Add viz and jaeger list commands (#5820)
Pods can only participate in tracing if they have been injected by the jaeger-injector.  Similarly, pods may only be tapped if they have been injected by the tap-injector.  Since pods which were already running when the injector starts will not be injected until those pods are restarted, it can be difficult to know which pods in your cluster will participate in tracing or be valid tap targets.

We add the command `linkerd viz list` to list meshed pods and indicate which can be tapped, which need to be restarted before they can be tapped, and which have tap disabled.

```console
> linkerd viz list -A
Pods with tap enabled:
	* collector-7f585dc68-z8vc8.linkerd-jaeger
	* jaeger-69fc767648-mxtc4.linkerd-jaeger
	* jaeger-injector-67fbccc487-sjh4c.linkerd-jaeger
	* grafana-84c9b569b9-27qsj.linkerd-viz
	* metrics-api-6c956b4b58-5xvz8.linkerd-viz
	* prometheus-7fdb866467-s4q5m.linkerd-viz
	* tap-768b5ddc6c-hdfb2.linkerd-viz
	* tap-injector-ff446c479-4wtsm.linkerd-viz
	* web-5f79854c4f-lpv5l.linkerd-viz
Pods missing tap configuration (restart these pods to enable tap):
	* linkerd-gateway-777b7cb9bf-7fr2n.linkerd-multicluster
	* linkerd-controller-6864cf5f8c-bxp7l.linkerd
	* linkerd-destination-67499b8df7-fqqb9.linkerd
	* linkerd-identity-7c577f7454-c2v7r.linkerd
	* linkerd-proxy-injector-c7844b9f6-hwbsm.linkerd
	* linkerd-sp-validator-f4c8cc6d6-658tb.linkerd
``` 

Similarly, we add the command `linkerd jaeger list` to list meshed pods and indicate which will participate in tracing.

```console
> linkerd jaeger list -A
Pods with tracing enabled:
	* grafana-84c9b569b9-27qsj.linkerd-viz
	* metrics-api-6c956b4b58-5xvz8.linkerd-viz
	* prometheus-7fdb866467-s4q5m.linkerd-viz
	* tap-768b5ddc6c-hdfb2.linkerd-viz
	* tap-injector-ff446c479-4wtsm.linkerd-viz
	* web-5f79854c4f-lpv5l.linkerd-viz
Pods missing tracing configuration (restart these pods to enable tracing):
	* collector-7f585dc68-z8vc8.linkerd-jaeger
	* jaeger-69fc767648-mxtc4.linkerd-jaeger
	* jaeger-injector-67fbccc487-sjh4c.linkerd-jaeger
	* linkerd-gateway-777b7cb9bf-7fr2n.linkerd-multicluster
	* linkerd-controller-6864cf5f8c-bxp7l.linkerd
	* linkerd-destination-67499b8df7-fqqb9.linkerd
	* linkerd-identity-7c577f7454-c2v7r.linkerd
	* linkerd-proxy-injector-c7844b9f6-hwbsm.linkerd
	* linkerd-sp-validator-f4c8cc6d6-658tb.linkerd
```

This commands list pods in the context's default namespcae by default, but can be configured with the usual `-n` and `-A` flags.

This replaces the jaeger extension's data plane check which gave a warning if there were pods with tracing.  That check has been removed here.

Signed-off-by: Alex Leong <alex@buoyant.io>
2021-03-01 10:16:18 -08:00
Dennis Adjei-Baah e4069b47e0
Run extension checks when linkerd check is invoked (#5647)
* Run extension checks when linkerd check is invoked

This change allows the linkerd check command to also run any known
linkerd extension commands that have been installed in the cluster. It
does this by first querying for any namespace that has the label
selector `linkerd.io/extension` and then runs the subcommands for either
`jaeger`, `multicluster` or `viz`. This change runs basic namespace
healthchecks for extensions that aren't part of the Linkerd extension suite.

Fixes #5233
2021-02-11 10:50:16 -06:00
Tarun Pothulapati 9756b3f8f1
extensions: make subcmds check/wait for respective extensions (#5566)
* extensions: make subcmds check/wait for respective extensions

This commit updates the extension subcmds to check and wait
for the respective extensions to be up before running them.

The same healthcheck pkg and respective extension checks
 are used to at the check/wait logic.

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2021-01-26 23:01:25 +05:30
Tarun Pothulapati 4f0601e632
jaeger: cli and check logic cleanup (#5564)
This branch cleans up some of the unnecessary logic that is not
needed and thus making the check logic similar to that of other
extensions, namely viz.

Includes the following cleanups:

- Remove `namespace` flag in jaeger CLI and make the fetching logic
dynamic and use it in check and dashboard.
- Use `hc.KubeAPIClient` instead of creating our own in jaeger check.
- Move injection checks up before we run the readiness checks

This change adds a new extension namespace exist check for
jaeger.

Also, Updates integration tests to run the check commands.

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2021-01-22 23:31:35 +05:30
Tarun Pothulapati 589f36c4c2
jaeger: add check sub command (#5295)
* jaeger: add check sub command

This adds a new `linkerd jaeger check` command to have checks w.r.t
jaeger extension. This is similar to that of the `linkerd check` cmd.
As jaeger is a separate package, It was a bit complex for this to work
as not all types and fields from healthcheck pkg are public, Helper
funcs were used to mitigate this.

This has the following changes:

- Adds a new `check.go` file under the jaeger extension pkg
- Moves some commonly needed funcs and types from `cli/cmd/check.go`
  and `pkg/healthcheck/health.go` into
  `pkg/healthcheck/healthcheck_output.go`.

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2020-12-17 00:26:34 +05:30
Alex Leong 74950e9407
Add jaeger uninstall command (#5353)
Add a `linkerd jaeger uninstall` command which prints the linkerd-jaeger extension resources so that they can be deleted.  This is similar to the `linkerd uninstall` command.

```
> bin/linkerd jaeger uninstall | k delete -f -
clusterrole.rbac.authorization.k8s.io "linkerd-jaeger-linkerd-jaeger-proxy-mutator" deleted
clusterrolebinding.rbac.authorization.k8s.io "linkerd-jaeger-linkerd-jaeger-proxy-mutator" deleted
mutatingwebhookconfiguration.admissionregistration.k8s.io "linkerd-proxy-mutator-webhook-config" deleted
namespace "linkerd-jaeger" deleted
```

Signed-off-by: Alex Leong <alex@buoyant.io>
2020-12-14 15:48:44 -08:00
Tarun Pothulapati f5f5da0e7e
extension: add jaeger dashboard sub-command (#5291)
This branch adds `jaeger dashboard` sub-command which is used
to view the jaeger dashboard. This follows the same logic/pattern
of that of `linkerd-dashboard`. Also, provides the same flags.

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2020-12-01 10:56:18 -08:00
Tarun Pothulapati e7f4c31257
extension: Add new jaeger binary (#5278)
* extension: Add new jaeger binary

This branch adds a new jaeger binary project in the jaeger directory.
This follows the same logic as that of `linkerd install`. But as
`linkerd install` VFS logic expects charts to be present in `/charts`
directory, This command gets its own static pkg to generate its own
VFS for its chart.

This covers only the install part of the command

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2020-11-25 20:10:35 +05:30