Commit Graph

1837 Commits

Author SHA1 Message Date
Tarun Pothulapati 096668d62c make public-api use the right destination address (#3476)
Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2019-09-25 15:24:56 -05:00
Raghav Khandelwal 00fcd238d4 Correct link syntax in ADOPTERS.md (#3475)
Signed-off-by: teraflik <teraflik@gmail.com>
2019-09-25 09:16:37 -05:00
Daniel Mangum fa01b49998 proxy injector: mwc match expressions admission-webhooks disabled (#3460)
When running linkerd in HA mode, a cluster can be broken by bringing down the proxy-injector.

Add a label to MWC namespace selctor that skips any namespace.

Fixes #3346

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2019-09-24 19:28:16 -07:00
William Morgan e30f5b2e00
add community meeting info to README (#3466)
Signed-off-by: William Morgan <william@buoyant.io>
2019-09-23 17:26:42 -07:00
Ivan Sim 5e51208b5d
Increase the Grafana dashboards refresh interval (#3464)
Signed-off-by: Ivan Sim <ivan@buoyant.io>
2019-09-23 14:47:59 -07:00
Kevin Leimkuhler 151104ec5a
Add script to load images into kind cluster (#3458)
## Summary

[kind](https://github.com/kubernetes-sigs/kind) has been a helpful tool for running local Kubernetes clusters and
testing linkerd builds. Once images are built with `bin/docker-build`, the
images must be loaded into the kind cluster.

This script should be run after `bin/docker-build` and will load the images into
the specified kind cluster.

Example:
```
$ bin/docker-build
$ kind get clusters # show available clusters to load images on to
kleimkuhler
$ bin/kind-load kleimkuhler
$ ./target/cli/linux/linkerd install | kubectl apply -f -
```

Signed-off-by: Kevin Leimkuhler <kleimkuhler@icloud.com>
2019-09-23 14:43:31 -07:00
Alejandro Pedraza 0394caa973
Update Helm's README file and icon (#3455)
* Update Helm's README file
* Added icon

Signed-off-by: Alejandro Pedraza Borrero <alejandro@buoyant.io>
2019-09-23 12:36:00 -05:00
Tarun Pothulapati 139c64132d Make Identity use GRPC Server with Prom Metrics (#3457)
* make identity use grpc server with prom metrics

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>

* linting fix

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2019-09-23 08:17:41 -07:00
Tarun Pothulapati 49d39e5a12 Instrumenting Proxy-Injector (#3354)
* add proxy injection prometheus counters

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>

* formatted injection reasons

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>

* update proxy injection report tests

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>

* keep the structure, and add global ownerKind

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>

* increase request count, when owner is nil

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>

* add readable reasons using map

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>

* fix linting issues

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>

* add proxy config override annotations as labels

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>

* remove space for machine reasons

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>

* use correct proxy image override annotation

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>

* add annotation_at label to prom metrics

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>

* refactor disablebyannotation function

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2019-09-20 09:46:57 -07:00
arminbuerkle 09114d4b08 Add cluster domain cli flag (#3360)
* Add custom cluster domain cli flag
* Fetch cluster domain from config map
* Add cluster domain cli flag only where necessary

Signed-off-by: Armin Buerkle <armin.buerkle@alfatraining.de>
2019-09-19 16:08:50 -07:00
Alejandro Pedraza 2e43d971fd
Update CHANGES.md for edge-19.9.3 (#3451)
* Update CHANGES.md for edge-19.9.3
2019-09-19 13:17:33 -05:00
Kevin Leimkuhler c62c90870e
Add JSON output to tap command (#3434)
Replaces #3411 

### Motivation

It is a little tough to filter/read the current tap output. As headers are being
added to tap, the output is starting to get difficult to consume. Take a peek at
#3262 for an example. It would be nice to have some more machine readable output
that can be sliced and diced with tools such as jq.

### Solution

A new output option has been added to the `linkerd tap` command that returns the
JSON encoding of tap events.

The default output is line oriented; `-o wide` appends the request's target
resource type to the tap line oriented tap events.

In order display certain values in a more human readable form, a tap event
display struct has been introduced. This struct maps public API `TapEvent`s
directly to a private `tapEvent`. This struct offers a flatter JSON structure
than the protobuf JSON rendering. It also can format certain field--such as
addresses--better than the JSON protobuf marshaler.

Closes #3390

**Default**:
```
➜  linkerd2 git:(kleimkuhler/tap-json-output) linkerd -n linkerd tap deploy/linkerd-web
req id=5:0 proxy=in  src=10.1.6.146:36976 dst=10.1.6.148:9994 tls=not_provided_by_remote :method=GET :authority=10.1.6.148:9994 :path=/metrics
rsp id=5:0 proxy=in  src=10.1.6.146:36976 dst=10.1.6.148:9994 tls=not_provided_by_remote :status=200 latency=3366µs
end id=5:0 proxy=in  src=10.1.6.146:36976 dst=10.1.6.148:9994 tls=not_provided_by_remote duration=132µs response-length=1505B
```

**Wide**:
```
➜  linkerd2 git:(kleimkuhler/tap-json-output) linkerd -n linkerd tap deploy/linkerd-web -o wide
req id=6:0 proxy=in  src=10.1.0.1:35394 dst=10.1.6.148:9994 tls=not_provided_by_remote :method=GET :authority=10.1.6.148:9994 :path=/ping dst_res=deploy/linkerd-web dst_ns=linkerd
rsp id=6:0 proxy=in  src=10.1.0.1:35394 dst=10.1.6.148:9994 tls=not_provided_by_remote :status=200 latency=1442µs dst_res=deploy/linkerd-web dst_ns=linkerd
end id=6:0 proxy=in  src=10.1.0.1:35394 dst=10.1.6.148:9994 tls=not_provided_by_remote duration=88µs response-length=5B dst_res=deploy/linkerd-web dst_ns=linkerd
```

**JSON**:
*Edit: Flattened `Method` and `Scheme` formatting*
```
{
  "source": {
    "ip": "10.138.0.28",
    "port": 47078,
    "metadata": {
      "daemonset": "ip-masq-agent",
      "namespace": "kube-system",
      "pod": "ip-masq-agent-4d5s9",
      "serviceaccount": "ip-masq-agent",
      "tls": "not_provided_by_remote"
    }
  },
  "destination": {
    "ip": "10.60.1.49",
    "port": 9994,
    "metadata": {
      "control_plane_ns": "linkerd",
      "deployment": "linkerd-web",
      "namespace": "linkerd",
      "pod": "linkerd-web-6988999458-c6wpw",
      "pod_template_hash": "6988999458",
      "serviceaccount": "linkerd-web"
    }
  },
  "routeMeta": null,
  "proxyDirection": "INBOUND",
  "requestInitEvent": {
    "id": {
      "base": 0,
      "stream": 0
    },
    "method": "GET",
    "scheme": "",
    "authority": "10.60.1.49:9994",
    "path": "/ready"
  }
}
{
  "source": {
    "ip": "10.138.0.28",
    "port": 47078,
    "metadata": {
      "daemonset": "calico-node",
      "namespace": "kube-system",
      "pod": "calico-node-bbrjq",
      "serviceaccount": "calico-sa",
      "tls": "not_provided_by_remote"
    }
  },
  "destination": {
    "ip": "10.60.1.49",
    "port": 9994,
    "metadata": {
      "control_plane_ns": "linkerd",
      "deployment": "linkerd-web",
      "namespace": "linkerd",
      "pod": "linkerd-web-6988999458-c6wpw",
      "pod_template_hash": "6988999458",
      "serviceaccount": "linkerd-web"
    }
  },
  "routeMeta": null,
  "proxyDirection": "INBOUND",
  "responseInitEvent": {
    "id": {
      "base": 0,
      "stream": 0
    },
    "sinceRequestInit": {
      "nanos": 644820
    },
    "httpStatus": 200
  }
}
{
  "source": {
    "ip": "10.138.0.28",
    "port": 47078,
    "metadata": {
      "deployment": "calico-typha",
      "namespace": "kube-system",
      "pod": "calico-typha-59cb487c49-8247r",
      "pod_template_hash": "59cb487c49",
      "serviceaccount": "calico-sa",
      "tls": "not_provided_by_remote"
    }
  },
  "destination": {
    "ip": "10.60.1.49",
    "port": 9994,
    "metadata": {
      "control_plane_ns": "linkerd",
      "deployment": "linkerd-web",
      "namespace": "linkerd",
      "pod": "linkerd-web-6988999458-c6wpw",
      "pod_template_hash": "6988999458",
      "serviceaccount": "linkerd-web"
    }
  },
  "routeMeta": null,
  "proxyDirection": "INBOUND",
  "responseEndEvent": {
    "id": {
      "base": 0,
      "stream": 0
    },
    "sinceRequestInit": {
      "nanos": 790898
    },
    "sinceResponseInit": {
      "nanos": 146078
    },
    "responseBytes": 3,
    "grpcStatusCode": 0
  }
}
```

Signed-off-by: Kevin Leimkuhler <kleimkuhler@icloud.com>
2019-09-19 09:34:49 -07:00
Alejandro Pedraza 30ecddb965
Fix injector timeout under high load (#3442)
* Fix injector timeout under high load

Fixes #3358

When retrieving a pod owner, we were hitting the k8s API directly because
at injection time the informer might not have been informed about the
existence of the parent object.
Under a large number of injection requests this ended up in the k8s API requests
being throttled, the proxy-injector getting blocked and the webhook requests
timing out.

Now we'll hit the shared informer first, and hit the k8s API only when
the informer doesn't return anything. After a few injection requests for
the same owner, the informer should have been updated.

Testing:

Scaling an emoji deployment to 1000 replicas, and after waiting for a
couple of minutes:

Before:
```bash
# a portion of the pods doesn't get injected
$ kubectl-n emojivoto get po | grep ./1 | wc -l
109

kubectl -n kube-system logs -f kube-apiserver-minikube | grep
failing.*timeout
.... (lots of errors)
```

After:
```bash
# all the pods get injected
$ kubectl -n emojivoto get po | grep ./1 | wc -l
0

kubectl -n kube-system logs -f kube-apiserver-minikube | grep
failing.*timeout
```
2019-09-18 17:58:38 -05:00
Oliver Gould f21ac2fad9 proxy: Update to v2.72.0 (#3447)
This change updates the internals of the proxy's client to the
Destination controller. Other than some minor fixes to the client's
backoff logic, no user-facing changes are expected.

* Split service discovery into composable components (linkerd/linkerd2-proxy#341)
* logging: update `tracing` and `tracing-subscriber` (linkerd/linkerd2-proxy#352)
* resolve: Do not send the 'k8s' scheme (linkerd/linkerd2-proxy#356)
2019-09-18 16:34:36 -05:00
Jon Walton 571428f421 Add PlayStudios Asia to ADOPTERS.md (#3429)
There's no going back now...

Signed-off-by: Jon Walton <jonw@playstudios.asia>
2019-09-18 11:42:00 -07:00
poochwashere c9fadec63a Update ADOPTERS.md (#3426)
* Update ADOPTERS.md

Signed-off-by: Jeff Puccinelli <jpuccinelli@mulliganfunding.com>

* Update ADOPTERS.md

Added our company, fixed my typo!

Signed-off-by: Jeff Puccinelli <jpuccinelli@mulliganfunding.com>
2019-09-18 11:41:13 -07:00
Alejandro Pedraza 1653f88651
Put the destination controller into its own deployment (#3407)
* Put the destination controller into its own deployment

Fixes #3268

Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
2019-09-18 13:41:06 -05:00
Oliver Gould d51f7f77a7
proxy: Update to v2.71.0 (#3433)
Update the proxy release process to fetch artifacts from tagged GitHub releases.

* Use GitHub Actions for Pull Requests (linkerd/linkerd2-proxy#343)
* ci: Run tests inside rust container (linkerd/linkerd2-proxy#344)
* update tracing crates (linkerd/linkerd2-proxy#346)
* core: Introduce the Recover trait (linkerd/linkerd2-proxy#347)
* ci: Automate releases via GitHub Actions (linkerd/linkerd2-proxy#349)
* Add opencensus exporter (linkerd/linkerd2-proxy#338)
* Add trace context crate (linkerd/linkerd2-proxy#339)
* ci: Use a readymade release action (linkerd/linkerd2-proxy#351)
* Add 587 to the list of ports to disable protocol detection (linkerd/linkerd2-proxy#350)
* Record SHA of package artifact (linkerd/linkerd2-proxy#353)
2019-09-17 15:18:24 -07:00
pierDipi 88de719233 Fix bad request in the top routes tab on empty fields (#3432)
This PR disables the `Start` button in the dashboard's top routes view if there
is no namespace or resource type selected. 

Previously, clicking `Start` on the top routes tab with empty namespace and
resource fields would result in a bad request error. 

Signed-off-by: pierdipi <pierangelodipilato@gmail.com>
2019-09-17 12:33:37 -07:00
Eugene Glotov 616131467c Allow to disable Namespace installation with Helm (#3412) (#3413)
If the namespace is controlled by an external tool or can't be installed
with Helm, disable its installation
Fixes #3412

Signed-off-by: Eugene Glotov <kivagant@gmail.com>
2019-09-17 12:25:35 -05:00
Ivan Sim 4d89c52113 Update Prometheus config to keep only needed cadvisor metrics (#3401)
* Update prometheus cadvisor config to only keep container resources metrics

Signed-off-by: Ivan Sim <ivan@buoyant.io>

* Drop unused large metric

Signed-off-by: Ivan Sim <ivan@buoyant.io>

* Fix unit test

Signed-off-by: Ivan Sim <ivan@buoyant.io>

* Siggy's feedback

Signed-off-by: Ivan Sim <ivan@buoyant.io>

* Fix unit test

Signed-off-by: Ivan Sim <ivan@buoyant.io>
2019-09-17 10:17:49 -07:00
Oliver Gould 877740ea60
Release notes for edge-19.9.2 (#3428) 2019-09-12 14:20:43 -07:00
Alejandro Pedraza 6764d03e52
Tiny: remove uinintended comment (#3425)
Followup to #3415

Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
2019-09-12 12:56:46 -05:00
Alejandro Pedraza f94199ae0b A couple of clarifying comments for Chart.yaml (#3420)
Added a few comments in the Chart.yaml files to clarify that some
versions don't need to be updated.

Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
2019-09-12 09:31:23 -07:00
Alejandro Pedraza 1e2810c431
Trim certs and keys in the Helm charts (#3421)
* Trim certs and keys in the Helm charts

Fixes #3419

When installing through the CLI the installation will fail if the certs
are malformed, so this only concerns the Helm templates.

Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
2019-09-11 20:47:38 -05:00
Alejandro Pedraza 8270ba363c
Add chart_deploy into workflow.yml (#3415)
* Have CI push the Helm artifacts into GCS

- Added missing OWNERS and README files
- Added maintainers section to  Chart.yaml
- Changed NOTES.txt so it points to the installation of the CLI
- Set the proxy-init version to v1.1.0 in values.yaml

Ref #3256

Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
2019-09-11 12:09:50 -05:00
Andrew Seigner a5a6e8ff9f
Fix integration test event regex matching (#3416)
The integration tests check for known k8s events using a regex. This
regex included an incorrect pattern that prepended a failure reason and
object, rather than simply the event message we were trying to match on.
This resulted in failures such as:
https://github.com/linkerd/linkerd2/runs/217872818#step:6:476

Fix the regex to only check for the event message. Also explicitly
differentiate reason, object, and message in the log output.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-09-10 13:24:22 -07:00
Alejandro Pedraza bd702b99ae
Last changes before submitting to the Helm incubator (#3292)
* Last changes before submitting to the Helm incubator

- Added missing OWNERS and README files
- Added maintainers section to  Chart.yaml
- Changed NOTES.txt so it points to the installation of the CLI
- Set the proxy-init version to v1.1.0 in values.yaml
- Added missing ProfileValidator vars, and add 'do not edit' comment to the Identity.Issuer.CrtExpiryAnnotation value
- Added new self-hosted repo
- Added  option to bin/helm-build
- Added DisableHeartBeat to README

Ref #3256

Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
2019-09-10 14:24:39 -05:00
Andrew Seigner c5a85e587c
Update to client-go v12.0.0, forked stern (#3387)
The repo depended on an old version of client-go. It also depended on
stern, which itself depended on an old version of client-go, making
client-go upgrade non-trivial.

Update the repo to client-go v12.0.0, and also replace stern with a
fork.

This fork of stern includes the following changes:
- updated to use Go Modules
- updated to use client-go v12.0.0
- fixed log line interleaving:
  - https://github.com/wercker/stern/issues/96
  - based on:
    - 8723308e46

Fixes #3382

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-09-10 11:04:29 -07:00
Andrew Seigner 9bb7b6f119
Make KillPodSandbox regex match broader (#3409)
We're getting flakey `KillPodSandbox` events in the integration tests:
https://github.com/linkerd/linkerd2/runs/216505657#step:6:427
This is despite adding a regex for these events in #3380.

Modify the KillPodSandbox event regex to match on a broader set of
strings.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-09-09 11:54:14 -07:00
Andrew Seigner 7f59caa7fc
Bump proxy-init to 1.2.0 (#3397)
Pulls in latest proxy-init:
https://github.com/linkerd/linkerd2-proxy-init/releases/tag/v1.2.0

This also bumps a dependency on cobra, which provides more complete zsh
completion.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-09-09 09:06:14 -07:00
Andrew Seigner 46d33a10e4
Preload Prometheus and proxy-init docker images (#3381)
The kind clusters booted by the integration tests each had to pull
Prometheus and proxy-init images from the internet during linkerd
install.

Preemptively pull the images from the internet once, then execute `kind
load` commands for each of the clusters prior to starting integration
tests.

Depends on #3397

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-09-06 16:50:57 -07:00
Andrew Seigner 3be2b41a79
Replace Travis with GitHub Actions for master/tags (#3398)
GitHub Actions has been running unit and integration tests, in parallel
with Travis running those same tests, and also handling master merges
and tags.

This change completes the transtion to GitHub Actions, removing all
references to Travis. Similar to Travis, GitHub Actions now acts on
master merges and tag pushes by pushing Docker images to gcr.io, and
running integration tests against a GKE cluster.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-09-06 15:58:46 -07:00
Carol A. Scott a4b30b4931
Adding "external link" icons to outgoing sidebar menu items (#3371)
Fixes #2693.

Adds an "external link" icon to sidebar menu items that take you out of the dashboard.
2019-09-05 17:59:29 -07:00
Carol A. Scott f2b305ce3b
Update deps (#3369)
This PR updates dashboard dependencies and the babel config file to resolve a
Prototype Pollution vulnerability in an older version of `set-package` which is
used by babel, jest and webpack.
2019-09-05 17:49:50 -07:00
Carol A. Scott 3e919692d8
Fixing row keys for edges (#3368)
This PR fixes an issue in `EdgesUtils` where some rows had duplicate keys,
leading to React console warnings.
2019-09-05 17:46:15 -07:00
Alex Leong 6b9703e914
edge-19.9.1 (#3391)
This edge release adds traffic splits into the Linkerd dashboard as well as a
variety of other improvements.

* CLI
  * Improved the error message when the CLI cannot connect to Kubernetes (thanks
    @alenkacz!)
  * Added `--address` flag to `linkerd dashboard` (thanks @bmcstdio!)
* Controller
  * Fixed an issue where the proxy-injector had insufficient RBAC permissions
  * Added support for disabling the heartbeat cronjob (thanks @kevtaylor!)
* Proxy
  * Decreased proxy Docker image size by removing bundled debug tools
  * Fixed an issue where the incorrect content-length could be set for GET
    requests with bodies
* Web UI
  * Added trafficsplits as a resource to the dashboard, including a trafficsplit
    detail page
* Internal
  * Added support for Kubernetes 1.16

Signed-off-by: Alex Leong <alex@buoyant.io>
2019-09-05 14:17:40 -07:00
Oliver Gould fe0783dff5
proxy: Update proxy to fc400f97a4a9 (#3389)
* Stop using a Builder in the profile router (linkerd/linkerd2-proxy#330)
* Update and rename .github/workflows/rust.yml to rust.yml
* Fix compile error on windows (linkerd/linkerd2-proxy#335)
* Revert "Update and rename .github/workflows/rust.yml to rust.yml"
* travis: Allow 60 minutes for integration tests (linkerd/linkerd2-proxy#336)
* tests: Properly simulate destination errors (linkerd/linkerd2-proxy#332)
* Improve stack-related compiler error messages (linkerd/linkerd2-proxy#337)
* update hyper to v0.12.34
2019-09-05 12:28:12 -07:00
Andrew Seigner d773a47dd3
Shrink controller Docker image from 315MB to 38MB (#3378)
The controller Docker image included 7 Go binaries (destination,
heartbeat, identity, proxy-injector, public-api, sp-validator, tap),
each roughly 35MB, with similar dependencies.

Change each controller binary into subcommands of a single `controller`
binary, decreasing the controller Docker image size from 315MB to 38MB.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-09-05 11:44:03 -07:00
Andrew Seigner 89deacd8d6
Decrease proxy and web Docker image sizes (#3384)
The `proxy` and `web` Docker images were 161MB and 186MB, respectively.
Most of the space was tools installed into the `linkerd.io/base` image.

Decrease `proxy` and `web` Docker images to 73MB and 90MB, respectively.
Switch these images to be based off of `debian:stretch-20190812-slim`.
Also set `-ldflags "-s -w"` for `proxy-identity` and `web`. Modify
`linkerd.io/base` to also be based off of
`debian:stretch-20190812-slim`, update tag to `2019-09-04.01`.

Fixes #3383

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-09-05 11:28:33 -07:00
Kevin Taylor 271209e341 Allow heartbeat to be disabled (#3366)
* Disable heartbeat by default

Signed-off-by: Kevin Taylor <kevtaylor@expedia.com>

* Address review

Signed-off-by: Kevin Taylor <kevtaylor@expedia.com>

* Remove tabs in values

Signed-off-by: Kevin Taylor <kevtaylor@expedia.com>
2019-09-05 11:12:07 -07:00
Bruno M. Custódio 8fec756395 Add '--address' flag to 'linkerd dashboard'. (#3274)
Signed-off-by: Bruno Miguel Custódio <brunomcustodio@gmail.com>
2019-09-05 10:56:10 -07:00
陈谭军 a30882ef22 remove the duplicate word (#3385)
Signed-off-by: chentanjun <2799194073@qq.com>
2019-09-04 20:13:55 -07:00
Alena Varkockova d369029909 Emit error when cannot connect to kubernetes (#3327)
Introduce CategoryError

Signed-off-by: Alena Varkockova <varkockova.a@gmail.com>
2019-09-04 17:34:53 -07:00
Andrew Seigner e51af8c8a9
Add known KillPod k8s event to integration test (#3380)
FailedKillPod events were causing integration tests to fail:
https://github.com/linkerd/linkerd2/runs/212313175#step:6:409

Add FailedKillPod as a known event. Example:
https://play.golang.org/p/WV52tyZgijW

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-09-04 14:00:16 -07:00
Andrew Seigner a8481b721a
GitHub Actions, kind, integration test logs fixes (#3372)
PR #3339 introduced a GitHub Actions CI workflow. Booting 6 clusters
simultaneously (3x Github Actions + 3x Travis) exhibits some transient
failures.

Implement fixes in GitHub Actions and integration tests to address kind
cluster creation and testing:
- Retry kind cluster creation once.
- Retry log reading from integration k8s clusters once.
- Add kind cluster creation debug logging.
- Add a GitHub Actions status badge to top of `README.md`.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-09-04 12:44:27 -07:00
Andrew Seigner bfa251dd8b
Disable integration tests for forked PRs (#3377)
GitHub Action secrets are intentionally not available to forked PRs.
This causes the integration tests that require those secrets to fail.

Modify GitHub Actions such that they only run for non-forked PRs.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-09-04 12:41:26 -07:00
Alejandro Pedraza 17dd9bf6bc
Couple of injection events fixes (#3363)
* Couple of injection events fixes

When generating events in quick succession against the same target, client-go issues a PATCH request instead of a POST, so we need the extra RBAC permission.

Also we have an informer on pods, so we also need the "watch" permission
for them, whose omission was causing an error entry in the logs.

Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
2019-09-04 11:57:20 -05:00
Alejandro Pedraza acbab93ca8
Add support for k8s 1.16 (#3364)
Fixes #3356

1.16 removes some api groups that were already deprecated. From k8s blog
post (https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/):

```
- PodSecurityPolicy: will no longer be served from extensions/v1beta1 in
v1.16.
    Migrate to the policy/v1beta1 API, available since v1.10. Existing
    persisted data can be retrieved/updated via the policy/v1beta1 API.
- DaemonSet, Deployment, StatefulSet, and ReplicaSet: will no longer be
served from extensions/v1beta1, apps/v1beta1, or apps/v1beta2 in v1.16.
    Migrate to the apps/v1 API, available since v1.9. Existing persisted
    data can be retrieved/updated via the apps/v1 API.
```

Previous PRs had already made this change at the Helm templates level,
but we still needed to do it at the API calls and tests.

The integration tests ran fine for k8s 1.12 and 1.15. They fail on 1.16
because the upgrade integration test tries to install linkerd 2.5 which is not
compatible with 1.16.

Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
2019-09-04 09:59:55 -05:00
Andrew Seigner 4f71b522dc
Introduce Github Actions CI workflow (#3339)
The existing Travis CI setup requires additional integrations and
permissions with Github, and also lacks some flexibility around job
dependency management.

Introduce a new CI workflow based on Github Actions. This initial
workflow performs the same CI work that Travis does, and will iniitially
run in parallel:
- Go unit tests
- JS unit tests
- Go lint
- Validate Go deps
- Integration tests (deep, upgrade, helm)

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-09-03 17:11:30 -07:00