Commit Graph

1780 Commits

Author SHA1 Message Date
Cynthia S. Garcia 609618424d Fix spacing unit to new MUI v4 format (#3841)
Replaces theme.spacing.unit in the TapQueryForm component, which is deprecated, 
with theme.spacing(1), as part of the upgrade to Material-UI v4.

Signed-off-by: Cintia Sanchez Garcia <cynthiasg@icloud.com>
2019-12-17 15:57:16 -08:00
Cynthia S. Garcia f55b2f4e38 Pause dashboard network activity when page is hidden (#3773)
This PR pauses the network activity when the dashboard is not visible, resuming
it as soon as the user goes back to it. To do that, we are using the
react-page-visibility library.

Signed-off-by: Cintia Sanchez Garcia <cynthiasg@icloud.com>
2019-12-17 15:34:18 -08:00
Cynthia S. Garcia 5eac50f62b Update dashboard to Material-UI 4.7.1 (#3710)
This PR updates Material-UI from v3.6.1 to v4.7.1. The Material-UI
icon library has also been updated from v3.0.1 to v4.5.1.

Signed-off-by: Cintia Sanchez Garcia <cynthiasg@icloud.com>
2019-12-17 13:04:26 -08:00
Sergio C. Arteaga a1141fc507 Cache StatSummary responses in dashboard web server (#3769)
Signed-off-by: Sergio Castaño Arteaga <tegioz@icloud.com>
2019-12-17 09:15:00 -05:00
Carol A. Scott 43c394aa97
Pluralize dashboard breadcrumbs if appropriate (#3832)
Closes #3483.

This PR refactors and simplifies breadcrumb text pluralization. The redesigned
dashboard added a view that shows the user a list of all pods, deployments, etc.
in a namespace. The breadcrumb navigation text needed to be tweaked to correctly
pluralize the resource type selected.
2019-12-16 16:31:45 -08:00
Cynthia S. Garcia aec0f6b6df Fix issue with Community iframe height in dashboard (#3834)
Closes #3764.

This PR fixes an issue where the dashboard would cut off the bottom of the
Community Updates posts (displayed in an iframe) if the browser height was
shorter than the height of the iframe. Related to [#605 in the linkerd website
repo](https://github.com/linkerd/website/pull/605).

Signed-off-by: Cintia Sanchez Garcia <cynthiasg@icloud.com>
2019-12-16 16:11:44 -08:00
Tarun Pothulapati efb1101bdb Switch to smaller-case values in linkerd2-cni (#3827)
* update linkerd2-cni templates and cli
* update readme and docs
* update helm unit tests
* update helm build script
* use smaller case linkerd version

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2019-12-16 15:09:57 -08:00
Zahari Dichev f88b55e36e Tls certs checks (#3813)
* Added checks for cert correctness
* Add warning checks for approaching expiration
* Add unit tests
* Improve unit tests
* Address comments
* Address more comments
* Prevent upgrade from breaking proxies when issuer cert is overwritten (#3821)
* Address more comments
* Add gate to upgrade cmd that checks that all proxies roots work with the identitiy issuer that we are updating to
* Address comments
* Enable use of upgarde to modify both roots and issuer at the same time

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
2019-12-16 14:49:32 -08:00
Zahari Dichev 2a3fac3ae0
Pre-sign check (#3811)
Adds a pre-sign check to te identitiy service.

Fixes: #3779

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
2019-12-16 20:52:19 +02:00
Cynthia S. Garcia 9bda237ce3 Fix issue with grid for Tap/Top form (#3783)
Closes #3778. 

Fixes a formatting issue in the dashboard Tap/Top form where if a longer 
resource name was selected, the placement of the buttons was off.

Signed-off-by: Cintia Sanchez Garcia <cynthiasg@icloud.com>
2019-12-16 10:06:57 -08:00
Cynthia S. Garcia 2e1bde9ce1 Add some unit tests for namespace select button (#3782)
Adds unit tests for namespace select button in the dashboard.

Signed-off-by: Cintia Sanchez Garcia <cynthiasg@icloud.com>
2019-12-16 10:04:01 -08:00
Carol A. Scott 857a03c79c
Update yarn and add network-concurrency flag (#3826)
This PR addresses recent JS unit test failures on CI by: 

* Upgrading yarn from 1.7.0 to 1.21.1 (current stable version) in the Dockerfile 
and Github Actions workflow 
* Wrapping the yarn installation with the --network-concurrency 1 flag, setting the 
maximum number of concurrent network requests to 1, suggested as a fix here:
https://github.com/yarnpkg/yarn/issues/2629
2019-12-13 16:49:52 -08:00
Cynthia S. Garcia 0d93fd2a3b Update enzyme-adapter-react-16 library (#3820)
This PR updates enzyme-adapter-react-16 in preparation for Material UI upgrading
(#3710)

Signed-off-by: Cintia Sanchez Garcia <cynthiasg@icloud.com>
2019-12-13 15:48:08 -08:00
Tarun Pothulapati 2f492a77fb Switch to Smaller-Case in Linkerd2 and Partials Charts (#3823)
* update linkerd2, partials charts
* support install and inject workflow
* update helm docs
* update comments in values
* update helm tests
* update comments in test

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2019-12-13 14:48:07 -05:00
Zahari Dichev a98fe03c5e
Consolidate certificates validation logic (#3810)
* Consolidate certificates validation logic

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>

* Add test for upgrading trust anchors when using external cert manager

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>

* Add logic to ensure issuer cert is CA

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>

* Fix golden file

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
2019-12-13 10:01:55 +02:00
Alejandro Pedraza 991542fec6
CHANGES for edge-19.12.2 (#3825)
* CHANGES for edge-19.12.2
2019-12-12 17:07:34 -05:00
Oliver Gould f52056c3b7 proxy: v2.81.0 (#3817)
v2.80.0 fixed a problem where the destination controller client's
connection receive window could become exhausted, preventing additional
updates from the controller. The connection window has been increased
from 64K to 1MB to prevent a single stalled stream from block others.

Furthermore, discovery for IP addresses has been disabled in the proxy,
as the control plane does not yet support these resolutions. This
additionally lessons the load on the destination controller client.

---

* profiles: Eagerly read profiles off the wire (linkerd/linkerd2-proxy#397)
* router: Ensure that the purge task completes (linkerd/linkerd2-proxy#396)
* app-core: Add `accept` context with peer addr (linkerd/linkerd2-proxy#398)
* Remove default for destination lookup subnets (linkerd/linkerd2-proxy#399)
* Configure the HTTP/2 connection window to 1MB (linkerd/linkerd2-proxy#400)
2019-12-12 08:58:17 -05:00
Dax McDonald 3088f404ce Upgrade prometheus to v1.2.1 (#3541)
Signed-off-by: Dax McDonald <dax@rancher.com>
2019-12-11 15:26:16 -08:00
Alejandro Pedraza 2a4c71760d
Enable cert rotation test to work with dynamic namespaces, take two (#3795)
* Enable cert rotation test to work with dynamic namespaces

This PR adds support for dynamic cert generation when running the cert rotation intergration tests. This allows to avoid baking in the namespace in the certificate CN, thereby allowing us to run these tests on the clouds.

The tests in #3775 were failing because the second secret holding the issuer cert replacement was a leaf cert and not a root/intermediary cert capable of signing the CSRs. This is how the replacement cert looked like:

```bash
$ k -n l5d-integration-external-issuer get secrets linkerd-identity-issuer-new -ojson | jq '.data|.["tls.crt"]' | tr -d '"' | base64 -d | step certificate inspect -
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 2 (0x2)
    Signature Algorithm: ECDSA-SHA256
        Issuer: CN=identity.l5d-integration-external-issuer.cluster.local
        Validity
            Not Before: Dec 6 19:16:08 2019 UTC
            Not After : Dec 5 19:16:28 2020 UTC
        Subject: CN=identity.l5d-integration-external-issuer.cluster.local
        Subject Public Key Info:
            Public Key Algorithm: ECDSA
                Public-Key: (256 bit)
                X:
                    93:d5:fa:f8:d1:44:4f:9a:8c:aa:0c:9e:4f:98:a3:
                    8d:28:d9:cc:f2:74:4c:5f:76:14:52:47:b9:fb:c9:
                    a3:33
                Y:
                    d2:04:74:95:2e:b4:78:28:94:8a:90:b2:fb:66:1b:
                    e7:60:e5:02:48:d2:02:0e:4d:9e:4f:6f:e9:0a:d9:
                    22:78
                Curve: P-256
        X509v3 extensions:
            X509v3 Key Usage: critical
                Digital Signature, Key Encipherment
            X509v3 Extended Key Usage:
                TLS Web Server Authentication, TLS Web Client Authentication
            X509v3 Subject Alternative Name:
                DNS:identity.l5d-integration-external-issuer.cluster.local

    Signature Algorithm: ECDSA-SHA256
         30:46:02:21:00:f6:93:2f:10:ba:eb:be:bf:77:1a:2d:68:e6:
         04:17:a4:b4:2a:05:80:f7:c5:f7:37:82:7b:b7:9c:a1:66:6a:
         e1:02:21:00:b3:65:06:37:49:06:1e:13:98:7c:cf:f9:71:ce:
         5a:55:de:f6:1b:83:85:b0:a8:88:b7:cf:21:d1:16:f2:10:f9
```
For it to be a root/intermediate cert it should have had `CA:TRUE` under the `X509v3 extensions` section.

Why did the test pass sometimes? When it did pass for me, I could see in the linkerd-identity proxy logs something like:
```
ERR! [   320.964592s] linkerd2_proxy_identity::certify Received invalid ceritficate: invalid certificate: UnknownIssuer
```
so the cert retrieved from identity still was invalid but for some reason the proxy, sometimes, keeps on going despite that. And when one would delete the linkerd-identity pod, its proxy wouldn't come up at all, also showing that error.

With the changes from this branch, we no longer see that error in the logs and after deleting the linkerd-identity pod it comes back gracefully.
2019-12-11 15:50:06 -05:00
Sergio C. Arteaga 7f0213d534 Fix upgrade unit tests golden files (#3815)
Signed-off-by: Sergio Castaño Arteaga <tegioz@icloud.com>
2019-12-11 14:27:18 -05:00
Sergio C. Arteaga cee8e3d0ae Add CronJobs and ReplicaSets to dashboard and CLI (#3687)
This PR adds support for CronJobs and ReplicaSets to `linkerd inject`, the web
dashboard and CLI. It adds a new Grafana dashboard for each kind of resource. 

Closes #3614 
Closes #3630 
Closes #3584 
Closes #3585

Signed-off-by: Sergio Castaño Arteaga tegioz@icloud.com
Signed-off-by: Cintia Sanchez Garcia cynthiasg@icloud.com
2019-12-11 10:02:37 -08:00
Cynthia S. Garcia cda0f8dd15 Fix dashboard unit test warning (#3793)
This PR fixes a dashboard unit test added in #3666 that was passing, but
returning a warning.

Signed-off-by: Cintia Sanchez Garcia <cynthiasg@icloud.com>
2019-12-11 09:38:55 -08:00
Alejandro Pedraza 2d12b88145
Pods with non empty securitycontext capabilities fail to be injected (#3806)
* Pods with non empty securitycontext capabilities fail to be injected

Followup to #3744

The `_capabilities.tpl` template got its variables scope changed in
`Values.Proxy`, which caused inject to fail when security context
capabilities were detected.

Discovered when testing injecting the nginx ingress controller.
2019-12-10 14:36:14 -05:00
Alejandro Pedraza d21fda12db
Added unit test for injecting debug sidecar into CP deployment (#3786)
* Added unit test for injecting debug sidecar into CP deployment

I realized this was missing when testing #3774 (superseded by #3784).
2019-12-10 13:45:48 -05:00
Zahari Dichev 0313f10baa
Move CNI template to helm (#3581)
* Create helm chart for the CNI plugin

Signed-off-by: zaharidichev <zaharidichev@gmail.com>

* Add helm install tests for the CNI plugin

Signed-off-by: zaharidichev <zaharidichev@gmail.com>

* Add readme for the CNI helm chart

Signed-off-by: zaharidichev <zaharidichev@gmail.com>

* Fix integration tests

Signed-off-by: zaharidichev <zaharidichev@gmail.com>

* Remove old cni-plugin.yaml

Signed-off-by: zaharidichev <zaharidichev@gmail.com>

* Add trace partial template

Signed-off-by: zaharidichev <zaharidichev@gmail.com>

* Address more comments

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
2019-12-10 13:21:28 +02:00
Zahari Dichev 7e98128782 Fix upgrade unit tests golden files (#3805)
Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
2019-12-09 13:34:08 -08:00
Zahari Dichev 7cc3815d49
Add issuer file flags to upgrade command (#3771)
* Add identity-issuer-certificate-file and identity-issuer-key-file to upgrade command

Signed-off-by: zaharidichev <zaharidichev@gmail.com>

* Implement logic to use identity-trust-anchors-file flag to update the anchors

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>

* Address remarks

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
2019-12-09 21:18:03 +02:00
Alejandro Pedraza b4d27f9d82
No need for `processYAML()` in `install` (#3784)
* No need for `processYAML()` in `install`

Since `install` uses helm to do its proxy injection, there's no need to
call `processYAML`. This also fixes an issue discovered in #3687 where
we started supporting injection of cronjobs, and even though `linkerd`'s
namespace is flagged to skip automatic injection it was being injected.

This replaces #3773 as it's a much more simpler approach.
2019-12-09 09:32:14 -05:00
dddanmar f923db069b Update ADOPTERS.md (#3797)
Signed-off-by: Dan Ward <dddanmar@gmail.com>
2019-12-08 20:28:47 -08:00
Kevin Leimkuhler 6f7002f056
Add edge-19.12.1 changes (#3790)
## edge-19.12.1

* CLI
  * Added condition to the `linkerd stat` command that requires a window size
    of at least 15 seconds to work properly with Prometheus
* Web UI
  * Fixed a table wrap issue in the resource detail view that made sidebar 
    font size inconsistent
* Internal
  * Fixed whitespace path handling in non-docker build scripts (thanks
    @joakimr-axis!)
  * Removed calico logutils dependency that was incompatible with go 1.13
  * Updated Helm templates to use fully-qualified variable references based
    upon Helm best practices (thanks @javaducky!)
  * Added new browser tests for URL routing in dashboard

Signed-off-by: Kevin Leimkuhler <kleimkuhler@icloud.com>
2019-12-05 14:26:39 -08:00
Zahari Dichev 6faf64e49f Revert "Enable cert rotation test to work with dynamic namespaces (#3775)" (#3787)
This reverts commit 0e45b9c03d.

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
2019-12-05 15:33:22 -05:00
Cynthia S. Garcia a36fee66e4 Fix Octopus graph styling in dashboard (#3698)
This PR fixes issues with Octopus graph line styling in the dashboard, and improves 
the UI of the collapsed neighbors display.

Closes #3577

Signed-off-by: Cintia Sanchez Garcia cynthiasg@icloud.com
2019-12-05 11:39:57 -08:00
Zahari Dichev 0e45b9c03d
Enable cert rotation test to work with dynamic namespaces (#3775)
This PR adds support for dynamic cert generation when running the cert rotation intergration tests. This allows to avoid baking in the namespace in the certificate CN, thereby allowing us to run these tests on the clouds.

* Enable cert rotation test to work with dynamic namespaces

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>

* Address comments

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>

* Address further comments

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
2019-12-05 10:08:01 +02:00
Cynthia S. Garcia a564609ed5 Update dashboard to React 16.11.0 (#3737)
This PR updates `react` and `react-dom` to version 16.11.0, and `react-router`
and `react-router-dom` to version 5.1.2.

The following breaking changes have been fixed as part of the upgrade:

- Change deprecated `componentWillUpdate` to `componentDidUpdate` 
- Replace`react-url-query` library with `use-query-params` (a Hook) due 
to the deprecation of some React lifecycle methods. This required some 
changes in the Tap, Top, TapQueryForm and TopRoutes components.

Fixes #3617

Signed-off-by: Cintia Sanchez Garcia <cynthiasg@icloud.com>
2019-12-04 10:10:56 -08:00
Zahari Dichev e5f75a8c3d
Add validation to ensure stat time window is at least 15s (#3720)
* Add stat time window minimum of 10s

Signed-off-by: zaharidichev <zaharidichev@gmail.com>

* Address comments

Signed-off-by: zaharidichev <zaharidichev@gmail.com>
2019-12-04 08:12:01 +02:00
Sergio C. Arteaga 78ed5f8883 Make resource definition available to dashboard (#3666)
This PR allows the dashboard to query for a resource's definition in YAML
format, if the boolean `queryForDefinition` in the `ResourceDetail` component is
set to true. 

This change to the web API and the dashboard component was made for a future
redesigned dashboard detail page. At present, `queryForDefinition` is set to
false and there is no visible change to the user with this PR. 

Signed-off-by: Sergio Castaño Arteaga <tegioz@icloud.com> Signed-off-by: Cintia
Sanchez Garcia <cynthiasg@icloud.com>
2019-12-03 10:25:20 -08:00
Carol A. Scott 66a74b23a7
Adding new browser tests for URL routing in dashboard (#3646)
This PR adds two tests to test the dashboard's new navigation and routing
patterns: url-routing.js and namespace-select.js

It deletes the now-obsolete logo-redirect.js test.
2019-12-02 18:18:34 -08:00
Paul Balogh 457b200f6c Updating usage of .Values to Helm-standard (#3744) (#3765)
* Updating usage of .Values to Helm-standard (#3744)

Signed-off-by: Paul Balogh <javaducky@gmail.com>
2019-12-02 09:57:38 -05:00
Alejandro Pedraza cf9fa0a8c9
Removed calico logutils dependency, incompatible with go 1.13 (#3763)
* Removed calico logutils dependency, incompatible with go 1.13

Fixes #1153

Removed dependency on
`github.com/projectcalico/libcalico-go/lib/logutils` because it has
problems with go modules, as described in
projectcalico/libcalico-go#1153

Not a big deal since it was only used for modifying the plugin's log
format.
2019-11-29 09:19:11 -05:00
Alex Leong 005bc0ca8f
Remove confusing edge version from Chart.yaml (#3759)
Chart.yaml includes an appVersion field which is overwritten by CI when a helm tarball is published.  Therefore, the value of this field is irrelevant.  It can be confusing that it appears that the field contains a valid, out-of-date edge version.

This change makes it more obvious that the field should not be considered to be a valid and current edge version.

Signed-off-by: Alex Leong <alex@buoyant.io>
2019-11-26 09:27:45 -08:00
Cynthia S. Garcia 62c254df13 Fix issue with EdgesTable Grid wrapper (#3740)
This PR fixes a table wrap issue in the dashboard resource detail view that was
making sidebar font size inconsistent.

Signed-off-by: Cintia Sanchez Garcia <cynthiasg@icloud.com>
2019-11-26 09:22:34 -08:00
Joakim Roubert e1b3fdb029 Fix whitespace path handling in non-docker (build) scripts (#3650)
* Fix whitespace path handling in non-docker (build) scripts

Handling of whitespace paths was not fully implemented; this patch adds
the missing pieces. Also, only use bash where bash-specific
functionality is used/needed.

Signed-off-by: Joakim Roubert <joakimr@axis.com>
2019-11-26 09:48:41 -05:00
Cynthia S. Garcia 65d5778b93 Stop using react-iframe library in dashboard (#3695)
This PR removes a JS dependency for the Community iFrame page.

Signed-off-by: Cintia Sanchez Garcia <cynthiasg@icloud.com>
2019-11-25 11:29:05 -08:00
Zahari Dichev 8735ca9fab
edge-19.11.3 (#3742)
## edge-19.11.3

* CLI
  * Added a check that ensures using `--namespace` and `--all-namespaces`
    results in an error as they are mutually exclusive
* Internal
  * Fixed an issue causing `tap`, `injector` and `sp-validator` to use 
    old certificates after `helm upgrade` due to not being restarted
  * Fixed incomplete Swagger definition of the tap api, causing benign
    error logging in the kube-apiserver

Signed-off-by: zaharidichev <zaharidichev@gmail.com>
2019-11-20 18:51:29 +02:00
Zahari Dichev 36609c88b8
Error on conflicting stat options (--namespace and --all-namespaces) (#3719)
Signed-off-by: zaharidichev <zaharidichev@gmail.com>
2019-11-18 13:05:44 +02:00
Cynthia S. Garcia 6ed7a6ce54 Fix issue with check button in dashboard (#3723)
This PR fixes a positioning issue in the `linkerd check` button in the 
dashboard. 

Signed-off-by: Cintia Sanchez Garcia <cynthiasg@icloud.com>
2019-11-16 20:24:48 -08:00
Andrew Seigner c69080ee97
GitHub Actions: known_hosts, max-parallel, gcloud (#3733)
Follow up from #3730, GitHub Actions was failing in the following ways:
- booting 5 parallel kind clusters in the matrix job was overloading the
  Docker host
- `~/.ssh/known_hosts` file was empty following gcloud sdk installation

Four changes to mitigate these issues:
- generate `known_hosts` from a secret, rather than an `ssh-keyscan`
  command
- generate `~/.ssh/config` from a secret
- set `max-parallel: 3` on the matrix job
- install gcloud sdk prior to Docker ssh setup

TODO:
- remove `DOCKER_ADDRESS`, `DOCKER_HOST_PRIVATE_KEY`

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-11-15 17:19:13 -08:00
Zahari Dichev ef2007a933
Add helm version annotation to tap,injector and sp-validator (#3673)
Signed-off-by: zaharidichev <zaharidichev@gmail.com>
2019-11-15 20:42:19 +02:00
Zahari Dichev b83c3a2137
Add Responses to path items to satisfy kube apiserver (#3700)
Signed-off-by: zaharidichev <zaharidichev@gmail.com>
2019-11-15 20:41:50 +02:00
Alex Leong 0026103362 Unit and integration test fixups (#3730)
- Added cleanup step at the end of all integration tests.
- Disable external_issuer_integration_tests in cloud_tests due to
  namespace issue. Running this via `kind` tests is sufficient for now.
- Set a flakey test to `Skip`, relates to #3332.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-11-15 03:40:42 -08:00