Skip to content

Add MeshedPodCount field to TS resource rows#4273

Merged
kleimkuhler merged 4 commits intomasterfrom
kleimkuhler/ts-stat-fix
Apr 21, 2020
Merged

Add MeshedPodCount field to TS resource rows#4273
kleimkuhler merged 4 commits intomasterfrom
kleimkuhler/ts-stat-fix

Conversation

@kleimkuhler
Copy link
Contributor

The addition of the --unmeshed flag changed the rendering behavior of the
stat command so that resources with 0 meshed pods are not displayed by
default.

Rendering is based off the row's MeshedPodCount field which is currently not
set by func trafficSplitResourceQuery. This change sets that field now so
that in rendering, the trafficsplit resource is rendered in the output.

The reason for this not showing up in testing is addressed by #4272 where the
stat command behavior for no traffic is changed.

The following now works without --unmeshed flag being passed:

❯ bin/linkerd stat -A ts
NAMESPACE   NAME                    APEX          LEAF          WEIGHT   SUCCESS   RPS   LATENCY_P50   LATENCY_P95   LATENCY_P99
default     backend-traffic-split   backend-svc   backend-svc     500m         -     -             -             -             -
default     backend-traffic-split   backend-svc   failing-svc        0         -     -             -             -             -

@kleimkuhler kleimkuhler self-assigned this Apr 17, 2020
Signed-off-by: Kevin Leimkuhler <[email protected]>
Signed-off-by: Kevin Leimkuhler <[email protected]>
@kleimkuhler
Copy link
Contributor Author

The other solution for this is that linkerd stat ts command just turns on the unmeshed flag by default.

These resources are unmeshed, so it's another reasonable solution. I chose to do use MeshedPodCount though because once the unmeshed flag is turned on, it would be on for everything in the linkerd stat command

Copy link
Member

@alpeb alpeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@kleimkuhler kleimkuhler merged commit 2c38f22 into master Apr 21, 2020
@kleimkuhler kleimkuhler deleted the kleimkuhler/ts-stat-fix branch April 21, 2020 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants