Commit Graph

893 Commits

Author SHA1 Message Date
Risha Mars 31a396b631
Fix incorrect test wording (#1767) 2018-10-15 12:07:06 -07:00
Ben Lambert 44d8823a45 Added a help section to the sidebar (#1764)
Adding some quick links and help to the sidebar to guide users that 
are stuck the channels that are most relevant

Fixes #1716

Signed-off-by: Ben Lambert <ben@blam.sh>
2018-10-15 11:13:21 -07:00
Alex Leong 1fe19bf3ce
Add ServiceProfile support to k8s utilities (#1758)
Updates to the Kubernetes utility code in `/controller/k8s` to support interacting with ServiceProfiles.

This makes use of the code generated client added in #1752 

Signed-off-by: Alex Leong <alex@buoyant.io>
2018-10-12 09:35:11 -07:00
Alejandro Pedraza 2d6fde274c Make room for columns in `linkerd top` (#1750)
* Make room for columns in `linkerd top`

Make room for columns in `linkerd top`. Columns with data longer than some predetermined minimum length were stepping over each other.

Proposal for #1728

* Removed unneeded truncations

Signed-off-by: Alejandro Pedraza <alejandro.pedraza@gmail.com>
2018-10-11 13:08:46 -07:00
Alex Leong f1f5b49f59
Add generated Kubernetes client for ServiceProfile custom resource (#1752)
To support reading and writing of the ServiceProfile custom resource, we add a codegen'd Kubernetes client for this resource.

* Adding the ServiceProfile type and related boilerplate to /controller/gen/apis/serviceprofile. This boilerplate also contains directives that control how codegen works.
* A script in /hack which invokes codegen that generates Kubernetes client machinery for interacting with ServiceProfile resources. The majority of the generated code lives in /controller/gen/client.
* The above-mentioned generated code.

Signed-off-by: Alex Leong <alex@buoyant.io>
2018-10-11 11:43:35 -07:00
Kevin Lingerfelt 46c887ca00
Add --single-namespace install flag for restricted permissions (#1721)
* Add --single-namespace install flag for restricted permissions
* Better formatting in install template
* Mark --single-namespace and --proxy-auto-inject as experimental
* Fix wording of --single-namespace check flag
* Small healthcheck refactor

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-10-11 10:55:57 -07:00
Andrew Seigner 8f4240125e fix test failure, logrus api consistency (#1755)
`go test` was failing with
`Fatalf call has arguments but no formatting directives`

Fix test failure, make all logrus api calls consistent.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-10-11 10:44:32 -07:00
Andrew Seigner 21154f9ea0
Update CHANGES.md for edge-18.10.2 release (#1753)
Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-10-10 14:09:42 -07:00
Eliza Weisman d4d4e557e9
Update pinned proxy SHA to latest master (#1754)
This PR updates the proxy SHA the build is pinned. This is in order to
track dependency updates in the proxy for the upcoming edge release.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-10-10 14:01:36 -07:00
Ivan Sim 4fba6aca0a Proxy init and sidecar containers auto-injection (#1714)
* Support auto sidecar-injection

1. Add proxy-injector deployment spec to cli/install/template.go
2. Inject the Linkerd CA bundle into the MutatingWebhookConfiguration
during the webhook's start-up process.
3. Add a new handler to the CA controller to create a new secret for the
webhook when a new MutatingWebhookConfiguration is created.
4. Declare a config map to store the proxy and proxy-init container
specs used during the auto-inject process.
5. Ignore namespace and pods that are labeled with
linkerd.io/auto-inject: disabled or linkerd.io/auto-inject: completed
6. Add new flag to `linkerd install` to enable/disable proxy
auto-injection

Proposed implementation for #561.

* Resolve missing packages errors
* Move the auto-inject label to the pod level
* PR review items
* Move proxy-injector to its own deployment
* Ignore pods that already have proxy injected

This ensures the webhook doesn't error out due to proxy that are injected using the  command

* PR review items on creating/updating the MWC on-start
* Replace API calls to ConfigMap with file reads
* Fixed post-rebase broken tests
* Don't mutate the auto-inject label

Since we started using healhcheck.HasExistingSidecars() to ensure pods with
existing proxies aren't mutated, we don't need to use the auto-inject label as
an indicator.

This resolves a bug which happens with the kubectl run command where the deployment
is also assigned the auto-inject label. The mutation causes the pod auto-inject
label to not match the deployment label, causing kubectl run to fail.

* Tidy up unit tests
* Include proxy resource requests in sidecar config map
* Fixes to broken YAML in CLI install config

The ignore inbound and outbound ports are changed to string type to
avoid broken YAML caused by the string conversion in the uint slice.

Also, parameterized the proxy bind timeout option in template.go.

Renamed the sidecar config map to
'linkerd-proxy-injector-webhook-config'.

Signed-off-by: ihcsim <ihcsim@gmail.com>
2018-10-10 12:09:22 -07:00
Alex Leong db37c5a007
Pin the proxy version to a SHA (#1746)
Pin the proxy version to a specific SHA instead of floating on latest.  This allows breaking changes in the proxy repo to not break the main Linkerd 2 repo.

Signed-off-by: Alex Leong <alex@buoyant.io>
2018-10-09 14:22:39 -07:00
Darko Radisic 6fee0f3c2b Added --context flag to specify the context to use to talk to the Kubernetes apiserver (#1743)
* Added --context flag to specify the context to use to talk to the Kubernetes apiserver
* Fix tests that are failing
* Updated context flag description

Signed-off-by: Darko Radisic <ffd2subroutine@users.noreply.github.com>
2018-10-08 12:37:35 -07:00
Ben Lambert 69cebae1a2 Added ability to configure sidecar CPU + Memory requests (#1731)
Horizontal Pod Autoscaling does not work when container definitions in pods do not all have resource requests, so here's the ability to add CPU + Memory requests to install + inject commands by proving proxy options --proxy-cpu + --proxy-memory

Fixes #1480

Signed-off-by: Ben Lambert <ben@blam.sh>
2018-10-08 10:51:29 -07:00
Thomas Rampelberg 68c6f8907b
Add issue templates (#1742) 2018-10-04 14:56:11 -07:00
Adam Christian 189c2e661c
Adding a soft stale config so that we can enable probot/stale to keep our backlog relevant (#1734)
Signed-off-by: Adam Christian <adam@buoyant.io>
2018-10-03 18:24:53 -07:00
Risha Mars 460f6887d3
Update CHANGES.md for edge-18.10.1 release (#1738)
* Update CHANGES.md for edge-18.10.1 release
2018-10-03 13:04:38 -07:00
Oliver Gould eaec37c64f
cli: Use updated proxy config environment vars
In linkerd/linkerd2-proxy#99, several proxy configuration variables were
deprecated.

This change updates the CLI to use the updated names to avoid
deprecation warnings during startup.
2018-10-03 11:15:39 -07:00
Andrew Seigner dccccebd79
Add LICENSE files to all Docker images (#1727)
To comply with certain environments, include our LICENSE file in all
Docker images.


Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2018-10-02 16:25:52 -07:00
Alena Varkockova 5a853e8990 Use ListPods always for data plane HC (#1701)
* Use ListPods always for data plane HC
* Missing changes in grpc_server.go
* Address review comments
* Read proxy version from spec

Signed-off-by: Alena Varkockova <varkockova.a@gmail.com>
2018-10-02 11:45:01 -07:00
Risha Mars 381af1b213
Add limit to the number of resources displayed in the Octopus graph (#1722)
Limit the number of resources displayed in the Octopus arms to 6 
(not including unmeshed upstreams).
2018-10-01 14:22:20 -07:00
Risha Mars 3875fe8074
Add a clear button to the tap and top query forms (#1718)
* Add a clear button to the tap and top query forms

Add clear functionality to Tap

Add clear functionality to Top

Fix a react key error when there were multiple unmeshed upstreams

Fix bug where tap results from other queries persisted when changing the query

Fix key error in autocomplete dropdown
2018-09-28 15:23:33 -07:00
Dennis Adjei-Baah 0d584fdf32
Update CHANGES.md for edge-18.9.3 release (#1717)
Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-09-26 16:21:24 -07:00
Risha Mars d287480f01
ResourceDetail: display unmeshed sources in the inbound table (#1697)
Use the same tap data we use to display the unmeshed resources in the Octopus
graph to add the unmeshed rows to the Inbound stat table.

The unmeshed rows are filtered by resource type, so if we're on a Deployments
page, only upstreams which are deployments will show in the table. (Others, such
as IPs, will still show in the octopus graph).

* Use the list of unmeshed resources to display unmeshed sources in the table
* Keep track of number of pods in unmeshed sources
2018-09-26 10:20:56 -07:00
Risha Mars 3b59a2017e
Better handle not-found resources in the Web UI (#1712)
When I deleted a resource, I noticed that hard refreshing the page resulted in
js errors that would break the UI (e.g. if you were on a pod page, and the pod's
deployment was deleted, the pod would no longer be found, and the page would
error). This PR better handles not-present resources so that the UI still shows
up and shows you that there aren't metrics for that resource. 

Also clean up the undefined/undefined octopus node that would show up in that
case.
2018-09-25 17:01:31 -07:00
Risha Mars c5a4b0828d
Display the popover Source/Destination info side-by-side (#1706)
Previously, we would display source and destination info in the Top/Tap table
popovers in a vertical format. This PR places them in a table so that each type
of source/dest (ip, pod, pod owner) can be read left to right.

* Display the popover Source/Destination info for the tap and top tables in a 
  tabular format
* Added an arrow column between Src and Dst
2018-09-25 11:21:34 -07:00
Risha Mars 427078844d
Add HTTP method to Top display in the CLI and Web UI (#1709)
* Add Method column to Top tables in Web UI

* Add method to CLI top table
2018-09-25 11:15:11 -07:00
Risha Mars 6def3e22e9
Upgrade react and enzyme (#1708)
* Run yarn upgrader react

* Run yarn upgrade react-router

* run yarn upgrade react-test-renderer

* Remove enzyme-context-patch
2018-09-25 11:10:59 -07:00
Risha Mars 6d25d1471f
Indicate a --- for non-grpc requests (#1707)
Add --- for non-GRPC requests in the Tap table
2018-09-25 11:10:33 -07:00
Kevin Lingerfelt 3811c3f7f7
Fix web rendering when errors are encountered (#1710)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-09-25 10:22:55 -07:00
Dennis Adjei-Baah 254a10b13f
Add an initializing status icon when pods are initializing (#1689)
When pods or deployments are in an "Initialization" phase we currently see a "warning" icon that represents pods going under some kind of change. This may sometimes seem alarming when initially injecting pods after installing Linkerd.

This PR adds a new icon that shows up when pods are in the "PodInitializing" phase and shows the former "warning" icon when there is an error in starting pods.

fixes #1652

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-09-24 10:45:59 -07:00
Risha Mars b14ca77266
Stop trying to call setState on unmounted Tap and Top components (#1694) 2018-09-24 10:43:15 -07:00
Risha Mars e07814aab6
Draw SVG octopus arms in ResourceDetail inbound/outbound chart (#1693)
Draw customizable SVG paths for octopus arms.

This also combines all the unmeshed resources into a list and displays them in
one resource box, instead of adding one box per unmeshed resource. This helps
keep the box heights constant, which I want to draw the arrows.
2018-09-24 10:41:08 -07:00
Rodrigo Chacon 783bb1c3a7 cli: add support for LINKERD_NAMESPACE environment variable (#1695)
Signed-off-by: Rodrigo Chacon <rochacon@gmail.com>
2018-09-21 17:24:10 -07:00
Alena Varkockova 11c9b7425b Fix the debug message in endpoints watcher (#1658)
* Fix the debug message in endpoints watcher
* Use better method for converting

Signed-off-by: Alena Varkockova <varkockova.a@gmail.com>
2018-09-20 13:03:45 -07:00
Risha Mars 378848052b
Upgrade web deps (#1688)
* run yarn upgrade webpack

* Run yarn upgrade webpack-dev-server
2018-09-19 13:29:36 -07:00
Dennis Adjei-Baah d23103111c
Move grpc tapClient initialization to goroutine (#1686)
When a resource has no tap events being streamed to the Tap UI, and a user hits the "Stop" button in the Tap page, the tap stream is left open due to the WebSocket connection not being closed.

It looks like the web server's tap client that is created to stream events from the tap server blocks the main request thread in the web server. This causes the web server to stop receiving any subsequent close frames from the UI i.e. when the "Stop" button is clicked.

This PR moves the tapClient initialization code to a separate goroutine, specifically, the goroutine that reads tap events from the incoming grpc tap stream. This allows the main thread to continue reading messages from the WebSocket connection and allow it to receive close frames.

fixes #1665

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-09-19 13:06:57 -07:00
Mathis Wiehl 30e6930a37 Clear table on new top start (#1687)
Closes #1683

Signed-off-by: Mathis Wiehl <mathis.wiehl@sinnerschrader.com>
2018-09-19 13:05:32 -07:00
Alena Varkockova 8ab9b4981b Make wait flag configurable for check and dashboard (#1654)
Signed-off-by: Alena Varkockova <varkockova.a@gmail.com>
2018-09-19 10:42:29 -07:00
Risha Mars f550431278
Make zero success rate more noticeable in chart (#1681)
The success rate mini chart shows a colour based on SR, and also shows the SR
via the proportion of the chart that's filled out. If the success rate is 0% (as
in the VotePoop endpoint in the emojivoto demo), the chart would be zero 
percent filled out, causing it to be entirely gray. Really, it should be entirely
red, since zero SR is pretty bad.

Fix: fully fill the bar with red if there is a zero SR
2018-09-18 15:52:03 -07:00
Mathis Wiehl 34bcf2db08 Disable the tap start button if no ns/resource is selected (#1679)
Prevent error when trying to tap without having a namespace and resource
selected by disabling the tap button.

Fixes #1670

Signed-off-by: Mathis Wiehl <mathis.wiehl@sinnerschrader.com>
2018-09-18 12:40:32 -07:00
William Morgan 10181cd690
update README.md (#1657)
* update README.md

New description, shorten, update some links.

* address kevin's review comments

Signed-off-by: William Morgan <william@buoyant.io>
2018-09-19 02:02:27 +08:00
Kevin Lingerfelt d417f5649e
Update CHANGES.md for stable-2.0.0 release (#1677)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-09-18 08:27:00 -07:00
Kevin Lingerfelt 732570648d
Update check command to work with older versions (#1678)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-09-17 19:41:51 -07:00
Risha Mars c0d2ea4fdb Try this (#1675) 2018-09-17 18:00:29 -07:00
Kevin Lingerfelt 12b10e27c1
Update version checks to support release channels (#1667)
* Update version checks to support release channels
* Update based on review feedback
* Fix sidebar tests
* Update CI config for edge and stable tags

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2018-09-17 17:13:50 -07:00
Risha Mars ea520593e3
Fix react error while clearing Top form (#1668)
If you go to /top and select a namespace and then a resource, and then clear the
resource, there would be a javascript error that would cause the whole app not
to render. Fix this.
2018-09-17 17:02:36 -07:00
Risha Mars f2b2f98532
Key rows of top table on the resource type being requested (#1647)
Problem 
Previously, we'd display one row in top per sourcePod -> dstPod. When
viewing resources at a higher level though (e.g. deployments with multiple pods)
the src/dst column displays the resource at that level, and displaying multiple
rows with deploy/foo is confusing.

Solution 
Key the top table off of the resource currently being requested, so
that all the rows are rolled up appropriately. In the popover for that column,
display a list of pods/ips that are rolled up.

This branch also adds a generic list of resources to the tap/top dropdown (you
were always able to tap them, but when I switched from autocomplete to select
for this dropdown, you lost the ability to type in arbitrary resources).
2018-09-17 15:08:43 -07:00
Risha Mars 1caaefd5c8
Fix errors on the tap form when clearing items (#1666)
If you select a from namespace and from resource in /tap and try to clear them
using the little x in the form field, there would be a huge js error causing the
app to not render. Fix this.

Also removes filterOptions which wasn't being used any more. This will probably
make parsing tap results ever so slightly faster as we're now not trying to also
aggregate potential filter options.

* Fix js errors on Tap form when Clear button is hit
* Remove filter options code since we're not using the filters anywhere
2018-09-17 14:28:01 -07:00
Dennis Adjei-Baah 9951a6e864
Ignore websockets error code 1006 (#1649)
When a websocket connection is closed between Chrome and a server, we get a 1006 error code signifying abnormal closure of the websocket connection. It seems as if we only get this error on Chrome web clients. Firefox and Safari do not encounter this issue.

The solution is to suppress 1006 errors that occur in the web browser since the connection is closed anyway. There is no negative side effect that occurs when the connection is closed abnormally and so the error message is benign.

fixes #1630  

Signed-off-by: Dennis Adjei-Baah <dennis@buoyant.io>
2018-09-17 13:46:25 -07:00
Risha Mars 668aa07974
UI fixes: Remove RPS unit, fix Tap and Top in sidebar (#1663)
* Don't display RPS unit in metrics table
* Fix Tap and Top icons not being minimized correctly
* remove metric tooltip on RPS column
* Fix extra spacing on Tap/Top in sidebar
2018-09-17 12:00:18 -07:00