Commit Graph

3217 Commits

Author SHA1 Message Date
Matei David ecd39700c4
Update proxy-init to v1.4.0 (#6790)
Updates linkerd2-proxy-init version to v1.4.0

Major change includes removing "redirect-non-loopback-traffic" rule; previously packets with destination != 127.0.0.1 on lo originating from proxy process would be sent to the inbound proxy port (assuming application tries to talk to itself). This is no longer the case.

Signed-off-by: Matei David <matei@buoyant.io>
2021-09-01 15:45:12 +01:00
Tarun Pothulapati bc0cb4ea61
cli: warn on the usage of `linkerd viz stat ts` (#6684)
Part of https://github.com/linkerd/linkerd2/issues/6647

This PR adds a new warning that is displayed when `linkerd viz stat ts`
is used as TrafficSplits without SMI extension will not be supported
from `2.12`

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2021-09-01 15:05:08 +05:30
Kevin Leimkuhler d611af3647
Filter default opaque ports for pods and services (#6774)
#6719 changed the proxy injector so that it adds the `config.linkerd.io/opaque-ports` annotation to all pods and services if they or their namespace do not already contain the annotation. The value used is the default list of opaque ports—which is `25,443,587,3306,4444,5432,6379,9300,11211` unless otherwise specified by the user during installation.

Closes #6729

The main issue with this is that if a service exposes a service port `9090` that targets `3306`, the service _should_ have `9090` set as opaque since it targets a default opaque port, but it does not. This change ensures that services with this situation have `9090` set as opaque.

Additionally, services and pods do not need an annotation for with the entire default opaque ports list if they don't expose those ports in the first place. This change will filter out ports from the default list if the service or pod does not expose them.

### tests
I've added some unit tests that demonstrate the change in behavior and explained in the original issue #6729.

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
2021-08-31 16:11:42 -06:00
dependabot[bot] a125f4ba5d
build(deps): bump structopt from 0.3.22 to 0.3.23 in /policy-controller (#6787)
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.22 to 0.3.23.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.22...v0.3.23)

---
updated-dependencies:
- dependency-name: structopt
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-31 12:31:50 -06:00
dependabot[bot] 3e4f1369f5
build(deps): bump serde from 1.0.129 to 1.0.130 in /policy-controller (#6780)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.129 to 1.0.130.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.129...v1.0.130)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-30 15:45:32 -07:00
dependabot[bot] 4612b80151
build(deps): bump futures from 0.3.16 to 0.3.17 in /policy-controller (#6778)
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.16 to 0.3.17.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.16...0.3.17)

---
updated-dependencies:
- dependency-name: futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-30 15:44:46 -07:00
dependabot[bot] 6e7cf4f98a
build(deps): bump core-js from 3.16.3 to 3.16.4 in /web/app (#6777)
Bumps [core-js](https://github.com/zloirock/core-js) from 3.16.3 to 3.16.4.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/compare/v3.16.3...v3.16.4)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-30 15:44:31 -07:00
dependabot[bot] eddba06634
build(deps): bump react-router-dom from 5.2.0 to 5.2.1 in /web/app (#6776)
Bumps [react-router-dom](https://github.com/ReactTraining/react-router) from 5.2.0 to 5.2.1.
- [Release notes](https://github.com/ReactTraining/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ReactTraining/react-router/compare/v5.2.0...v5.2.1)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-30 15:44:13 -07:00
dependabot[bot] 8b64de195a
build(deps-dev): bump eslint-plugin-react in /web/app (#6775)
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.24.0 to 7.25.1.
- [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases)
- [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yannickcr/eslint-plugin-react/compare/v7.24.0...v7.25.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-30 15:43:57 -07:00
Oliver Gould 893a61bb26
Configure the identity controller with a default policy (#6768)
The identity controller cannot depend on the policy controller; but we
can use a more restrictive default policy here. This change updates the
identity controller's default policy to be `cluster-unauthenticated` (so
that health checking is permitted) and sets the identity service port to
require TLS so that unmeshed connections may not reach the identity
controller.
2021-08-30 14:53:11 -07:00
Oliver Gould ea7bf7e2d8
Update gitattributes to improve PR file visilibity (#6767)
This change adds more golden files to have a `linguist-generated=true`
setting so that they are not displayed in PRs.

Cargo.lock files are set with `linguist-generated=false` so that these
changes are not hidden in PRs.
2021-08-30 14:52:53 -07:00
dependabot[bot] 161b1e904e
build(deps): bump serde_json from 1.0.66 to 1.0.67 in /policy-controller (#6779)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.66 to 1.0.67.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.66...v1.0.67)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-30 14:37:42 -05:00
Alejandro Pedraza df4c19292e
Speed improvements for `integration_tests.yml` and CLI docker target changes (#6762)
* Speed improvements for `integration_tests.yml` and CLI docker targets changes

Fixes #6735

`cli/Dockerfile` has been refactored to have different possible final targets, one per os/arch, while keeping the old `multi-arch` target that builds for everything.

The `DOCKER_MULTIARCH` env var has been replaced with `DOCKER_TARGET`, that should match any of the targets in that Dockerfile. If not set, its value is set to the host's os/arch automatically in `bin/_docker.sh`.

`bin/_docker.sh` is consumed by `bin/docker-build-cli-bin`, whose logic is now simpler and allows to be called through something like `DOCKER_TARGET=xxx bin/docker-build-cli-bin` to be able to build the CLI inside docker for a specific os/arch (again, if `DOCKER_TARGET` is unset, it'll build for the host's os/arch).

`bin/docker-pull-binaries` was also simplified in the same way.

The `integration_tests.yml` workflow now sets `DOCKER_TARGET=linux-amd64` because that's all that's required. This makes the `Docker build (cli-bin)` job to no longer be the lengthiest one, which results in a speedup of 5mins for the `docker_build` part of the workflow.

The `release.yml` continues to work as before, having now `DOCKER_TARGET=multi-arch`, given that besides the `linux-amd64` CLI we also need `linux-arm64` and the windows CLI to be available there.
2021-08-27 16:02:43 -05:00
dependabot[bot] 023c41b3da
build(deps-dev): bump babel-jest from 27.0.6 to 27.1.0 in /web/app (#6763)
Bumps [babel-jest](https://github.com/facebook/jest/tree/HEAD/packages/babel-jest) from 27.0.6 to 27.1.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v27.1.0/packages/babel-jest)

---
updated-dependencies:
- dependency-name: babel-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-27 13:38:29 -07:00
dependabot[bot] 3c86f8e673
build(deps-dev): bump jest from 27.0.6 to 27.1.0 in /web/app (#6764)
Bumps [jest](https://github.com/facebook/jest) from 27.0.6 to 27.1.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v27.0.6...v27.1.0)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-27 12:36:42 -07:00
dependabot[bot] 4de8b0eded
build(deps): bump make-plural from 6.2.2 to 7.0.0 in /web/app (#6765)
Bumps [make-plural](https://github.com/eemeli/make-plural/tree/HEAD/packages/plurals) from 6.2.2 to 7.0.0.
- [Release notes](https://github.com/eemeli/make-plural/releases)
- [Changelog](https://github.com/eemeli/make-plural/blob/master/packages/plurals/CHANGELOG.md)
- [Commits](https://github.com/eemeli/make-plural/commits/make-plural@7.0.0/packages/plurals)

---
updated-dependencies:
- dependency-name: make-plural
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-27 12:36:31 -07:00
dependabot[bot] 9bb49a9826
build(deps): bump serde_yaml from 0.8.19 to 0.8.20 in /policy-controller (#6766)
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.8.19 to 0.8.20.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.8.19...0.8.20)

---
updated-dependencies:
- dependency-name: serde_yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-27 14:31:37 -05:00
Alex Leong 2851254966
Add admission controller to policy controller (#6696)
We add a validating admission controller to the policy controller which validates `Server` resources.  When a `Server` admission request is received, we look at all existing `Server` resources in the cluster and ensure that no other `Server` has an identical selector and port.

Signed-off-by: Alex Leong <alex@buoyant.io>

Co-authored-by: Oliver Gould <ver@buoyant.io>
2021-08-27 11:26:23 -07:00
LiuDui 835d5c33ce
add DNS name validation, remove TODO (#6674)
add DNS name validation, remove TODO

Signed-off-by: liudui <1693291525@qq.com>
2021-08-27 11:25:05 -07:00
yorkijr a41af7c367
Update ADOPTERS.md (#6739)
Add manager.cl to the list of adopters.

Co-authored-by: Oliver Gould <ver@buoyant.io>
2021-08-27 10:59:35 +01:00
cpretzer 99eb134445
Add release notes for edge-21.8.4 (#6757)
This edge release continues to build on the policy feature by adding support for
cluster-scoped default policies and exposing policy labels on various prometheus
metrics. The proxy has been updated to return HTTP-level authorization errors
at the time that the request is processed, instead of when the connection is
established.

In addition, the proxy-injector has been updated to set the `opaque-ports`
annotation on a workload to make sure that controllers can discover how the
workload was configured. Also, the `sleep` binary has been added to the proxy
image in order to restore the functionality required for `waitBeforeExitSeconds`
to work.

* Added `default-inbound-policy` annotation to the proxy-injector
* Updated the proxy-injector to always add the `opaque-ports` annotation
* Added `sleep` binary to proxy image
* Updated inbound traffic metrics to include server and authorization labels
* Updated the policy-controller to honor pod level port annotations when a
  `Server` resource definition does not match the ports defined for the workload
* Updated the point at which the proxy returns HTTP-level authorization errors
* Exposed permit and policy labels on HTTP metrics
* Added support for cluster-scoped default policies
* Dropped `nonroot` variant from the policy-controller's distroless base image
  to avoid erroring in some environments.
2021-08-26 15:15:18 -07:00
Oliver Gould b6e01d410b
proxy: v2.154.0 (#6755)
This release improves policy handling for HTTP connections so that
requests are failed with a 403 Forbidden status (or a PERMISSION_DENIED
grpc-status, if appropriate).

Inbound metrics now include labels indicating the server and/or
authorization used to allow a connection or request to the proxy. Error
metrics now include an `unauthorized` error reason for traffic that is
denied by policy.

Finally, the outbound proxy no longer initializes mTLS or HTTP/2
upgrades when the target proxy is itself. This is done in preparation
for changes that will allow the proxy to stop forwarding connections on
`localhost` so that servers bound only on the loopback interface are not
exposed by Linkerd.

---

* build(deps): bump h2 from 0.3.3 to 0.3.4 (linkerd/linkerd2-proxy#1212)
* build(deps): bump libc from 0.2.99 to 0.2.100 (linkerd/linkerd2-proxy#1213)
* Use `ExtractParam` in transport metrics (linkerd/linkerd2-proxy#1211)
* policy: Add support for cluster-scoped default policies (linkerd/linkerd2-proxy#1210)
* Expose policy labels on inbound transport metrics (linkerd/linkerd2-proxy#1215)
* inbound: Expose permit labels on HTTP metrics (linkerd/linkerd2-proxy#1216)
* build(deps): bump tokio from 1.10.0 to 1.10.1 (linkerd/linkerd2-proxy#1218)
* build(deps): bump codecov/codecov-action from 2.0.2 to 2.0.3 (linkerd/linkerd2-proxy#1217)
* build(deps): bump hyper from 0.14.11 to 0.14.12 (linkerd/linkerd2-proxy#1221)
* build(deps): bump bytes from 1.0.1 to 1.1.0 (linkerd/linkerd2-proxy#1222)
* inbound: Return HTTP-level authorization errors (linkerd/linkerd2-proxy#1220)
* Skip TLS and H2 when target is inbound IP (linkerd/linkerd2-proxy#1219)
2021-08-26 12:32:51 -07:00
Kevin Leimkuhler 152290e58d
proxy-injector: add `default-inbound-policy` annotation (#6750)
The proxy injector now adds the `config.linkerd.io/default-inbound-policy` annotation to all injected pods.

Closes #6720.

If the pod has the annotation before injection then that value is used. If the pod does not have the annotation but the namespace does, then it inherits that. If both the pod and the namespace do not have the annotation, then it defaults to `.Values.policyController.defaultAllowPolicy`.

Upon injecting the sidecar container into the pod, this annotation value is used to set the `LINKERD2_PROXY_INBOUND_DEFAULT_POLICY` environment variable. Additionally, `LINKERD2_PROXY_POLICY_CLUSTER_NETWORKS` is also set to the value of `.Values.clusterNetworks`.

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
2021-08-26 12:46:40 -06:00
dependabot[bot] 0a256858af
build(deps): bump core-js from 3.16.2 to 3.16.3 in /web/app (#6746)
Bumps [core-js](https://github.com/zloirock/core-js) from 3.16.2 to 3.16.3.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/compare/v3.16.2...v3.16.3)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-26 23:36:35 +05:30
Kevin Leimkuhler c7d54bb826
proxy-injector: always add the `opaque-ports` annotation (#6719)
In order to discover how a workload is configured without knowing the global defaults, the `opaque-ports` annotation is now added by the proxy injector to workloads, regardless of the list being the default or user-specified.

Closes #6689

#### core
Because core control plane components do not go through the proxy injector the annotation is added to the `destination`, `identity`, and `proxy-injector` templates.

The `linkerd-destination` and `linkerd-proxy-injector` deployments both now just have the `opaque-ports: "8443"` annotation. The `linkerd-identity` deployment and service doesn't need this annotation since it doesn't expose anything in the default list.

#### non-core
All other resources go through the proxy injector; it decides whether or not services or pods (the two resources that it can add annotations to) should get the default list.

Workloads get the default list of opaque ports added if they and their namespace do not have the annotation already. So this boils down to:
1. If the workload already has the annotation, no patch is created
2. If the namespace has the annotation but the workload does not, a patch is generated
3. If the workload and namespace do not have the annotation, a patch is generated

#### tests
A unit test has been added and I performed the following manual tests:
1. Injected a pod with the annotation: a patch is generated but there is no change to opaque ports
2. Injected a pod with the namespace annotation: a patch is genereted and opaque ports are copied down to the pod
3. Injected a pod with no annotation on it or the namespace: a patch is generated and the default opaque ports are added
4. Created a pod (not injected): a patch is generated (without the proxy) that adds the annotation (this holds true for if the pod having the annotation or the namespace having the annotation)

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
2021-08-26 11:38:40 -06:00
Alejandro Pedraza f8af17c444
Use default distroless image in policy (#6752)
Fixes #6743

As in #6392 for the proxy image (fixed by #6451), using the
`distroless/cc:nonroot` base image breaks the policy container in some
environments. So we're changing that to `distroless/cc`. The policy
container is already being run using a non-root user, so we're not
compromising on security.
2021-08-26 10:32:37 -05:00
dependabot[bot] a92ce9aca4
build(deps-dev): bump eslint-plugin-import in /web/app (#6745)
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.24.1 to 2.24.2.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.24.1...v2.24.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-26 10:11:09 +05:30
dependabot[bot] 554e300fc8
build(deps): bump github.com/fsnotify/fsnotify from 1.5.0 to 1.5.1 (#6748)
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.5.0...v1.5.1)

---
updated-dependencies:
- dependency-name: github.com/fsnotify/fsnotify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-25 14:54:31 -07:00
dependabot[bot] 0f9aef2c24
Bump serde from 1.0.128 to 1.0.129 in /policy-controller (#6731)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.128 to 1.0.129.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.128...v1.0.129)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-25 14:17:05 -07:00
dependabot[bot] 45de863612
Bump tokio from 1.10.0 to 1.10.1 in /policy-controller (#6732)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.10.0 to 1.10.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.10.0...tokio-1.10.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-25 14:16:38 -07:00
dependabot[bot] 6cd990e807
build(deps): bump hyper from 0.14.11 to 0.14.12 in /policy-controller (#6747)
Bumps [hyper](https://github.com/hyperium/hyper) from 0.14.11 to 0.14.12.
- [Release notes](https://github.com/hyperium/hyper/releases)
- [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper/compare/v0.14.11...v0.14.12)

---
updated-dependencies:
- dependency-name: hyper
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-25 14:16:08 -07:00
Alex Leong 9ed5a3cb3f
Add sleep binary to proxy image (#6734)
Fixes #6723

We add the sleep binary to the proxy image so that the waitBeforeExitSeconds will work.

Signed-off-by: Alex Leong <alex@buoyant.io>
2021-08-25 08:56:20 -07:00
Tarun Pothulapati a8b1cdd79f
injector: cleanup env variables in `_proxy.tpl` (#6711)
* injector: cleanup env variables in `_proxy.tpl`

This PR updates the `_proxy.tpl` file to remove the usage of `_l5d_ns`
and `l5d_trustDomain` env variables which can be rendered directly
instead. This also moves the reference variables to the top for
simplicity purposes.

These unused variables will be removed in a future release to
prevent race conditions during upgrades.

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2021-08-25 11:55:56 +05:30
Alejandro Pedraza 1409d6bd10
Remove `windows_static_cli_tests` from `integration_tests.yml` (#6736)
Addresses part of #6735

The job remains in the `release.yml` workflow, which should continue
doing more complete checks (yet with lower probability of failure) than
the integration tests.
2021-08-24 17:33:14 -05:00
dependabot[bot] 192efefb76
Bump codecov/codecov-action from 2.0.2 to 2.0.3 (#6730)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](51d810878b...5a8bb4701e)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-24 14:57:12 -06:00
Tarun Pothulapati 36ce5538eb
test: Fix `rabbitmq-server` manifests in `externalresources` test (#6724)
* test: Fix `rabbitmq-server` manifests in `externalresources` test

Started to notice the following problems in the `externalresources` tests
that is causing them to retry and take a lot of time:
- liveness and readiness probes doesn't seem to be working causing
  restarts. This is addressed by using the [suggested probes from
  the rabbitmq docs](https://github.com/rabbitmq/diy-kubernetes-examples/blob/master/gke/statefulset.yaml#L118).
- `linkerd-proxy` erroring that `LINKERD2_PROXY_INBOUND_PORTS` is not
  set. This is fixed by adding the container ports that are being
  used.

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2021-08-25 00:40:07 +05:30
Oliver Gould 49f4af6e6b
policy: Cleanup policy response labels (#6722)
Policy controller API responses include a set of labels. These labels
are to be used in proxy m$etrics to indicate why traffic is permitted to
a pod. This permits metrics to be associated with `Server` and
ServerAuthorization` resources (i.e. for `stat`).

This change updates the response API to include a `name` label
referencing the server's name. When the policy is derived from a default
configuration (and not a `Server` instance), the name takes the form
'default:<policy>'.

This change also updates authorization labels. Defaults are encoded as
servers are, otherwise the authorization's name is set as a label. The
`tls` and `authn` labels have been removed, as they're redundant with
other labels that are already present.
2021-08-23 14:56:19 -07:00
dependabot[bot] 154ad9a228
Bump serde_yaml from 0.8.18 to 0.8.19 in /policy-controller (#6725)
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.8.18 to 0.8.19.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.8.18...0.8.19)

---
updated-dependencies:
- dependency-name: serde_yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-23 13:44:17 -06:00
dependabot[bot] c1ecb0bcbd
Bump serde from 1.0.127 to 1.0.128 in /policy-controller (#6726)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.127 to 1.0.128.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.127...v1.0.128)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-23 13:43:59 -06:00
Oliver Gould a8db23e163
policy-controller: Honor pod level port annotations (#6718)
Pods may be annotated with annotations like
`config.linkerd.io/opaque-ports` and
`config.linkerd.io/proxy-require-identity-inbound-ports`--these
annotations configure default behavior that should be honored when a
`Server` does not match the workload's ports. As it stands now, the
policy controller would break opaque-ports configurations that aren't
reflected in a `Server`.

This change reworks the pod indexer to create a default server watch for
each _port_ (rather than for each pod). The cache of default server
watches is now lazy, creating watches as needed for all used
combinations of default policies. These watches are never dropped, but
there are only a few possible combinations of port configurations, so
this doesn't pose any concerns re: memory usage.

While doing this, the names used to describe these default policies are
updated to be prefixed with `default:`. This generally makes these names
more descriptive and easier to understand.
2021-08-23 12:17:56 -07:00
Burak Tahtacıoğlu 1e98ea1c20
Update ADOPTERS.md (#6721) 2021-08-23 10:14:51 +01:00
dependabot[bot] b036990fda
Bump eslint-plugin-import from 2.24.0 to 2.24.1 in /web/app (#6712)
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.24.0 to 2.24.1.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.24.0...v2.24.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-23 13:58:51 +05:30
Andrew Hemming 4c4c2c6084
Fix documentation link (#6710)
Fixes broken link in readme and values files:

helmcustomizing-the-namespace

should be

helm#customizing-the-namespace

The former gives a 404.

Signed-off-by: Andrew Hemming <andrew@footprintmedia.net>
2021-08-20 15:39:56 -05:00
dependabot[bot] b6dc8b956b
Bump webpack-dev-server from 3.11.2 to 4.0.0 in /web/app (#6703)
* Bump webpack-dev-server from 3.11.2 to 4.0.0 in /web/app

Bumps [webpack-dev-server](https://github.com/webpack/webpack-dev-server) from 3.11.2 to 4.0.0.
- [Release notes](https://github.com/webpack/webpack-dev-server/releases)
- [Changelog](https://github.com/webpack/webpack-dev-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-server/compare/v3.11.2...v4.0.0)

---
updated-dependencies:
- dependency-name: webpack-dev-server
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Move writeToDisk config according to webpack-dev-server v4 migration guide

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alejandro Pedraza <alejandro@buoyant.io>
2021-08-20 05:45:15 -05:00
Oliver Gould 35a9e8b4fb
docker: Parellize CLI builds (#6708)
We currently build all of our CLI binaries serially, but if we have a
docker stage for each platform, we can parellize builds for each
platform, reducing build times significantly.

This change renames `cli/Dockerfile-bin` to `cli/Dockerfile` (so
that we get syntax highlighting in editors, etc) and restructures the
Dockerfile to have a docker stage for each platform. Then, there are
two final stages: 'basic' and 'multi-arch'. The `bin/docker-build-cli-bin`
utility typically only builds the `basic` target; when
`DOCKER_MULTIARCH` is set, it also builds the target that includes
arm binaries.
2021-08-19 16:27:56 -07:00
Kevin Leimkuhler 9da7226fdf
Add change notes (#6709)
## edge-21.8.3

This release adds support for dynamic inbound policies. The proxy now discovers
policies from the policy-controller API for all application ports documented in
a pod spec. Rejected connections are logged. Policies are not yet reflected in
the proxy's metrics.

These policies also allow the proxy to skip protocol detection when a server is
explicitly annotated as HTTP/2 or when the server is documented to be opaque or
application-terminated TLS.

* Added a new section to linkerd-viz's dashboard that lists installed extensions
  (thanks @sannimichaelse!)
* Added the `enableHeadlessServices` Helm flag to the `linkerd multicluster
  link` command for enabling headless service mirroring (thanks @knutgoetz!)
* Removed some unused and duplicate constants in the codebase (thanks
  @xichengliudui!)
* Added support for exposing service metadata from exported to mirrored services
  in multicluster installations (thanks @importhuman!)
* Fixed an issue where the policy controller's liveness checks would fail after
  the controller was disconnected but had successfully resumed its watches
* Fixed the `linkerd-policy` service selector to properly select `destination`
  control plane components
* Added additional environment variables to the proxy container to allow support
  for dynamic policy configuration

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
Co-authored-by: Oliver Gould <ver@buoyant.io>
2021-08-19 16:27:51 -06:00
dependabot[bot] 545446d1cc
Bump webpack from 5.50.0 to 5.51.1 in /web/app (#6704)
Bumps [webpack](https://github.com/webpack/webpack) from 5.50.0 to 5.51.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.50.0...v5.51.1)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-19 16:31:45 -05:00
Oliver Gould d33de672a6
proxy: v2.153.0 (#6707)
This release adds support for dynamic inbound policies. The proxy now
discovers policies from Linkerd'2 policy-controller API for all
application ports documented in a pod spec. Rejected connections are
logged. Policies are not yet reflected in the proxy's metrics.

These policies also allow the proxy to skip protocol detection when a
server is explicitly annotated as HTTP/2 or when the server is
documented to be opaque or application-terminated TLS.

---

* inbound: Use policy protocol configurations (linkerd/linkerd2-proxy#1203)
* build(deps): bump tokio from 1.9.0 to 1.10.0 (linkerd/linkerd2-proxy#1204)
* build(deps): bump tracing-subscriber from 0.2.19 to 0.2.20 (linkerd/linkerd2-proxy#1207)
* inbound: Discover policies from the control plane (linkerd/linkerd2-proxy#1205)
* build(deps): bump httparse from 1.4.1 to 1.5.1 (linkerd/linkerd2-proxy#1208)
2021-08-19 14:01:25 -07:00
dependabot[bot] 6a1f8af5cd
Bump github.com/fsnotify/fsnotify from 1.4.9 to 1.5.0 (#6705)
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.4.9 to 1.5.0.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.4.9...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/fsnotify/fsnotify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-19 14:59:52 -06:00
Tarun Pothulapati 9324195485
injector: move parent env variables to first (#6706)
Variable references are only expanded to previously defined
environment variables as per https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#envvar-v1-core
which means for `LINKERD2_PROXY_POLICY_WORKLOAD` to work correctly, the
`_pod_ns` `_pod_name` should be present before they are used.

Signed-off-by: Tarun Pothulapati <tarunpothulapati@outlook.com>
2021-08-20 00:06:31 +05:30