Commit Graph

12 Commits

Author SHA1 Message Date
Alejandro Pedraza 5d7499dc84
Avoid the dashboard requesting stats when not needed (#3338)
* Avoid the dashboard requesting stats when not needed

Create an alternative to `urlsForResource` called
`urlsForResourceNoStats` that makes use of the `skip_stats` parameter in
the stats API (created in #1871) that doesn't query Prometheus when not needed.

When testing using the dashboard looking at the linkerd namespace,
queries per second went down from 2874 to 2756, a 4% decrease.

Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
2019-08-29 05:52:44 -05:00
Andrew Seigner e5d2460792
Remove single namespace functionality (#2474)
linkerd/linkerd2#1721 introduced a `--single-namespace` install flag,
enabling the control-plane to function within a single namespace. With
the introduction of ServiceProfiles, and upcoming identity changes, this
single namespace mode of operation is becoming less viable.

This change removes the `--single-namespace` install flag, and all
underlying support. The control-plane must have cluster-wide access to
operate.

A few related changes:
- Remove `--single-namespace` from `linkerd check`, this motivates
  combining some check categories, as we can always assume cluster-wide
  requirements.
- Simplify the `k8s.ResourceAuthz` API, as callers no longer need to
  make a decision based on cluster-wide vs. namespace-wide access.
  Components either have access, or they error out.
- Modify the web dashboard to always assume ServiceProfiles are enabled.

Reverts #1721
Part of #2337

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-03-12 00:17:22 -07:00
Andrew Seigner ec5a0ca8d9
Authorization-aware control-plane components (#2349)
The control-plane components relied on a `--single-namespace` param,
passed from `linkerd install` into each individual component, to
determine which namespaces they were authorized to access, and whether
to support ServiceProfiles. This command-line flag was redundant given
the authorization rules encoded in the parent `linkerd install` output,
via [Cluster]Role[Binding]s.

Modify the control-plane components to query Kubernetes at startup to
determine which namespaces they are authorized to access, and whether
ServiceProfile support is available. This allows removal of the
`--single-namespace` flag on the components.

Also update `bin/test-cleanup` to cleanup the ServiceProfile CRD.

TODO:
- Remove `--single-namespace` flag on `linkerd install`, part of #2164

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-02-26 11:54:52 -08:00
Risha Mars cce6183c4a
Update Top Routes in dashboard to use new API, add `to` query options (#2112)
The recent routes API changes caused the Top Routes tab to stop working, as it
wasn't looking for the changed structure of the response. This PR updates that
page to accept the new API response.

This PR also adds to fields to the Top Routes query form, so that the equivalent
of linkerd routes deploy --to deploy/authors will work in the dashboard.
2019-01-23 14:29:27 -08:00
Risha Mars a609dd5894
Reduce webpack bundle size: import lodash by module (#2028)
Imports lodash function individually, eliminate 'import _ from lodash'

This branch replaces imports of all of lodash (import _ from 'lodash' with per
function imports e..g import _isNil from 'lodash/isNil'. This reduces the bundle
size from~520 kb to ~160kb.

I've also taken the opportunity to replace our use of lodash functions with
native js functions where it makes sense (e.g. some maps, concats, sizes).
2019-01-03 13:50:46 -05:00
Kevin Lingerfelt 86e95b7ad3
Disable serivce profiles in single-namespace mode (#1980)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-12-13 14:37:18 -08:00
Risha Mars 6214c9a15d
Miscellaneous improvements to the Top Routes UX (#1963)
* Renames UNKNOWN in the tables to (default) which is less scary (#1946)
* adds a tooltip explaining what (default) is
* adds url props to the Top Routes page, so that they query can be populated by a url
* fixes a js error that occurs when switching pages
2018-12-10 10:40:24 -08:00
Risha Mars 692c4ca75b
Add the create new service profile button by default at /routes (#1941)
* Show the call to action if all metric rows are UNKNOWN
* Also enable creating of a new service profile by default on the Top Routes page
* Fix bug in passing down props.classes from the Navigation component
* Adjust form appearance
2018-12-06 17:26:21 -08:00
Risha Mars 7ea867843b
Show Top Routes in sidebar, change forms to query all resources (#1937)
Now that #1921 has merged, we can query for top routes for any resource, 
not just services.

This PR adds a dropdown for all resources to the Top Routes query form.

It also adds a link to the Top Routes page in the sidebar.
2018-12-05 15:15:40 -08:00
Risha Mars 92d92d3f9b
Move the determining of display order into the cli query module (#1917)
[web UI] Previously, we were specifying the display order to display the cli flags in the
QueryToCliCmd module. But this order is pretty standard for each command, and
I'd like to avoid hardcoding that list everywhere.

Move the handling of order into the QueryToCliCmd module.
2018-12-04 10:08:59 -08:00
Risha Mars 7a2689ce4a
Improve the top routes request form and code structure. (#1886)
Separates out the querying and table display of route data, so that this module
can be easily placed in other places in the UI. 

Adds usability improvements to the routes query form at /routes:
- displays CLI equivalent 
- adds dropdown with populated options for service / namespace 

As part of this work, made TapQueryCliCmd more generic, so it can work
for other CLI commands besides tap/top.
2018-11-29 10:20:53 -08:00
Risha Mars d9539bcb37
Add the top routes feature to the dashboard UI (#1868)
Adds a (currently not displayed in sidebar, but available at /routes) page to
mirror the current functionality of `linkerd routes <service>`. So far, this is just a
barebones form and table, but it works.

Adds a /api/routes path and handler to the api to receive TopRoutes requests from the web.
2018-11-27 16:53:10 -08:00