linkerd2/pkg/k8s
Alex Leong 47f4cf461f
Add support for serverauthorization and httproute types to viz stat (#9074)
We updated the `linkerd viz stat` command so that it may target ServerAuthorization and HTTPRoute resources.

For HTTPRoute, we also add an `Unauthorized` column which mirrors the column of the same name when printing stats for `Servers`.  This shows the RPS of denied requests to the target HTTPRoute.  Furthermore, we also add a "Server" column which shows which Server the route is attached to.

Sample output:

```console
> linkerd -n emojivoto viz stat authorizationpolicies                    
NAME              SUCCESS      RPS   LATENCY_P50   LATENCY_P95   LATENCY_P99
emoji-grpc        100.00%   2.0rps           1ms           1ms           1ms
linkerd-metrics   100.00%   0.4rps           1ms           1ms           1ms
linkerd-probes    100.00%   0.8rps           1ms           1ms           1ms
prom                    -        -             -             -             -
web-public         50.00%   2.0rps           1ms           2ms           2ms
> linkerd -n emojivoto viz stat httproutes           
NAME                     SERVER   UNAUTHORIZED   SUCCESS      RPS   LATENCY_P50   LATENCY_P95   LATENCY_P99
linkerd-metrics   linkerd-admin         0.0rps   100.00%   0.4rps           1ms           1ms           1ms
linkerd-probes    linkerd-admin         0.0rps   100.00%   0.8rps           1ms           1ms           1ms
```

Signed-off-by: Alex Leong <alex@buoyant.io>
2022-08-09 12:57:50 -07:00
..
resource go: Enable `errorlint` checking (#7885) 2022-02-16 18:32:19 -07:00
testdata Fix handling of kubeconfig server urls that include paths (#2305) 2019-02-18 17:57:27 -08:00
api.go Bump minimum kubernetes version to 1.21 (#8647) 2022-06-14 15:15:28 -07:00
api_test.go Add linkerd viz authz command (#6875) 2021-09-21 09:36:05 -07:00
authz.go Fix server access check error (#8777) 2022-07-06 14:06:25 -07:00
authz_test.go Fix server access check error (#8777) 2022-07-06 14:06:25 -07:00
completion.go Fix namespace always showing up in topology graph (#6236) 2021-06-09 15:31:11 +05:30
fake.go Fix server access check error (#8777) 2022-07-06 14:06:25 -07:00
fake_test.go Use go-test/deep for comparisons in tests (#8427) 2022-05-05 09:31:07 -07:00
k8s.go Add support for serverauthorization and httproute types to viz stat (#9074) 2022-08-09 12:57:50 -07:00
k8s_test.go Fix spelling mistakes using codespell (#4700) 2020-07-07 17:07:22 -05:00
kubectl.go Check kubectl version as part of checks (#2358) 2019-03-01 10:03:59 -08:00
kubectl_test.go Check kubectl version as part of checks (#2358) 2019-03-01 10:03:59 -08:00
labels.go inject: add `config.linkerd.io/shutdown-grace-period` annotation (#8923) 2022-07-19 14:43:38 -07:00
labels_test.go Use go-test/deep for comparisons in tests (#8427) 2022-05-05 09:31:07 -07:00
metrics.go Remove linkerd-viz dependency from linkerd-mutlicluster `gateways` command (#8467) 2022-05-31 13:51:38 -06:00
policy.go Add support for serverauthorization and httproute types to viz stat (#9074) 2022-08-09 12:57:50 -07:00
portforward.go Generate ipv4 and ipv6 compat URL address for Linkerd2 (#8598) 2022-06-06 12:19:47 +01:00
portforward_test.go Add tests regarding pod ownership (#6673) 2021-08-16 10:53:30 -07:00
version.go Remove kubectl dependency, validate k8s server version via api (#396) 2018-02-20 12:14:11 -08:00
version_test.go Remove kubectl dependency, validate k8s server version via api (#396) 2018-02-20 12:14:11 -08:00