Commit Graph

2319 Commits

Author SHA1 Message Date
Tarun Pothulapati 1dd8ae425b
update helm render tests to consider child charts values.yaml (#4725)
* update helm render tests to read child charts values.yaml

Helm installation by default, considers values.yaml for dependend charts
and uses them in rendering. This function is being used for add-ons to
keep the default template values, allowing further overriden from the
parent chart's i.e linkerd2 values.yaml or --addon-config through CLI.

This PR updates the Helm tests to reflect the same i.e consider
values.yaml of chart dependencies if present.

This does not have any UX changes but helps with the follow up 
add-on related work.
2020-07-08 20:28:56 +05:30
Alejandro Pedraza e4273522b8
Delete unused files (#4729)
Removed `controller/proxy-injector/webhook_ops.go` and `controller/sp-validator/webhook_ops.go` that we used when we first introduced webhooks to dynamically create their configs, but we ended up doing that upfront at install time.
2020-07-08 06:41:44 -05:00
Desmond Ho 93bf079640
Added custom tolerations to helm chart (#4626)
... for the control plane resources

Signed-off-by: Desmond Ho <desmond.ho@cloverhealth.com>
2020-07-07 17:37:02 -05:00
Suraj Deshmukh d7dbe9cbff
Fix spelling mistakes using codespell (#4700)
Using following command the wrong spelling were found and later on
fixed:

```
codespell --skip CHANGES.md,.git,go.sum,\
    controller/cmd/service-mirror/events_formatting.go,\
    controller/cmd/service-mirror/cluster_watcher_test_util.go,\
    SECURITY_AUDIT.pdf,.gcp.json.enc,web/app/img/favicon.png \
    --ignore-words-list=aks,uint,ans,files\' --check-filenames \
    --check-hidden
```

Signed-off-by: Suraj Deshmukh <surajd.service@gmail.com>
2020-07-07 17:07:22 -05:00
Alejandro Pedraza 9908b2b8b2
Re-enable custom domain integration test (#4722)
The function triggering the test for k8s custom cluster domain was
misnamed, and thus the test wasn't being run.

This also adds some extra error handling to catch this and other
potential issues.
2020-07-07 16:27:46 -05:00
Matei David 9d8d89cce8
Add EndpointSlice logic to EndpointsWatcher (#4501) (#4663)
Introduce support for the EndpointSlice k8s resource (k8s v1.16+) in the destination service.
Through this PR, in the EndpointsWatcher, there will be a dedicated informer for EndpointSlice;
the informer cannot run at the same time as the Endpoints resource informer. The main difference
is that EndpointSlices have a one-to-many relationship with a service, they provide better performance benefits,
dual-stack addresses and more. EndpointSlice support also implies service topology and other k8s related features.

Validated and tested manually, as well as with dedicated unit tests.

Closes #4501

Signed-off-by: Matei David <matei.david.35@gmail.com>
2020-07-07 13:20:40 -07:00
ZouYu b9f0208f82
Add some unit test (#4701)
Add additional tests for converting IP address between control plane or proxy
types to strings.

Signed-off-by: zouyu <zouy.fnst@cn.fujitsu.com>
2020-07-07 09:09:49 -07:00
Daniel Lang e05336d4c1
Update ADOPTERS.md (#4589)
adding mattepaint.com to ADOPTERS.md

Signed-off-by: Daniel Lang <mavrick@dfrag.tv>

Co-authored-by: Alex Leong <alex@buoyant.io>
2020-07-06 16:06:44 -07:00
Matei David a2bd230cd6
service topologies: add Kubernetes/API EndpointSlice support (#4696)
Based on the [EndpointSlice PR](https://github.com/linkerd/linkerd2/pull/4663), this is just the k8s/api support for endpointslices to shorten the first PR.

* Adds CRD
* Adds functions that check whether the cluster has EndpointSlice access
* Adds discovery & endpointslice informers to api.

Signed-off-by: Matei David <matei.david.35@gmail.com>
2020-07-06 15:28:48 -07:00
Dominik Münch 143c251a06
Add Celonis to adopters (#4716)
Signed-off-by: Dominik Münch <d.muench@celonis.com>

Co-authored-by: cpretzer <cpretzer@users.noreply.github.com>
2020-07-06 12:08:50 -07:00
iohenkies 0e635002ea
Update ADOPTERS.md (#4712)
Added Sue BV to the adopters list
Added Youmail to list of adopters (#4694)

Signed-off-by: Freddy Andersen <fandersen@youmail.com>
Co-authored-by: Freddy Andersen <53147+heimdull@users.noreply.github.com>
Co-authored-by: Alex Leong <alex@buoyant.io>
2020-07-06 12:08:10 -07:00
Oliver Gould bb0b71c6b5
Alphabetize adopters (#4704)
Alphabetize adopters and update the ADOPTERS.md pull request link.
2020-07-03 12:42:04 -07:00
cpretzer 3862aba314
Release edge-20.7.1 (#4698)
* Release edge-20.7.1

Signed-off-by: Charles Pretzer <charles@buoyant.io>
2020-07-03 08:42:58 -07:00
Oliver Gould 92dd292819
proxy: v2.103.0 (#4703)
This release increases the default buffer size to match the proxy's
in-flight request limit. This reduces contention in overload--especially
high-concurrency--situations, substantially reducing tail latency.

---

* update test-support clients and servers to be natively async (linkerd/linkerd2-proxy#580)
* Print build diagnostics in docker (linkerd/linkerd2-proxy#583)
* update test controllers to std::future/Tonic; remove threads (linkerd/linkerd2-proxy#585)
* buffer: Box the inner service's reponse future (linkerd/linkerd2-proxy#586)
* Eliminate Bind & Listen traits (linkerd/linkerd2-proxy#584)
* cache: replace Lock with Buffer (linkerd/linkerd2-proxy#587)
2020-07-02 11:27:30 -07:00
Tarun Pothulapati cf34a14985
Add a Windows Linkerd cli Test (#4653)
This PR adds a new cli test to see if installation yamls are correctly
generated even on windows, this is important because of all the file
path difference between windows and Linux, and if any code uses a wrong
format might cause the chart generation commands to fail on windows.

This creates a separate workflow for both release and integration.

Also, all the exisiting integration tests are moved in to
/tests/integration to separate from /test/cli as this test does not fall
under integration tests category
2020-07-02 23:13:57 +05:30
Tarun Pothulapati 7cd188dc65
Add `values.yaml` to chart tempaltes (#4682)
This change adds add-on level values.yaml into the template to use for
rendering. No changes as of rn, but will be used by add-ons later on!
2020-07-02 22:59:41 +05:30
Tarun Pothulapati fcc3eb5411
cli: support url with addon-config flag (#4666)
adds support for urls through addon-config flag
2020-07-02 22:57:22 +05:30
Desmond Ho 4eaaedc9ca
Add CloverHealth to ADOPTERS.md (#4702)
Signed-off-by: Desmond Ho <desmond.ho@cloverhealth.com>
2020-07-02 11:14:25 -05:00
Tarun Pothulapati c3131cde0e
Use cniPluginVersion with Helm for linkerd2-cni (#4693)
use `cniPluginVersion` as the fall-back version with Helm
2020-07-02 20:45:13 +05:30
Naseem 361d35bb6a
feat: add log format annotation and helm value (#4620)
* feat: add log format annotation and helm value

Json log formatting has been added via https://github.com/linkerd/linkerd2-proxy/pull/500
but wiring the option through as an annotation/helm value is still
necessary.

This PR adds the annotation and helm value to configure log format.

Closes #2491

Signed-off-by: Naseem <naseem@transit.app>
2020-07-02 10:08:52 -05:00
Zahari Dichev 5a2f326bb5
Surface scheduling errors on retry (#4683)
Currently linkerd check appears to hang on HA installations where there are pods that are unscheduable. In reality it is just wating on a condition that might never become true without showing any useful information (i.e. which pods are not scheduled). This change adds sets the `surfaceErrorOnRetry: true` so the user gets feedback wrt to what conditions are not met yet instead of simply being shown waiting for check to complete.

Fix #4680

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
2020-06-30 18:14:21 +03:00
Zahari Dichev 51c48694d4
Make uncheduble pods check warning only (#4675)
Currently commands that need access to the public api are executing the `LinkerdControlPlaneExistenceChecks` This set of checks includes one that specifically checks that there is no unscheduable pods. In fact in order to run commands like stat and edge we do not need to meet that requirement.

This change relaxes all this by makind the no unschedulable pods a warning only check. Fixes #3940

Signed-off-by: Zahari Dichev zaharidichev@gmail.com
2020-06-30 16:55:17 +03:00
Arthur Silva Sens 021048d576
GoDocs for completion, dashboard and diagnostics cli commands (#4518)
Signed-off-by: arthursens <arthursens2005@gmail.com>
2020-06-30 05:53:50 -05:00
Mayank Shah f00c17e52a
conformance validation: Refactor install test helpers (#4681)
* Refactor install test helpers

- Move testResourcesPostInstall to testutil.TestResourcesPostInstall
- Move exerciseTestAppEndpoint to testutil.ExerciseTestAppEndpoint

Signed-off-by: Mayank Shah <mayankshah1614@gmail.com>

* Trigger CI

Signed-off-by: Mayank Shah <mayankshah1614@gmail.com>
2020-06-29 14:29:41 -07:00
Naseem 733d911677
feat: add option to persist prometheus data (#4578)
Data disappears upon prometheus restarts due to it being all in-memory.

Adding an option to enabled persistence by means of a PVC  would be the right approach. It is commonly seen in a wide array of helm charts.

Fixes #4576

Signed-off-by: Naseem <naseem@transit.app>
2020-06-29 14:26:26 -07:00
William Morgan 4b9cf1d088
polish README (#4686)
- match messaging w/website
- replace specific K8s versions with "modern" (future-proofing)
- Copyright 2019 -> 2020
- Minor tweaks

Signed-off-by: William Morgan <william@buoyant.io>
2020-06-29 10:52:00 -07:00
Alejandro Pedraza aea541d6f9
Upgrade generated protobuf files to v1.4.2 (#4673)
Regenerated protobuf files, using version 1.4.2 that was upgraded from
1.3.2 with the proxy-api update in #4614.

As of v1.4 protobuf messages are disallowed to be copied (because they
hold a mutex), so whenever a message is passed to or returned from a
function we need to use a pointer.

This affects _mostly_ test files.

This is required to unblock #4620 which is adding a field to the config
protobuf.
2020-06-26 09:36:48 -05:00
Alex Leong 1b9ca5187a
edge-20.6.4 (#4672)
This edge release moves the proxy onto a new version of the Tokio runtime. This
allows us to more easily integrate with the ecosystem and may yield performance
benefits as well.

* Upgraded the proxy's underlying Tokio runtime and its related libraries
* Added support for PKCS8 formatted ECDSA private keys
* Added support for Helm configuration of per-component proxy resources requests
  and limits (thanks @cypherfox!)
* Updated the `linkerd inject` command to throw an error while injecting
  non-compliant pods (thanks @mayankshah1607)

Signed-off-by: Alex Leong <alex@buoyant.io>
2020-06-25 14:52:33 -07:00
Oliver Gould ee7a73cd87
proxy: v2.102.0 (#4670)
This release fixes a regression that could cause service profile lookups
to be retried indefinitely, despite the server returning an
`InvalidArgument` response (which indicates the proxy should not retry).

---

* fix InvalidProfileAddr not converting into DiscoveryRejected (linkerd/linkerd2-proxy#581)
2020-06-25 12:53:46 -07:00
Kevin Leimkuhler 29bcb57de4
Update release workflow kind integration tests (#4668)
## Description

As discussed [here](https://github.com/linkerd/linkerd2/pull/4653#discussion_r445543061), the `kind_integration` job of the release workflow was not kept in sync with the changes made in #4593.

Until GitHub actions can reuse yaml for separate workflows, these sections are supposed to be kept in sync.

This would be an issue if we had tried doing a release since #4593 merged, but that has not happened yet.

## Changes

This updates the release workflow `kind_integration` job to use the use new test interface, mainly removing cluster creation and image loading as necessary prerequisites.

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
2020-06-25 13:01:04 -04:00
Kevin Leimkuhler 4372ed56dd
Isolate tests by cluster and make run interface simpler (#4593)
## Summary

Change the default behavior of integration tests to be isolated by cluster.
Additionally, make running one or all tests easier than the current process.

These changes are explained more in the [Testing
RFC](https://github.com/linkerd/rfc/blob/master/design/0004-isolated-integration-tests.md)

## Changes

This is a script used only by Linkerd developers, but there is a lot of useful
usage examples and explanations in `bin/tests --help` output:

```
Run Linkerd integration tests.

Optionally specify one of the following tests: [upgrade helm helm-upgrade uninstall deep external-issuer]

Usage:
    tests [--images] [--images-host ssh://linkerd-docker] [--name test-name] [--skip-kind-create] /path/to/linkerd

Examples:
    # Run all tests in isolated clusters
    tests /path/to/linkerd

    # Run single test in isolated clusters
    tests --name test-name /path/to/linkerd

    # Skip KinD cluster creation and run all tests in default cluster context
    tests --skip-kind-create /path/to/linkerd

    # Load images from tar files located under the 'image-archives' directory
    # Note: This is primarly for CI
    tests --images /path/to/linkerd

    # Retrieve images from a remote docker instance and then load them into KinD
    # Note: This is primarly for CI
    tests --images --images-host ssh://linkerd-docker /path/to/linkerd

Available Commands:
    --name: the argument to this option is the specific test to run
    --skip-kind-create: skip KinD cluster creation step and run tests in an existing cluster.
    --images: (Primarily for CI) use 'kind load image-archive' to load the images from local .tar files in the current directory.
    --images-host: (Primarily for CI) the argument to this option is used as the remote docker instance from which images are first retrieved (using 'docker save') to be then loaded into KinD. This command requires --images.
```

### Run all tests

Old:

```bash
bin/test-run $PWD/bin/linkerd
```

New:

```bash
bin/tests $PWD/bin/linkerd
```

### Run single test (upgrade for example):

Current:

```bash
. bin/_test-run.sh
init_test_run $PWD/bin/linkerd
upgrade_integration_tests
```

New:

```bash
bin/tests --name upgrade $PWD/bin/linkerd
```

### Run tests in isolated KinD clusters

Current: Not possible without running single tests in newly created clusters
manually

New:

```bash
bin/tests $PWD/bin/linkerd
```

### Run tests in isolated namespaces on an existing cluster

Old:

```bash
bin/test-run $PWD/bin/linkerd
```

New:

```bash
bin/tests --skip-kind-create $PWD/bin/linkerd
```

## CI

`kind_integration` has been updated so that it does not create a KinD cluster as
part of its test setup.

`cloud_integration` passes the `--skip-kind-create` flag so that the tests are
run serially in a non-KinD cluster.


Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
2020-06-24 17:06:29 -04:00
Oliver Gould c4d649e25d
Update proxy-api version to v0.1.13 (#4614)
This update includes no API changes, but updates grpc-go
to the latest release.
2020-06-24 12:52:59 -07:00
Alejandro Pedraza d842a97cb2
Update CI and docs to reference `main` branch (#4662)
Files changed:

```
.github/PULL_REQUEST_TEMPLATE.md
.github/workflows/cloud_integration.yml
.github/workflows/kind_integration.yml
.github/workflows/release.yml
.github/workflows/static_checks.yml
.github/workflows/unit_tests.yml
BUILD.md
CONTRIBUTING.md
bin/test-scale
bin/win/linkerd.nuspec
```
2020-06-24 12:39:22 -07:00
Mayank Shah 2b0482c821
Update `inject` to throw an error while injecting non-compliant pods (#4346)
* Update inject to error out on failure

Update injection process to throw an error when the reason for failure is due to sidecar, udp, automountServiceAccountToken or hostNetwork

Signed-off-by: Mayank Shah <mayankshah1614@gmail.com>
2020-06-24 14:07:05 -05:00
Oliver Gould 1fb3bd0731
codeowners: Relax review requirements on readmes (#4661)
I should review all changes to the top-level project documents.
CODEOWNERS is misconfigured, however, so that I am required to review
changes to all files named README.md, which isn't intended.

This change ensures that my review is only required on these files in
the root of the repository.
2020-06-24 11:36:25 -07:00
Zahari Dichev 904f146558
Multicluster install integration test (#4540)
This PR adds multicluster components to the integration tests.

The existing tests have been modified to pass the `--multicluster` flag so that the entire integration test suite runs with multicluster components.

Currently, the upgrade tests do not have multicluster components installed, but this will be done in a follow-up PR. 

Signed-off-by: Zahari Dichev <zaharidichev@gmail.com>
2020-06-24 14:32:22 -04:00
Lutz Behnke 846d2f11d4
Add support for Helm configuration of per-component proxy resources requests and limits (#4226)
Signed-off-by: Lutz Behnke <lutz.behnke@finleap.com>
2020-06-24 12:54:27 -05:00
Alexander Berger 3014d58384
Support parsing PKCS8 encoded private keys (#4597)
Tools like cert-manager might encode private keys in PKCS8 format instead of PKCS1
in which case linkerd would fail as it cannot parse PKCS8 encoded private keys.

With this commit support for parsing PKCS8 encoded private keys is added to linkerd,
allowing it to read ECDSA and RSA keys encoded in PKCS8.

Unit tests have been added to test the private key parsing.

This commit addresses https://github.com/jetstack/cert-manager/issues/2942.

Signed-off-by: Alexander Berger <alex.berger@nexxiot.com>
Signed-off-by: alex.berger@nexiot.ch <alex.berger@nexiot.ch>

Co-authored-by: alex.berger@nexiot.ch <alex.berger@nexiot.ch>
2020-06-23 19:10:19 -07:00
Oliver Gould 2fd05979de
proxy: v2.101.0 (#4658)
This release primarily features an upgrade of the proxy's underlying
Tokio runtime and its related libraries. We've observed lower latencies
in initial benchmarks, but further testing and burn-in is warranted.

Also, the proxy now honors the `LINKERD_PROXY_LOG_FORMAT=json`
configuration to enable JSON-formatted logging.

---

* Add a CODEOWNERS (linkerd/linkerd2-proxy#558)
* Fix shellcheck issues in shell scripts (linkerd/linkerd2-proxy#554)
* update the proxy to use std::future and Tokio 0.2 (linkerd/linkerd2-proxy#568)
* Prune unused dependencies (linkerd/linkerd2-proxy#569)
* Support LINKERD_PROXY_LOG_FORMAT=json (linkerd/linkerd2-proxy#500)
* Change docs references from "master" to "main" (linkerd/linkerd2-proxy#571)
* Upgrade tokio-rustls & webpki. (linkerd/linkerd2-proxy#570)
* Makefile: Add shellcheck recipe (linkerd/linkerd2-proxy#555)
* Update proxy-api dependencies (linkerd/linkerd2-proxy#573)
* integration: fix missing traces (linkerd/linkerd2-proxy#572)
* Update Rust to 1.44.0 (linkerd/linkerd2-proxy#574)
* Use async/await to simplify connection-accept task (linkerd/linkerd2-proxy#575)
* Update Rust to 1.44.1 (linkerd/linkerd2-proxy#576)
* outbound: Split HTTP endpoint builder (linkerd/linkerd2-proxy#578)
* Simplify protocol detection with async/await (linkerd/linkerd2-proxy#577)
* Pin proxy-api at v0.1.13 (linkerd/linkerd2-proxy#579)
2020-06-23 19:04:28 -07:00
Alex Leong d9edec1022
Clean up .dockerignore and .gitignore (#4656)
Make some minor tweaks to `.gitignore` and `.dockerignore` to make them more similar.

Signed-off-by: Alex Leong <alex@buoyant.io>
2020-06-23 16:39:17 -07:00
Oliver Gould ca1a9f66d2
go-run: Move temporary binary into `target` directory (#4657)
The `bin/go-run` script generates a temporary binary, stored in the root
of the repository.

This change moves it into `target/` so that is included in the
.dockerignore, and so that the repo can be cleaned easily by removing
the `target/` directory.
2020-06-23 15:55:34 -07:00
Oliver Gould d43ec41574
Relax review requirements on cni-plugin/Dockerfile (#4655)
The /cni-plugin directory has additional review requirements; however,
its Dockerfile changes each time `go.mod` is updated. It was not
intended to require this extra review on these routine changes.

This change updates CODEOWNERS to make all maintainers owners of
`cni-plugin/Dockerfile`.
2020-06-23 15:23:38 -07:00
Ivan Sim 7927be6856
Update GitHub issue templates (#4654)
Link the 'Question' option to the 'Discussion' page

Signed-off-by: Ivan Sim <ivan@buoyant.io>
2020-06-23 13:43:53 -07:00
Alejandro Pedraza 83ae0ccf0f
Release notes for stable-2.8.1 (#4652)
* Release notes for stable-2.8.1

This release fixes multicluster gateways support on EKS.

* The multicluster service-mirror has been extended to resolve DNS names for
  target clusters when an IP address is not known.
* Linkerd checks could fail when run from the dashboard. Thanks to @alex-berger
  for providing a fix!
* Have the service mirror controller check in `linkerd check` retry on failures.
* As of this version we're including a Chocolatey package (Windows) next to the
  other binaries in the release assets in GitHub.
* Base images have been updated:
  * debian:buster-20200514-slim
  * grafana/grafana:7.0.3
* The shell scripts under `bin` continued to be improved, thanks to @joakimr-axis!
2020-06-23 12:12:06 -05:00
Mayank Shah 7f29717a64
Refactor helper functions from `inject` integration tests (#4644)
move `applyPatch` `useTestImageTag`, `validateInject``getProxyContainers` as global functions to be used!
2020-06-22 23:15:52 +05:30
Zahari Dichev 7c98e89bdc
Make `service mirror controller is running check` retry (#4650)
This PR makes the service mirror controller is running retry on failure. This brings the check in line with the rest of the checks that verify that certain Linkerd components are running. It is especially useful in integration tests when we want to wait for the service mirror component to be initialized for a certain amount of time before we simply fail the linkerd check command

Fix #4642

Signed-off-by: Zahari Dichev zaharidichev@gmail.com
2020-06-22 20:33:43 +03:00
Alejandro Pedraza 27b2838c52
Post-2.8.0 integration test cleanup (#4641)
* Post-2.8.0 integration test cleanup

We had some code for testing upgrades from pre-2.8.0 stables that took
care of creating the non-existent `linkerd-smi-metrics` SA, which is no
longer necessary.

I also had missed many spots in test/install_test.go from #4623
2020-06-22 09:09:04 -05:00
Joakim Roubert 8d19b4055b
Improve shellscript portability by using /bin/env (#4628)
Using `/bin/env` increases portability for the shell scripts (and often using `/bin/env` is requested by e.g. Mac users). This would also facilitate testing scripts with different Bash versions via the Bash containers, as they have bash in `/usr/local` and not `/bin`. Using `/bin/env`, there is no need to change the script when testing. (I assume the latter was behind c301ea214b (diff-ecec5e3a811f60bc2739019004fa35b0), which would not happen using `/bin/env`.)

Signed-off-by: Joakim Roubert <joakimr@axis.com>
2020-06-19 15:49:29 -04:00
cpretzer 84a29b9612
Prevent kind-load from resolving TAG when images are provided (#4634)
* Update the logic for resolving the tag based on script parameters
Signed-off-by: Charles Pretzer <charles@buoyant.io>
2020-06-19 11:29:50 -07:00
Joakim Roubert 82e91382b7
test-cleanup: Make populate_array() bash 3-friendly (#4627)
Fixes #4621

Legacy versions of bash (used in e.g. Mac OS) do not have the [nameref](https://www.gnu.org/software/bash/manual/html_node/Shell-Parameters.html) functionality.
This patch replaces the use of that in the `populate_array` function and uses a bash 3-friendly way of handing this instead.

([Kubernetes](https://github.com/kubernetes/kubernetes) developers will recognize this bash 3-friendly way from [kube::util::read-array](d8febccacf/hack/lib/util.sh (L755-L770)) in the Kubernetes code base.)

Signed-off-by: Joakim Roubert <joakim.roubert@axis.com>
2020-06-18 17:35:34 -04:00