Commit Graph

1020 Commits

Author SHA1 Message Date
Kevin Lingerfelt fcd7c9bf5c
Fix lodash error on namespace landing page (#2043)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2019-01-04 12:32:46 -08:00
Alejandro Pedraza 8639a8753f
Fix reporting of injected resources (#2031)
* Fix reporting of injected resources

When reporting resources provided as a list, it was picking just one
item from the list and ignoring the rest.
Also improved test for injecting list of resources.

Fixes #1676

Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
2019-01-03 15:14:11 -05:00
Risha Mars 07f27656f7
Reduce webpack bundle size: import d3 modules individually (#2030)
Previously, we were importing all of d3, but we don't need a lot of it. 
This branch switches our imports to only the things we need.
2019-01-03 14:10:14 -05: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
Andrew Seigner a91c77d0bf
Followups from lint/comment changes (#2032)
This is a followup branch from #2023:
- delete `proxy/client.go`, move code to `destination-client`
- move `RenderTapEvent` and stat functions from `util` to `cmd`

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-01-02 15:28:09 -08:00
Andrew Seigner 1c302182ef
Enable lint check for comments (#2023)
Commit 1: Enable lint check for comments

Part of #217. Follow up from #1982 and #2018.

A subsequent commit will fix the ci failure.

Commit 2: Address all comment-related linter errors.

This change addresses all comment-related linter errors by doing the
following:
- Add comments to exported symbols
- Make some exported symbols private
- Recommend via TODOs that some exported symbols should should move or
  be removed

This PR does not:
- Modify, move, or remove any code
- Modify existing comments

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-01-02 14:03:59 -08:00
Alena Varkockova ef02cd6828 Disallow both pre and proxy flags for check (#2026)
Signed-off-by: Alena Varkockova <varkockova.a@gmail.com>
2019-01-02 13:36:04 -08:00
Andrew Seigner a9511aba06
Add go-report-card badge to README.md (#2020)
Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-12-20 16:42:54 -08:00
Kevin Lingerfelt 42fa9e90a1
Add release notes for edge-18.12.4 release (#2019)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-12-20 15:46:38 -08:00
Kevin Lingerfelt f1b0983f72
Add go linting to CI config (#2018)
* Add go linting to CI config
* Fix lint warnings
* Add note about bin/lint script in TEST.md

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-12-20 15:33:09 -08:00
Kevin Lingerfelt 20bb1bbc55
Bump pinned proxy version (#2015)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-12-20 12:38:18 -08:00
Thomas Rampelberg 612ebe2b81
Add rules_file loading into prometheus (#1966) 2018-12-20 11:47:13 -08:00
Radu M 07cbfe2725 Fix most golint issues that are not comment related (#1982)
Signed-off-by: Radu Matei <radu@radu-matei.com>
2018-12-20 10:37:47 -08:00
Kevin Lingerfelt 10d5ebd064
Fix flaky certificate controller test (#2009)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-12-19 17:10:17 -08:00
Risha Mars d48a473985
Remove less and post-css from the project (#2002)
Since we've switched to using css-in-js styling with material, we have very
little need for additional css libraries so support our ~30 lines of css. I'm
removing them in favour of a simpler configuration and inline styles.
2018-12-19 16:34:04 -08:00
Risha Mars 5e7522b848
Fix update neighbors function not being passed in to top module (#2008) 2018-12-19 15:50:57 -08:00
Risha Mars 0318590c07
Start reducing webpack bundle size, fix minor bugs (#1995)
- Adds bundle analyzer so we can see the composition of our bundle. 
- Stop importing all the locales of moment.js 
- Use named imports for all places we use material-ui components
- Fix a bug where, due to the controller components being relabled
linkerd-, the service mesh page wasn't showing the correct statuses. 
- Fixes some eslint warnings on tests
2018-12-19 12:51:02 -08:00
Alex Leong 0a87ebcd5d
Add --routes flag to linkerd top (#1952)
Fixes #1910 

Add a `--routes` flag to the `top` command which show requests by route instead of by path.  

This also includes an overhaul of the live table rendering code to be more flexible and better accommodate the various combinations of columns that may be visible or hidden.

Co-authored-by: Andrew Seigner <siggy@buoyant.io>
Signed-off-by: Alex Leong <alex@buoyant.io>
2018-12-18 11:25:34 -08:00
Alex Leong cb3fa1245b
Remove TLS column from routes command output (#1956)
Signed-off-by: Alex Leong <alex@buoyant.io>
2018-12-14 21:52:49 -08:00
Risha Mars a1c5e523ca
Update CHANGES.md for the edge-18.12.3 release (#1988)
* Update CHANGES.md for the edge-18.12.3 release
2018-12-14 13:49:43 -08:00
Eliza Weisman 586e7407c0
proxy: bump version for TLS skipped ports fix (#1989)
* 761a08e Make TLS accept logic compatible with disabled protocol
  detection (linkerd/linkerd2-proxy#158)

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-12-14 13:33:12 -08:00
Risha Mars 7c1a403d19
Update QueryToCliCmd to include the linkerd namespace if it is non-default (#1985)
Previously, the module assumed all linkerds were in the linkerd namespace. 
Include the --linkerd-namespace flag in the query if linkerd is not in the default ns.
2018-12-13 15:53:44 -08:00
Kevin Lingerfelt b16f4da1be
Re-add RBAC permission to access installed namespace in single ns mode (#1987)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-12-13 15:32:53 -08:00
Kevin Lingerfelt 0866bb2a41
Remove runAsGroup field from security context settings (#1986)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-12-13 15:12:13 -08: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
Cody Vandermyn d847f66ec5 Create new service accounts for linkerd-web and linkerd-grafana. Chan… (#1978)
* Create new service accounts for linkerd-web and linkerd-grafana. Change 'serviceAccount:' to 'serviceAccountName:'
* Use dynamic namespace name

Signed-off-by: Cody Vandermyn <cody.vandermyn@nordstrom.com>
2018-12-12 18:10:50 -08:00
Cody Vandermyn aa5e5f42eb Use an emptyDir for Prometheus and Grafana (#1971)
* Allow input of a volume name for prometheus and grafana
* Make Prometheus and Grafana volume names 'data' by default and disallow user editing via cli flags
* Remove volume name from options

Signed-off-by: Cody Vandermyn <cody.vandermyn@nordstrom.com>
2018-12-12 15:54:03 -08:00
Kevin Lingerfelt fd44896644
Remove namespace definition from --single-namespace installs (#1974)
* Remove namespace definition from --single-namespace installs
* DRY up code in healthcheck.go

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-12-12 14:53:02 -08:00
Kevin Lingerfelt 00de48bd26
Fix proxy-api handling of named target ports (#1973)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-12-12 13:42:47 -08:00
Kevin Lingerfelt 8cad97cd6c
Set proxy-injector resources at container level on install (#1972)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-12-11 13:28:39 -08:00
Cody Vandermyn 8e4d9d2ef6 add securityContext with runAsUser: {{.ControllerUID}} to the various cont… (#1929)
* add securityContext with runAsUser: {{.ProxyUID}} to the various containers in the install template
* Update golden to reflect new additions
* changed to a different user id than the proxy user id
* Added a controller-uid install option
* change the port that the proxy-injector runs
* The initContainers needs to be run as the root user.
* move security contexts to container level

Signed-off-by: Cody Vandermyn <cody.vandermyn@nordstrom.com>
2018-12-11 11:51:28 -08:00
Alejandro Pedraza 8c67bfbcc6 Add parameter to stats API to skip retrieving Prometheus stats (#1871)
* Add parameter to stats API to skip retrieving Prometheus stats

Used by the dashboard to populate list of resources.

Fixes #1022

Signed-off-by: Alejandro Pedraza <alejandro.pedraza@gmail.com>

* Prometheus queries check results were being ignored
* Refactor verifyPromQueries() to also test when no prometheus queries
should be generated

* Add test for SkipStats=true

Includes adding ability to public.GenStatSummaryResponse to not generate
basicStats

* Fix previous test
2018-12-10 16:48:12 -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
Kevin Lingerfelt 0f8bcc9159
Controller: wait for caches to sync before opening listeners (#1958)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-12-07 11:15:45 -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
Kevin Lingerfelt 3ff971fd59
Add release notes for stable-2.1.0 release (#1957)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-12-06 14:04:14 -08:00
Kevin Lingerfelt 5418324e99
Add release notes for edge-18.12.2 release (#1955)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-12-06 13:08:35 -08:00
Kevin Lingerfelt d8a057d71c
Add @admc as a CHANGES.md code owner (#1954)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-12-06 12:49:09 -08:00
Alex Leong 04ed200e36
Rename path_regex to pathRegex (#1951)
Rename snake case fields to camel case in service profile spec.  This improves the way they are rendered when the `kubectl describe` command is used.

Signed-off-by: Alex Leong <alex@buoyant.io>
2018-12-06 11:51:33 -08:00
Risha Mars f553372e66
Update CHANGES.md for the edge-18.12.1 release (#1938)
* Update CHANGES.md for the edge-18.12.1 release
2018-12-05 16:02:12 -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
Andrew Seigner bef9479f57
Add input validation for profile command (#1934)
Fixes #1878

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-12-05 15:13:10 -08:00
Risha Mars 442685674b
Add a Create Service Profile dialog (#1933)
Add the ability to create and download a service profile from the web UI.

This form will be displayed in the call to action if no route metrics are found.
2018-12-05 15:08:10 -08:00
Alex Leong 7169eaef27
Stop routes with the same name from different services from clobbering each other (#1936)
If the `linkerd routes` command gets two routes with the same name, it will only display one of them, even if the routes are from different services.  This is particularly obvious with the default `[UNKNOWN]` route.

We now display all routes, even if they have the same name.

Signed-off-by: Alex Leong <alex@buoyant.io>
2018-12-05 15:05:19 -08:00
Alex Leong cbb196066f
Support service profiles for external authorities (#1928)
Add support for service profiles created on external (non-service) authorities.  For example, this allows you to create a service profile named `linkerd.io` which will apply to calls made to `linkerd.io`.

This is done by changing the `LINKERD2_PROXY_DESTINATION_PROFILE_SUFFIXES` to `.` so that the proxy will attempt to lookup a service profile for any authority.  We provide the `--disable-external-profiles` proxy flag to revert this behavior in case it is a problem.

We also refactor the proxy-api implementation of GetProfiles so that it does the profile lookup, regardless of if the authority looks like a Kubernetes service name or not.  To simplify this, support for multiple resolves (which was unused) was removed.

Signed-off-by: Alex Leong <alex@buoyant.io>
2018-12-05 14:32:59 -08:00
Risha Mars 5b26508f7c
Add a tabbed view to the resource detail page for Top and Routes (#1918)
Adds the top routes metrics to the resource detail pages.

* Add a tabbed view to the resource detail page
Add the ability to query top routes from the detail tabs

* Move ConfigureProfilesMsg to its own module
2018-12-05 13:55:31 -08:00
Oliver Gould f80f3892a0
proxy: bump version for bug fixes (#1935)
* 0065c137 profiles: Drive profile discovery on a daemon task (#156)
* b9ffbb7f Update h2 to v0.1.14
* 3ac6b72c Add basic tap integration tests (#154)
2018-12-05 13:23:26 -08:00
Oliver Gould 12ec5cf922
install: Add a -disable-h2-upgrade flag (#1926)
The proxy-api service _always_ suggests that two meshed pods communicate
via HTTP/2 (i.e. via transparent protocol upgrading, if necessary).
This can complicate debugging and diagnostics at times, so it's
important that we have a way to deploy linkerd without this auto-upgrade
behavior.

This change adds a `-disable-h2-upgrade` flag to the `linkerd install`
command that disables transparent upgrading for the whole cluster.
2018-12-05 12:50:47 -08:00
Oliver Gould 8f9bb711dd
proxy-api: Expose a flag to control auto-h2-upgrade (#1925)
When debugging issues, it's helpful to disable HTTP/2 upgrading to
simplify diagnostics.

This chagne adds an `enable-h2-ugprade` flag to _proxy-api_. When this
flag is set to false, the proxy-api will not suggest that meshed
endpoints are upgraded to use HTTP/2.

As a follow-up, a flag should be added to `install` to control how the
proxy-api is initialized.
2018-12-05 12:41:20 -08:00
Alex Leong 380ec52a39
Rework routes command to accept any resource (#1921)
We rework the routes command so that it can accept any Kubernetes resource, making it act much more similarly to the stat command.

Signed-off-by: Alex Leong <alex@buoyant.io>
2018-12-05 11:11:34 -08:00