Commit Graph

1105 Commits

Author SHA1 Message Date
Risha Mars a0a2adc52c
Don't start a Top in the resource detail page if the resource is unmeshed (#1563)
Don't start a Top in the resource detail page if the resource is unmeshed.
Instead, show a call to action showing how to add linkerd.
2018-08-31 14:04:59 -07:00
Risha Mars f396459033
Remove the SocialLinks from the Sidebar (#1565)
Remove twitter, github and slack links from the sidebar.
The "Update Linkerd" menu item will still show up if there's an update.
The "Update now" button will also still show.
2018-08-31 12:34:56 -07:00
Risha Mars 41e5a76355
Update CHANGES.md for v18.8.4 release (#1562) 2018-08-30 14:09:43 -07:00
Risha Mars 249b51f950
Increase MaxRps in Tap server, remove default setting from Web (#1560)
Increase the MaxRps on the tap server to 100 RPS.

The max RPS for tap/top was increased in for the CLI #1531, but we were
still manually setting this to 1 RPS in the Web UI and Web server.

Remove the pervasive setting of MaxRps to 1 in the web frontend and server
2018-08-30 13:37:37 -07:00
Risha Mars d0c5dbd386
Fix query string in version url (#1559)
s/?/&
2018-08-30 10:57:02 -07:00
Risha Mars d3544d4064
Fix sidebar resource names not appearing (#1556)
In #1536 I removed the entire title attribute instead of removing 
the spans in the title, causing the titles to not appear.

Re-add the title text.
2018-08-29 15:57:17 -07:00
Thomas Rampelberg b0d027aeef
Allow cookies for versioncheck (#1551) 2018-08-29 15:49:57 -07:00
Risha Mars dbaf4bd3a4
Update CHANGES.md for v18.8.3 release (#1549) 2018-08-29 12:25:21 -07:00
Risha Mars 78fa120cae
Don't use prefixed fetch for version check (#1548)
In #1540 I moved the version check code and was using our prefixed version of
fetch. This is unnecessary because the version check URL doesn't depend on the
dashboard URL prefix.

TLDR Don't use prefixed fetch for version check
2018-08-29 12:17:14 -07:00
Risha Mars f9b27c7ef2
Miscellaneous small web UI fixes (#1536)
A bunch of small items. 

This branch:
- filters out un-meshed resources from the Tap and Top autocompletes
- removes an un-rendered title attribute from the sidebar menu items
- formats latency in Tap with a comma
- prevents the grafana link from showing if there are 0 pods in a deployment
2018-08-29 10:56:07 -07:00
Sebastian Tiedtke dc4c28345a Better visual distinction of inline code snippet in mesh completion message (#1539)
When the mesh completion message calls to action it prints a CLI command to copy&paste. It's visually hard to separate message from the command snippet which is what this commit fixes.

Flipped background and font color to create a better visual distinction

Successfully ran web app test suite

Signed-off-by: Sebastian Tiedtke <sebastiantiedtke@gmail.com>
2018-08-28 14:37:38 -07:00
Risha Mars 77ddd142c3
Perform linkerd version check once upon page load (#1540)
Previously, we included a version check in the server polling loop, which meant
we were hitting the version check endpoint once very 10 seconds from the
sidebar. This PR moves that check out of the loop so that we only hit it once,
upon pageload.

This PR also includes

- some whitespace fixes 
- a fix for a console error we were triggering with our tests
2018-08-28 14:36:11 -07:00
Alex Leong 0f7d684ca9
Increase default max-rps for tap and top (#1531)
The default value for the max-rps argument to the tap and top commands is an overly conservative 1rps.  This causes the data to come in very slowly and much data to be discarded.  Furthermore, because tap requests are windowed to 10 seconds, this causes long pauses between updates.

We fix this in two ways.  Firstly we reduce the window size to 1s so that updates will come in at least once per second, even when the actual RPS of the data path is extremely high.  Secondly, we increase the default max-rps parameter from 1 to 100.  This allows tap to paint an accurate picture of the data much more quickly and sidesteps some sampling bias that happens when the max-rps is low.

In general, tap events tend to happen in bursts.  For example, one request in may trigger one or more requests out.  Likewise, a single upstream event may trigger several requests to the tapped pod in quick succession.  Sampling bias will occur when the max-rps is less than the actual rps and when the tap event limit subdivides these event bursts (biasing towards the first few events in the burst).  The greater the max-rps, the less the effects of this bias.

Fixes #1525 

Signed-off-by: Alex Leong <alex@buoyant.io>
2018-08-28 14:16:39 -07:00
Risha Mars 136b9cc7c1
Add linkerd check flag to run data plane checks (#1528)
Adds a --proxy flag to the linkerd check CLI command which will run 
to-be-implemented data plane checks
2018-08-28 10:16:24 -07:00
Risha Mars fff09c5d06
Only tap pods that are meshed (#1535)
Previously, we would tap any resource's pods, regardless of whether the pods
were meshed or not. We can't actually tap non-meshed pods, so I'm adding a check
that will filter out non-meshed pods from the pods that tap watches.

Previous behaviour:
When attempting to hang a non meshed pod, it would establish
a watch on the pods, but then never return any results. In the CLI you could
just cancel it with Ctrl-C. In the web, clicking Stop would send a
WebSocket.close(1000) but wouldn't actually close the connection... 

Behaviour after change :
If no pods under the specified resource are meshed, it'll
return an error of no pods being found to tap
2018-08-28 09:59:52 -07:00
Dennis Adjei-Baah 097632a2f0
Add kubernetes style sidebar (#1500)
Linkerd CLI's "look and feel" is similar to Kubernetes kubectl CLI. Linkerd's dashboard can be extended to match Kubernetes dashboard UI.

This PR serves as a starting point for this work. The new sidebar shows all resources from all namespaces on initial page load. Resources can be filtered to show only items in a given namespace. The sidebar displays authority, deployment, service and, pod resources. We may need to think about whether it is necessary to show all resources types. Some resources, i.e. authorities, contain a large cardinality of resource details and may not be very useful to a user.

fixes #1449

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-08-27 12:59:37 -07:00
Risha Mars 27e52a6cc0
Add ReadinessProbe and LivenessProbe to injected proxy containers (#1530)
Adds basic probes to the linkerd-proxy containers injected by linkerd inject.

- Currently the Readiness and Liveness probes are configured to be the same. 
- I haven't supplied a periodSeconds, but the default is 10.
- I also set the initialDelaySeconds to 10, but that might be a bit high.

https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
2018-08-27 11:55:17 -07:00
Alex Leong 1f42996889
Document tps-reports (#1509)
It's not obvious from the name what the tps-reports API endpoint does.

Added a few comments to clarify.

Signed-off-by: Alex Leong <alex@buoyant.io>
2018-08-24 13:26:35 -07:00
Risha Mars 1d3580ba0c
Add success rate visuals to the octopus graph (#1519)
Add gauge chart to octopus cards
2018-08-24 10:10:27 -07:00
Kevin Lingerfelt de71132c21
Remove doc dir in favor of linkerd/website repo (#1511)
* rm doc dir in favor of linkerd/website repo
* Add note about doc source code in README

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-08-23 21:53:09 -07:00
Risha Mars 63be9b1a3d
Add top link to sidebar, fix js error (#1508)
- Add a link to Top in the sidebar
- Fix a console error caused by having duplicate react keys
2018-08-22 18:19:17 -07:00
Risha Mars 3fde755a8f
Add top request table to resource detail page (#1507)
Includes a substantial refactor of Top.jsx to move the websocket
and top-request-aggregation code into a self-contained module
so that this code can be shared by /top and by each resource
detail page.

(This refactor also helps separate concerns in that
page; since that page also makes 10 second requests to the stat
api to populate the autocompletes in the form).

The TopModule uses the startTap prop to figure out whether it
should start a websocket connection and make a tap request
when mounted. (This is because the resource detail pages
start tapping immediately upon load, whereas /top can only
start once you've entered a query.

I've removed the spinner and the awaitingWebSocketConnection
state field because that now belongs in the top module. I think a
similar refactor of tap would be good before we re-add it.
2018-08-22 18:18:35 -07:00
Kevin Lingerfelt 211fca1806
Update CHANGES.md for v18.8.2 release (#1506)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-08-22 12:59:20 -07:00
Kevin Lingerfelt 4450a7536d
Add --wait flag for CLI check and dashboard commands (#1503)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-08-22 12:56:42 -07:00
Kevin Lingerfelt 49f6c4c770
Refactor healthcheck init and observe setup (#1502)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-08-22 12:30:45 -07:00
Risha Mars 062d35db7d
Start tweaking the look and feel of the Octopus graph (#1501)
Do a little more work to get the octopus graph closer to the mocks.
This version gives you a slightly better navigational sense of where 
you are in the app, and gives you a clearer
view of the neighbouring stats
2018-08-22 10:43:27 -07:00
Risha Mars cc98b5e784
Add the basis for an octopus graph to resource detail page (#1494)
Add a basic top graph depicting the current resource's stats 
and it's upstreams and downstreams. 

Also add upstreams and downstreams tables for this resource

This will be styled more later, but just getting the basic components 
and data onto the page.
2018-08-21 15:01:34 -07:00
Kevin Lingerfelt 5fc63cde10
Add check for running pods in control plane namepsace (#1498)
* Add check for running pods in control plane namepsace
* Better pod validation logic

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-08-21 14:36:49 -07:00
Risha Mars da07d5db14
Add pod table to resource detail page (#1491)
Add a pod table to the Resource Detail page showing metrics 
for pods belonging to a resource.

In the future, I think we'll modify the stat summary endpoint to 
take multiple resources as arguments, and have the resource detail page 
first query for the pods associated with the resource and then 
query for stats for those pods.

See #1467 for discussion.

This PR also modifies the queries to not use the withREST component, in anticipation of the above changes.
2018-08-21 11:38:34 -07:00
Eliza Weisman efabd90ff7
Fix missing ns/svc labels in metadata hydrated by Tap server (#1496)
Fixes #1493.

When the tap server hydrates metadata for the source or destination peer
of a Tap event from the peer's IP address, it doesn't currently add a
namespace label. However, destinations labeled by the proxy do have such
a label.

This is because the tap server currently gets the hydrated labels from
the `GetPodLabels` function, which is also used by the Destination
service for labeling the individual endpoints in a `WeightedAddrSet`
response. However, the Destination service also adds some labels to all
the endpoints in the set, including the namespace and service, so
`GetPodLabels` doesn't return these labels. However, when the tap server
uses that function, it does not add the service or namespace labels.

This branch fixes this issue by adding those labels to the Tap event 
after calling `GetPodLabels`. In addition, it fixes a missing space 
between the `src/dst_res` and `src/dst_ns` labels in Tap CLI output
with the `-o wide` flag set. This issue was introduced during the 
review of #1437, but was missed at the time because the namespace label
wasn't being set correctly.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-08-20 18:09:34 -07:00
Kevin Lingerfelt 53cd3b50d5
Add --pre flag for linkerd check command (#1497)
* Add --pre flag for linkerd check command
* Small adjustments to check help text

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-08-20 17:09:43 -07:00
Kevin Lingerfelt e97be1f5da
Move all healthcheck-related code to pkg/healthcheck (#1492)
* Move all healthcheck-related code to pkg/healthcheck
* Fix failed check formatting
* Better version check wording

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-08-20 16:50:22 -07:00
Eliza Weisman b8434d60d4
Add resource metadata to Tap CLI output (#1437)
Closes #1170.

This branch adds a `-o wide` (or `--output wide`) flag to the Tap CLI.
Passing this flag adds `src_res` and `dst_res` elements to the Tap
output, as described in #1170. These use the metadata labels in the tap
event to describe what Kubernetes resource the source and destination
peers belong to, based on what resource type is being tapped, and fall
back to pods if either peer is not a member of the specified resource
type.

In addition, when the resource type is not `namespace`, `src_ns` and
`dst_ns` elements are added, which show what namespaces the the source
and destination peers are in. For peers which are not in the Kubernetes
cluster, none of these labels are displayed.

The source metadata added in #1434 is used to populate the `src_res` and
`src_ns` fields.

Also, this branch includes some refactoring to how tap output is
formatted.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-08-20 14:25:26 -07:00
Kevin Lingerfelt 7c07ba0d53
Upgrade to dep 0.5.0, go 1.10.3 (#1479)
* Upgrade to dep 0.5.0, go 1.10.3
* Remove existing dep binary if it's the wrong version
* Add version in filename of dep binary to prevent version conflicts

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-08-17 16:04:50 -07:00
Risha Mars d1ab629953
Add grafana icon to links, refactor svgs, link to ResourceDetail component (#1482)
This PR started out as a PR to link to our Resource Detail dashboard in 
addition to grafana in the resource list pages, but I decided to refactor 
the way we deal with our svgs since I was here.

This branch:
- modifies the GrafanaLink component to consist of the grafana icon 
that links to grafana adds links to the ResourceDetail page in all our metrics tables
- adds a jsx component we can use to wrap svgs so that we don't get 
annoying 404s on images that we have to handle
- remove the relative paths hack for images
- removes unused svg files in /img
2018-08-17 15:12:33 -07:00
Risha Mars 3e73c096e9
Remove the ScatterPlot code from /web (#1485)
Remove old unused graphs from the web code (scatter plot and line graph)
and their associated css

Files removed: 
web/app/css/line-graph.css
web/app/css/list.css
web/app/css/scatterplot.css
web/app/css/version.css
web/app/js/components/LineGraph.jsx
web/app/js/components/ScatterPlot.jsx
2018-08-17 14:40:45 -07:00
Risha Mars 1bf280b105
Add resource detail skeleton page (#1476)
Add a barebones resource detail page. We'll use the kubernetes REST style
api for locating specific resource pages.

Example URLS:
http://localhost:8084/namespaces/emojivoto/pods/emoji-7578f4f846-m6872
http://localhost:8084/namespaces/emojivoto/deployments/voting
2018-08-17 10:53:05 -07:00
Dennis Adjei-Baah a3bd861667
Add a meshed column to metrics tables in the web UI (#1466)
Currently conduit stat outputs a column that shows the number of meshed pods in the resource being
queried. The web UI does not have this information about meshed pod state.

This commit adds a meshed column for better UI parity with the stat command.

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-08-16 11:14:01 -07:00
Risha Mars 70babbaeba
linkerd top GUI (#1454)
Add a Top page to the linkerd web UI. This is the web equivalent of #1435.
I've used the same fields as in the current implementation.
This branch also includes some slight refactors to the Tap code to enable code reuse.

The request processing logic is pretty similar to that in Tap.jsx, except that we can 
immediately discard the result once we receive the response end and aggregate 
that result into the top results. So the index of tap results will tend to be smaller 
(unless they're long running requests like streaming). But we also add a similar 
index of aggregated Top results, and discard oldest results if top has been
running for a long time.

* Add a Top page to the web UI
* Refactor Tap event parsing into common util code
* Small refactors to the TapQueryForm and the CliCmd display to accomodate Top
* Collate tap events based on the ID (src, dst, stream)
* Also refactor keying of req/rsp/end into requestInit/responseInit/responseEnd for clarity
* Use pod labels when present in top
* Fix bug where src/dst were switched in the Tap display table
2018-08-16 10:51:19 -07:00
Alex Leong 094a375015
[RFC] linkerd top (#1435)
This an initial implementation of the `linkerd top` command.  This command launches an ncurses style tabular view of current requests (using data from tap).  Most of the command line arguments are the same as tap and allow selecting the resource to inspect and filtering which requests to view.  

Fixes #1283 

Signed-off-by: Alex Leong <alex@buoyant.io>
2018-08-15 18:10:23 -07:00
Alena Varkockova 05515adeaf Fix the installation path in docs (#1439)
Signed-off-by: Alena Varkockova <varkockova.a@gmail.com>
2018-08-15 11:31:01 -07:00
Risha Mars e5ab124d76
Refactor Tap query form into its own component (#1446)
Tap.jsx is really large and contains a lot of logic that pertains only to the Tap Query Form.
This PR tries to separate the concerns of the form and the query display from the main 
Tap querying and rendering logic. 
This will also allow us to easily reuse this form/CLI formatting for the Top page.

Changes in this PR:

* moves all the code for the form into its own component (TapQueryForm)
* moves the code that displays the current query into its own component (TapQueryCliCmd)
* formats the current tap query as the equivalent command line format that you 
can paste into a terminal
2018-08-14 11:29:35 -07:00
Risha Mars 0750e47203
Make use of new src and dst metadata hydration (#1444)
Now that we have source metadata in tap events, we can display 
the pod name in the UI instead of the IP. I've also added a popover 
that shows deploy and pod info if we have it.

Also adds another table in the expanded row view to show all the 
metadata we have. This table probably won't stick around forever, 
but I'm just displaying all the data we have right now.
2018-08-13 16:21:41 -07:00
Eliza Weisman cda05aa34c
Add inbound destination label hydration to Tap server (#1442)
Based on @adleong's suggestion in
https://github.com/linkerd/linkerd2/pull/1434#pullrequestreview-145428857,
this branch adds label hydration from destination IPs to the Tap server.
This works the same as the label hydration for destination IPs added in
#1434. However, it is only applied to the destination fields of events
recorded by proxies in the inbound direction, since outbound
destinations are already labeled with metadata provided by the
Destination service.

This means that when a user taps inbound traffic, the CLI will show k8s
metadata labels for the destination peer (if it's available). This can
be useful especially when tapping several pods at once, as it makes it
easier to distinguish what pod received a request.

This branch also refactors how the label hydration is performed,
primarily to make adding it to the destination field less repetitive.
Also, the `hydrateIPLabels` function now mutates the label map in the
`TapEvent`, rather than returning a new map of labels, so that the case
where no pod was found doesn't require an additional allocation of an
empty map.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-08-13 13:46:33 -07:00
Eliza Weisman bf7fc12f5c
Add source metadata to Tap server tap events (#1434)
The `TapEvent` protobuf contains two maps, `DestinationMeta` and
`SourceMeta`. The `DestinationMeta` contains all the metadata provided
by the proxy that originated the event (ultimately originating from the
Destination service), while the `SourceMeta` currently only contains the
source connection's TLS status.

This branch modifies the Tap server to hydrate the same set of metadata
from the source IP address, when the source was within the cluster. It
does this by adding an indexer of pod IPs to pods to its k8s API client,
and looking up IPs against this index. If a pod was found, the extra
metadata is added to the tap event sent to the client.

This branch also changes the client so that if a source pod name was
provided in the metadata, it prints the pod name rather than the IP
address for the `src` field in its output. This mimics what is currently
done for the `dst` field in tap output. Furthermore, the added source
metadata will be necessary for adding src resource types to tap output
(see issue #1170).

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-08-13 13:25:14 -07:00
Risha Mars 142d1d8747
Correctly pass tap errors into the ErrorBanner component (#1443)
We have a new format for displaying errors in ErrorBanner. 
When a websocket error occurred, we'd pass in text where ErrorBanner 
expects and object. This PR puts the websocket errors in an object

Also clean up the display of the error by removing redundant text.
2018-08-13 12:20:12 -07:00
Risha Mars e63e28e243
Fix tap start/stop button not toggling at the right time (#1432)
Problem:
We depend on the websocketRequestSent bool (renamed to 
tapRequestInProgress in this branch) to determine whether the 
start/stop button says start or stop. However, we don't change 
this value in setState until we open the websocket connection 
(which could take some time). This led to a delay in when you 
press the Start button and when it changes colour.

Solution:
Set the state before waiting for the websocket to open, so the 
button colour changes immediately and the form feels more responsive
2018-08-10 12:12:40 -07:00
Kevin Lingerfelt 00a0572098
Better CLI error messages when control plane is unavailable (#1428)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-08-09 15:40:41 -07:00
Risha Mars 38c4b2937a
Tap web UI: Fix latency formatting (#1429)
* Nicely format tap latencies to be more readable
* Various whitespace cleanups
2018-08-09 15:23:34 -07:00
Adam Christian f510d7ea08
Changing the statusText to be an object with more fields, then displa… (#1395)
* Changing the statusText to be an object with more fields, then displaying them in the ErrorBanner

Signed-off-by: Adam Christian <adam@buoyant.io>

Refactoring karma tests and propTypes and defaultProps per the code review from @rmars

Signed-off-by: Adam Christian <adam@buoyant.io>

Changing the default message to pass the ServiceMeshTest ErrorBanner assertion

Revert "Changing the default message to pass the ServiceMeshTest ErrorBanner assertion"

This reverts commit 2415b7099b03ad7a8deda9f67218bb531111b3ec.

Fixing the failing karma unit tests because the statusMessage wasn't being properly passed into the component rendering stub context

Signed-off-by: Adam Christian <adam@buoyant.io>

merging master in

Signed-off-by: Adam Christian <adam@buoyant.io>

* Export api error type independently from ApiHelpers

Signed-off-by: Adam Christian <adam@buoyant.io>
2018-08-08 15:45:08 -07:00