Commit Graph

481 Commits

Author SHA1 Message Date
l5d-bot 022a1610c6
proxy: v2.246.0 (#12925)
* proxy: v2.246.0

Release notes: https://github.com/linkerd/linkerd2-proxy/releases/tag/release/v2.246.0

Signed-off-by: l5d-bot <l5d-bot@users.noreply.github.com>

* pin max k3s to known working version in integration tests

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

---------

Signed-off-by: l5d-bot <l5d-bot@users.noreply.github.com>
Signed-off-by: Alex Leong <alex@buoyant.io>
Co-authored-by: l5d-bot <l5d-bot@users.noreply.github.com>
Co-authored-by: Alex Leong <alex@buoyant.io>
2024-08-02 10:47:21 -07:00
Alejandro Pedraza b21686a9be
IPv6/dual-stack integration tests (#12575)
* IPv6 integration tests

This adds a new test `TestDualStack` to the deep suite that ensures requests to a dual stack service are always routed the the IPv6 endpoint.

It also amends other tests in the suite for them to work in IPv6-only clusters:

- skipports: replaced the booksapp with emojivoto, given the servers in the former don't bind to IPv6 addresses
- endpoints: amended the regexes to include IPv6 addresses
- localhost: bumped nginx for it to bind to the IPv6 loopback as well

Note the `TestDualStack` test is disabled by default because Github runners don't support IPv6. To run it locally, first deploy a dual-stack cluster via:

```
kind create cluster --config test/integration/deep/kind-dualstack.yml
```
(for testing IPv6-only clusters, use the `kind-ipv6.yml` config)

Then load the images and trigger the test with:

```
bin/tests --name deep-dual-stack --skip-cluster-create $PWD/target/cli/linux-amd64/linkerd
```
2024-05-28 16:00:26 -05:00
Kevin Ingelman c2a69b6021
Update to latest version of kube_codegen.sh (#12528)
We use the `kube_codegen.sh` script from the kubernetes/code-generator
repo to generate Go bindings for CRDs defined in this repo. The
arguments and flags for that script changed in Kubernetes 1.30, which
broke our usage of that script when this repo's Kubernetes dependencies
were updated in #12463.

In this change, I'm updating `bin/update-codegen.sh` to work with the
latest version of the `kube_codegen.sh` script.

To validate, check out this branch and run `bin/update-codegen.sh`. The
script should exit cleanly, and there should be no changes to the
previously-generated Go bindings.

Signed-off-by: Kevin Ingelman <ki@buoyant.io>
2024-04-30 14:14:50 -07:00
Alejandro Pedraza 1f9fa44e01
Add native sidecar deep integration test (#12452)
Added the test `deep-native-sidecar` which runs the `deep` test with the
new flag `--native-sidecar`.

Also replaced the final `WaitRollout` call in `install_test.go` with a
`linkerd check` call, to also allow us verifying that command is working
as intended.
2024-04-30 15:30:00 -05:00
Alejandro Pedraza e6a70713de
Remove `upgrade-stable` integration test, refactor `helm-upgrade` (#12519)
This removes the `upgrade-stable` integration test and refactors the
`helm-upgrade` one to upgrade from the last published edge helm charts
instead of the last stable.
2024-04-29 10:14:10 -05:00
Oliver Gould 006f0dd00e
ci: Update fetch-proxy to lookup versions by name (#12322)
We previously relied on knowing the tag structure, but this is brittle if we
change anything in the proxy repo. Instead, we now use the GitHub API to
list all releases, and we match the version by name.
2024-03-21 12:58:39 -07:00
Oliver Gould 6e4489d1c7
ci: Replace git-commit-proxy-version with sync-proxy (#12321)
In the sync-proxy workflow, we can use the github CLI directly to inspect the
API. This changes the commit message to include a link to the release notes
instead of replicating them in the commit message
2024-03-21 12:25:28 -07:00
Oliver Gould 209af88d7b
ci: Fix PAT configuration in sync-proxy (#12318)
The fetch-proxy script uses the GITHUB_TOKEN environment variable. This
fixes this and also improves error handling in fetch-proxy.
2024-03-21 11:22:47 -07:00
Oliver Gould f9aa700654
ci: Relax version validation in git-commit-proxy-version (#12315)
This version validation does nothing useful. The real test is whether the
named release exists.
2024-03-21 10:28:29 -07:00
Oliver Gould 7e4f29f18f
ci: Print verbose outputs in testing (#12314)
When tests hang in CI, we have no visibility into what's going on. This change
enables verbose testing so that we have more reasonable diagnostics.
2024-03-21 09:27:42 -07:00
Alejandro Pedraza c2eb296df3
Automate edge releases (#12175)
* Automate edge releases

Followup to #12132

Now one only needs to tag in order to trigger the release. Please see the updated `RELEASE.md` file for the new instructions.

The last action in the release workflow, `helm-publish`, now runs:

- `bin/helm-bump-edge`: This has been modified to calculate the new edge version by inspecting https://run.linkerd.io/install-edge and bumping the version found there, using a new scheme `YYYY.M.N` (also droppping the `-edge` suffix) shared across all the charts (except for `partials`, `patch` and `linkerd-multicluster-link` which remain static). The `version` entry in the Chart.yaml files no longer needs to be manually updated, and its value is not used for the new version computation, so it was changed to `0.0.0-undefined`. Also note this script validates that the current git tag matches the expected new version.
- `bin/helm-docs`: Called just to update the charts READMEs with the new version. We also still call it in the `helm.yml` workflow to check the values.yaml entries are in sync. So after any change to those values, we still need to manually run `bin/helm-docs`.
- `bin/helm-build package`: As the previous two steps mutate the local checked out source, this no longer validates that there are no uncommited changes.

---------

Co-authored-by: Oliver Gould <ver@buoyant.io>
2024-03-01 09:03:50 -05:00
Matei David 790ceccbb4
Simplify update-codegen script (#12165)
Whenever we make changes to CRDs we need to update our Go bindings. Part
of the process (i.e. generating informers, listers, clientsets) is
automated through a utility script provided by a Kubernetes upstream
library.

We have a wrapper (`bin/update-codegen`) around the script. The wrapper
will call into the generator by using a path relative to `$GOPATH`. When
unset, the script will fail. Some environments may have an unbound
GOPATH, we simplify our wrapper script by cloning the repo in the root
of the project instead of relying on GOPATH.

Signed-off-by: Matei David <matei@buoyant.io>
2024-02-28 11:18:42 +00:00
Oliver Gould e211db7a3c
build: Update fetch-proxy to support alternate repos (#12135)
* build: Update fetch-proxy to support alternate repos

In some build and test scenarios, it's desirable to fetch alternate proxy
releases during the build process.

This change updates the proxy container image build tooling to support the
LINKERD2_PROXY_REPO and LINKERD2_PROXY_GITHUB_TOKEN environment variables. These
may be set to the desired repository and a GitHub personal access token,
respectively.

When these are unset, the default behavior is unchanged.
2024-02-26 16:32:31 -05:00
Oliver Gould 02e982cc5d
ci: Update release workflow to generate release notes (#12132)
GitHub can automatically generate release notes from commit messages. This saves
us from having to manually update the `CHANGES.md` file every week.

In preparation for the next edge release, this change updates the release
workflow to stop relying on the CHANGES file. The CHANGES file is updated with a
pointer to the releases page.
2024-02-22 11:31:05 -08:00
Oliver Gould 387a9e4eeb
Update repo references in helm docs (#12120)
* Update repo references in helm docs

This change updates the helm chart READMEs to only reference the edge chart
repos.

* bump script dep
2024-02-22 09:44:31 -05:00
Matei David 98e38a66b6
Rename meshTls to meshTLS in ExternalWorkload CRD (#12098)
The ExternalWorkload resource we introduced has a minor naming
inconsistency; `Tls` in `meshTls` is not capitalised. Other resources
that we have (e.g. authentication resources) capitalise TLS (and so does
Go, it follows a similar naming convention).

We fix this in the workload resource by changing the field's name and
bumping the version to `v1beta1`.

Upgrading the control plane version will continue to work without
downtime. However, if an existing resource exists, the policy controller
will not completely initialise. It will not enter a crashloop backoff,
but it will also not become ready until the resource is edited or
deleted.

Signed-off-by: Matei David <matei@buoyant.io>
2024-02-20 11:00:13 -08:00
Oliver Gould 902504a0d1
ci: Update k8s version to 1.29 (#12097)
We aren't testing Kubernetes 1.29 yet, but we should be.
2024-02-16 10:28:36 -08:00
Matei David 9fbd3c0290
Introduce bindings for ExternalWorkload resources (#11888)
We introduced an ExternalWorkload CRD for mesh expansion. This change
follows up by adding bindings for Rust and Go code.

For Go code:
* We add a new schema and ExternalWorkload types
* We also update the code-gen script to generate informers
* We add a new informer type to our abstractions built on-top of
  client-go, including a function to check if a client has access to the
  resource.

For Rust code:
* We add ExternalWorkload bindings to the policy controller.

---------

Signed-off-by: Matei David <matei@buoyant.io>
2024-01-08 14:04:20 +00:00
Oliver Gould 4ce133b07d
dev: Add a helm-bump-edge script (#11844)
Updating chart versions during releases is tedious. This change adds a
bash script to bump chart versions automatically.
2024-01-04 10:33:13 +00:00
Alex Leong 0f5145118b
update codegen to use kube::codegen (#11722)
Recent versions of the code-generator package have replaced the `generate-groups.sh` script that we use to generate client-go bindings for custom resource types with a new script called `kube_codegen.sh`.  This PR updates our `update-codgen.sh` script to use `kube_codegen.sh` instead of `generate-groups.sh`.

Signed-off-by: Alex Leong <alex@buoyant.io>
2023-12-13 11:36:27 -08:00
Oliver Gould 5f100b3195
Bump min Kubernetes API to v1.22 (#11737)
New versions of the k8s-openapi crate drop support for Kubernetes 1.21.
Kubernetes v1.22 has been considered EOL by the upstream project since
2022-07-08. Major cloud providers have EOL'd it as well (GKE's current
MSKV is 1.24).

This change updates the MSKV to v1.22. It also updates the max version
in _test-helpers.sh to v1.28.
2023-12-11 12:15:56 -08:00
Oliver Gould cd5869463e
go: mod tidy (#11693)
It appears that 46ff4cb left the repo in an untidy state.

* go: mod tidy
* Remove CNI deps from install-deps
2023-12-05 11:55:18 +00:00
Alejandro Pedraza 26864c29cd
Reenable cni-calico-deep integration test (#11617)
* Reenable cni-calico-deep integration test

Fixes #11567

The trick is to run the test under k8s `v1.27.6-k3s1` as the following
versions break Calico in k3s (see k3d-io/k3d#1375).

Also removed the `continue-on-error: true` directive in the integration
workflow because it was hiding this problem.
2023-11-20 06:54:50 -05:00
Alejandro Pedraza 46ff4cbee2
Clean up ./cni-plugin directory (#11613)
* Clean up ./cni-plugin directory

Closes #11568

It's been a while since we moved the linkerd-cni plugin code, tests and
build scripts into the linkerd2-proxy-init repo. The cni-plugin
directory can be safely removed.
2023-11-20 06:53:43 -05:00
Andrew Seigner 80ce4e606a
Use GitHub Actions (`gha`) cache for Docker builds (#11605)
Docker introduced a `gha` cache type, removing the need to manage our
own Docker cache in CI.

Modify the `docker-build` action to set required `ACTIONS_CACHE_URL` and
`ACTIONS_RUNTIME_TOKEN` environment variables, consumed by
`docker buildx` commands. Additionally, removed `docker-cache-prune`
and `DOCKER_BUILDKIT_CACHE`.

Cached Docker build times reduced to 15s ~ 1m45s.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2023-11-14 18:40:16 +00:00
Eliza Weisman 82848e8519
ci: fix default Rust toolchain in `test-policy` (#11537)
PR #11528 changed the `rust-toolchain` file to use the TOML format
rather than the plaintext format. Unfortunately, this broke the
`test-policy` CI job, which `cat`s the contents of the `rust-toolchain`
file to determine which Rust version to install, and that file now no
longer exists (since it's now in `rust-toolchain.toml`). See:
https://github.com/linkerd/linkerd2/actions/runs/6649430068/job/18068192854?pr=11535

This branch fixes that by changing the CI job to use a regex to extract
the Rust toolchain version instead.
2023-10-27 16:03:39 +01:00
Alejandro Pedraza 0244282d96
Before building images, create `target` dir if necessary (#11433) 2023-09-27 17:47:11 -05:00
Oliver Gould d29efa29b1
dev: Move temporary docker-build metadata into target (#11427)
171985d updated the bin/docker-build script to output metadata files
into to root directory of the repo. This dirties the git status and is
generally inconcistent with the way our tooling works.

This change updates the location of the files to be under the
`./target/` directory, along with all of our other build outputs.
2023-09-26 15:26:56 -07:00
Kevin Ingelman b02a6a0d83
Add codegen for httproute v1beta3 (#11008)
Add go client codegen for HttpRoute v1beta3. This will be necessary for any of the go controllers (i.e. metrics-api) or go CLI commands to interact with HttpRoute v1beta3 resources in kubernetes.

Signed-off-by: Kevin Ingelman <ki@buoyant.io>
2023-06-14 15:01:56 -07:00
Mark Robinson 478da8b644
Add docker builder option to improve build tooling (#10935)
This adds the ability to pass in a docker builder option to docker. This makes building multi-arch images super simple by using our k8s infrastructure.

It also makes building multi-arch images very fast since they can be built in parallel and on native hardware.

DCO Sign off

I agree to the DCO for all the commits in this PR.

Co-authored-by: Alejandro Pedraza <alejandro.pedraza@gmail.com>
2023-06-12 11:57:09 -07:00
dependabot[bot] e5830ad05b
build(deps): bump linkerd/dev from 39 to 40 (#10825)
* build(deps): bump linkerd/dev from 39 to 40

Bumps [linkerd/dev](https://github.com/linkerd/dev) from 39 to 40.
- [Release notes](https://github.com/linkerd/dev/releases)
- [Commits](https://github.com/linkerd/dev/compare/v39...v40)

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Alex Leong <alex@buoyant.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alex Leong <alex@buoyant.io>
2023-05-09 10:57:19 -07:00
Alex Leong 342a096f2a
Enable smoke tests (#10766)
We have a number of tests in the `test/integration/install` directory which exercise basic functionality such as injecting pods and sending traffic.  These test are not currently run at all.

We update a number of tests which were previously just installing Linkerd to also run these basic tests.

Signed-off-by: Matei David <matei@buoyant.io>
Signed-off-by: Alex Leong <alex@buoyant.io>
Co-authored-by: Matei David <matei@buoyant.io>
2023-04-19 13:19:10 -07:00
Carlos Tadeu Panato Junior 171985daea
sign digest instead of tag (#10599)
Signed-off-by: cpanato <ctadeu@gmail.com>
2023-04-04 08:50:24 -05:00
Matei David 392f958ae7
Add support to cross-build policy controller (#10334)
The policy controller is currently built by cross-building, however, the
process is not very robust. In order to cross-build, we have to build
each image on the host platform (typically amd64), install a target
architecture compiler, and use a distroless runtime image tied to the
target arch. Furthermore, arm targets also have to compile using rustls
instead of openssl. The result is that we have three different
dockerfiles that build the image: each one specialized for a target
arch. At the end, the manifests are combined to provide a multi-arch
image.

By using a different base layer for the builder (dev container), we can
cross compile more efficiently. First, instead of dynamically linking
the TLS library, we statically link openssl. This is done by vendoring
the dependency and feature gating it (available as a default feature but
can be turned off to compile with rustls). This is all abstracted away
by using a `just` script present on the base image; the recipe sets up
the environment. Second, since all binaries are compiled using static
linking, we can use an architecture agnostic `scratch` runtime layer.

This greatly simplifies the process. We only need to maintain one docker
file. Details about the compilation (which compiler to use) are
abstracted away in the `just` file. The image includes dependencies to
build for all three target architectures supported by Linkerd: amd64,
arm and arm64 (clang, libssl). All targets are now using openssl.

Signed-off-by: Matei David <matei@buoyant.io>

Co-authored-by: Oliver Gould <ver@buoyant.io>
2023-02-20 11:22:08 +00:00
Oliver Gould 363e123d79
Update to dev:v39 with Go 1.19 (#10336) 2023-02-16 08:25:42 -08:00
Steve Jenson 44424466c1
linkerd-cni: add new release to the build (#10209)
wind the new linkerd-cni build through the build. refactor image, version, and pullPolicy into an Image object.

Signed-off-by: Steve Jenson <stevej@buoyant.io>
2023-02-08 13:54:35 -08:00
Alex Leong ae46678b0e
Run integration tests on k8s 1.26 (#10195)
Signed-off-by: Alex Leong <alex@buoyant.io>
2023-01-25 11:43:48 -08:00
dependabot[bot] 62d6d7cd52
build(deps): bump sigs.k8s.io/gateway-api from 0.5.1 to 0.6.0 (#10038)
* build(deps): bump sigs.k8s.io/gateway-api from 0.5.1 to 0.6.0

Bumps [sigs.k8s.io/gateway-api](https://github.com/kubernetes-sigs/gateway-api) from 0.5.1 to 0.6.0.
- [Release notes](https://github.com/kubernetes-sigs/gateway-api/releases)
- [Changelog](https://github.com/kubernetes-sigs/gateway-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kubernetes-sigs/gateway-api/compare/v0.5.1...v0.6.0)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/gateway-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Account for possible errors returned from `AddEventHandler`

In v0.26.0 client-go's `AddEventHandler` method for informers started
returning a registration handle (that we ignore) and an error that we
now surface up.

* client-go v0.26.0 removed the openstack plugin

* Temporary changes to trigger tests in k8s 1.21

- Adds an innocuous change to integration.yml so that all tests get
  triggered
- Hard-code k8s version in `k3d cluster create` invocation to v1.21

* Revert "Temporary changes to trigger tests in k8s 1.21"

This reverts commit 3e1fdd0e5e.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alejandro Pedraza <alejandro@buoyant.io>
2023-01-16 09:38:09 -05:00
Oliver Gould c415abd400
proxy: v2.189.0 (#10110)
* proxy: v2.189.0

This release updates the outbound proxy to use a queue for each load
balancer, instead of one for each router. This allows us to remove
unnecessary caching and buffering behavior in other places.

Routes are now lazily initialized so that service profile routes will
not show up in metrics until the route is used. Furthermore, a default
route is always available now (i.e. when no service profile exists for a
service).

Furthermore, the proxy's traffic splitting behavior has changed so that
only available concrete services (i.e. those not in failfast) are used.
This lets the proxy manage failover-like use cases without external
coordination.

This release also features an update to Tokio v1.24, which promises to
reduce CPU usage, especially for the proxy's pod-local communication.

---

* Allow Unicode-dfs-2016 for unicode-ident (linkerd/linkerd2-proxy#1973)
* build(deps): bump unicode-ident from 1.0.1 to 1.0.5 (linkerd/linkerd2-proxy#1964)
* build(deps): bump tj-actions/changed-files from 34.3.4 to 34.4.0 (linkerd/linkerd2-proxy#1986)
* build(deps): bump tower-layer from 0.3.1 to 0.3.2 (linkerd/linkerd2-proxy#1987)
* build(deps): bump thiserror from 1.0.34 to 1.0.37 (linkerd/linkerd2-proxy#1988)
* build(deps): bump itoa from 1.0.2 to 1.0.4 (linkerd/linkerd2-proxy#1989)
* build(deps): bump tokio from 1.21.0 to 1.21.2 (linkerd/linkerd2-proxy#1990)
* build(deps): bump regex from 1.6.0 to 1.7.0 (linkerd/linkerd2-proxy#1991)
* build(deps): bump tj-actions/changed-files from 34.4.0 to 34.4.2 (linkerd/linkerd2-proxy#1993)
* build(deps): bump cmake from 0.1.48 to 0.1.49 (linkerd/linkerd2-proxy#1994)
* build(deps): bump libc from 0.2.132 to 0.2.137 (linkerd/linkerd2-proxy#1995)
* build(deps): bump parking_lot_core from 0.9.3 to 0.9.4 (linkerd/linkerd2-proxy#1996)
* build(deps): bump hdrhistogram from 7.5.1 to 7.5.2 (linkerd/linkerd2-proxy#1999)
* build(deps): bump tracing-subscriber from 0.3.15 to 0.3.16 (linkerd/linkerd2-proxy#1998)
* build(deps): bump serde from 1.0.144 to 1.0.147 (linkerd/linkerd2-proxy#1997)
* build(deps): bump EmbarkStudios/cargo-deny-action from 1.3.2 to 1.4.0 (linkerd/linkerd2-proxy#2000)
* build(deps): bump tonic from 0.8.1 to 0.8.2 (linkerd/linkerd2-proxy#2002)
* build(deps): bump rand_core from 0.6.3 to 0.6.4 (linkerd/linkerd2-proxy#2003)
* build(deps): bump derive_arbitrary from 1.1.6 to 1.2.0 (linkerd/linkerd2-proxy#2004)
* build(deps): bump tj-actions/changed-files from 34.4.2 to 34.4.4 (linkerd/linkerd2-proxy#2005)
* build(deps): bump ppv-lite86 from 0.2.16 to 0.2.17 (linkerd/linkerd2-proxy#2006)
* build(deps): bump prost from 0.11.0 to 0.11.2 (linkerd/linkerd2-proxy#2007)
* build(deps): bump async-trait from 0.1.57 to 0.1.58 (linkerd/linkerd2-proxy#2008)
* build(deps): bump getrandom from 0.2.7 to 0.2.8 (linkerd/linkerd2-proxy#2009)
* build(deps): bump base64 from 0.13.0 to 0.13.1 (linkerd/linkerd2-proxy#2010)
* build(deps): bump anyhow from 1.0.65 to 1.0.66 (linkerd/linkerd2-proxy#2011)
* build(deps): bump tj-actions/changed-files from 34.4.4 to 34.5.0 (linkerd/linkerd2-proxy#2012)
* build(deps): bump clang-sys from 1.3.3 to 1.4.0 (linkerd/linkerd2-proxy#2013)
* build(deps): bump ipnet from 2.5.0 to 2.5.1 (linkerd/linkerd2-proxy#2015)
* build(deps): bump prost-types from 0.11.1 to 0.11.2 (linkerd/linkerd2-proxy#2014)
* meshtls-rustls: fix clippy `.ok().expect()` lints in tests (linkerd/linkerd2-proxy#2017)
* build(deps): bump tokio from 1.21.2 to 1.22.0 (linkerd/linkerd2-proxy#2020)
* build(deps): bump prost-build from 0.11.1 to 0.11.3 (linkerd/linkerd2-proxy#2018)
* build(deps): bump futures from 0.3.24 to 0.3.25 (linkerd/linkerd2-proxy#2019)
* build(deps): bump tokio-boring from 2.1.4 to 2.1.5 (linkerd/linkerd2-proxy#2024)
* build(deps): bump DavidAnson/markdownlint-cli2-action (linkerd/linkerd2-proxy#2022)
* build(deps): bump once_cell from 1.14.0 to 1.16.0 (linkerd/linkerd2-proxy#2023)
* build(deps): bump serde from 1.0.147 to 1.0.148 (linkerd/linkerd2-proxy#2025)
* build(deps): bump tracing from 0.1.36 to 0.1.37 (linkerd/linkerd2-proxy#2026)
* build(deps): bump bytes from 1.2.1 to 1.3.0 (linkerd/linkerd2-proxy#2027)
* build(deps): bump mio from 0.8.4 to 0.8.5 (linkerd/linkerd2-proxy#2028)
* build(deps): bump softprops/action-gh-release from 0.1.14 to 0.1.15 (linkerd/linkerd2-proxy#2030)
* build(deps): bump tonic-build from 0.8.2 to 0.8.4 (linkerd/linkerd2-proxy#2031)
* build(deps): bump parking_lot_core from 0.9.4 to 0.9.5 (linkerd/linkerd2-proxy#2032)
* build(deps): bump libloading from 0.7.3 to 0.7.4 (linkerd/linkerd2-proxy#2033)
* build(deps): bump boring from 2.0.0 to 2.1.0 (linkerd/linkerd2-proxy#2036)
* build(deps): bump async-trait from 0.1.58 to 0.1.59 (linkerd/linkerd2-proxy#2037)
* build(deps): bump libc from 0.2.137 to 0.2.138 (linkerd/linkerd2-proxy#2038)
* build(deps): bump tj-actions/changed-files from 34.5.0 to 34.5.1 (linkerd/linkerd2-proxy#2040)
* build(deps): bump indexmap from 1.9.1 to 1.9.2 (linkerd/linkerd2-proxy#2041)
* build(deps): bump aho-corasick from 0.7.19 to 0.7.20 (linkerd/linkerd2-proxy#2042)
* build(deps): bump jemalloc-sys (linkerd/linkerd2-proxy#2043)
* build(deps): bump boring-sys from 2.0.0 to 2.1.0 (linkerd/linkerd2-proxy#1948)
* just: Fix justfile command silencing (linkerd/linkerd2-proxy#2016)
* build(deps): bump regex-syntax from 0.6.27 to 0.6.28 (linkerd/linkerd2-proxy#2044)
* build(deps): bump data-encoding from 2.3.2 to 2.3.3 (linkerd/linkerd2-proxy#2046)
* build(deps): bump tokio-macros from 1.8.0 to 1.8.2 (linkerd/linkerd2-proxy#2047)
* build(deps): bump serde_json from 1.0.85 to 1.0.89 (linkerd/linkerd2-proxy#2045)
* build(deps): bump flate2 from 1.0.24 to 1.0.25 (linkerd/linkerd2-proxy#2051)
* build(deps): bump tonic from 0.8.2 to 0.8.3 (linkerd/linkerd2-proxy#2052)
* dev: v37 (linkerd/linkerd2-proxy#2048)
* build(deps): bump itertools from 0.10.3 to 0.10.5 (linkerd/linkerd2-proxy#2049)
* build(deps): bump syn from 1.0.103 to 1.0.105 (linkerd/linkerd2-proxy#2056)
* build(deps): bump prost from 0.11.2 to 0.11.3 (linkerd/linkerd2-proxy#2055)
* build(deps): bump serde from 1.0.148 to 1.0.149 (linkerd/linkerd2-proxy#2054)
* build(deps): bump cc from 1.0.73 to 1.0.77 (linkerd/linkerd2-proxy#2053)
* build(deps): bump linkerd/dev from 37 to 38 (linkerd/linkerd2-proxy#2058)
* build(deps): bump tj-actions/changed-files from 34.5.1 to 34.5.3 (linkerd/linkerd2-proxy#2059)
* build(deps): bump tokio from 1.22.0 to 1.23.0 (linkerd/linkerd2-proxy#2060)
* build(deps): bump derive_arbitrary from 1.2.0 to 1.2.1 (linkerd/linkerd2-proxy#2061)
* build(deps): bump serde from 1.0.149 to 1.0.150 (linkerd/linkerd2-proxy#2062)
* build(deps): bump prost-build from 0.11.3 to 0.11.4 (linkerd/linkerd2-proxy#2063)
* release: Produce static binaries (linkerd/linkerd2-proxy#2057)
* build(deps): bump ipnet from 2.5.1 to 2.7.0 (linkerd/linkerd2-proxy#2066)
* build(deps): bump tj-actions/changed-files from 34.5.3 to 34.6.1 (linkerd/linkerd2-proxy#2068)
* build(deps): bump cc from 1.0.77 to 1.0.78 (linkerd/linkerd2-proxy#2069)
* build(deps): bump actions/checkout from 3.1.0 to 3.2.0 (linkerd/linkerd2-proxy#2064)
* build(deps): bump unicode-ident from 1.0.5 to 1.0.6 (linkerd/linkerd2-proxy#2072)
* build(deps): bump ryu from 1.0.10 to 1.0.12 (linkerd/linkerd2-proxy#2073)
* build(deps): bump async-trait from 0.1.59 to 0.1.60 (linkerd/linkerd2-proxy#2074)
* build(deps): bump thiserror from 1.0.37 to 1.0.38 (linkerd/linkerd2-proxy#2075)
* build(deps): bump tj-actions/changed-files from 34.6.1 to 35.1.0 (linkerd/linkerd2-proxy#2077)
* build(deps): bump quote from 1.0.20 to 1.0.23 (linkerd/linkerd2-proxy#2081)
* build(deps): bump proc-macro2 from 1.0.47 to 1.0.49 (linkerd/linkerd2-proxy#2082)
* build(deps): bump num_cpus from 1.14.0 to 1.15.0 (linkerd/linkerd2-proxy#2083)
* build(deps): bump itoa from 1.0.4 to 1.0.5 (linkerd/linkerd2-proxy#2084)
* Introduce a 'distribute' stack module (linkerd/linkerd2-proxy#2085)
* outbound: Split the concrete and logical stack builders (linkerd/linkerd2-proxy#2092)
* config: Decouple HTTP and TCP buffering config (linkerd/linkerd2-proxy#2078)
* build(deps): bump syn from 1.0.105 to 1.0.107 (linkerd/linkerd2-proxy#2088)
* build(deps): bump anyhow from 1.0.66 to 1.0.68 (linkerd/linkerd2-proxy#2089)
* build(deps): bump prost from 0.11.3 to 0.11.5 (linkerd/linkerd2-proxy#2090)
* Propagate backpressure from buffers when in failfast (linkerd/linkerd2-proxy#2091)
* Split `outbound::tcp::logical::tests` into a file (linkerd/linkerd2-proxy#2096)
* build(deps): bump prost-types from 0.11.2 to 0.11.5 (linkerd/linkerd2-proxy#2099)
* build(deps): bump libc from 0.2.138 to 0.2.139 (linkerd/linkerd2-proxy#2098)
* build(deps): bump serde from 1.0.150 to 1.0.152 (linkerd/linkerd2-proxy#2097)
* stack: Add `SpawnWatch` middleware (linkerd/linkerd2-proxy#2101)
* build(deps): bump prost-build from 0.11.4 to 0.11.5 (linkerd/linkerd2-proxy#2087)
* build(deps): bump prettyplease from 0.1.21 to 0.1.22 (linkerd/linkerd2-proxy#2104)
* build(deps): bump once_cell from 1.16.0 to 1.17.0 (linkerd/linkerd2-proxy#2105)
* build(deps): bump serde_json from 1.0.89 to 1.0.91 (linkerd/linkerd2-proxy#2106)
* build(deps): bump DavidAnson/markdownlint-cli2-action (linkerd/linkerd2-proxy#2114)
* stack: add `Lazy` middleware (linkerd/linkerd2-proxy#2102)
* build(deps): bump derive_arbitrary from 1.2.1 to 1.2.2 (linkerd/linkerd2-proxy#2116)
* build(deps): bump arbitrary from 1.2.0 to 1.2.2 (linkerd/linkerd2-proxy#2117)
* Rename `linkerd-cache` to `linkerd-idle-cache` (linkerd/linkerd2-proxy#2118)
* Rename Stack::push_cache to push_idle_cache (linkerd/linkerd2-proxy#2119)
* Make all comment delimeters uniform (linkerd/linkerd2-proxy#2120)
* Make NameAddr cheaper to clone (linkerd/linkerd2-proxy#2121)
* build(deps): bump tokio from 1.23.0 to 1.23.1 (linkerd/linkerd2-proxy#2125)
* build(deps): bump tj-actions/changed-files from 35.1.0 to 35.3.1 (linkerd/linkerd2-proxy#2124)
* distribute: Add a backend cache (linkerd/linkerd2-proxy#2122)
* stack: Eliminate the `UpdateWatch` trait (linkerd/linkerd2-proxy#2123)
* Make `Profile::clone` cheaper (linkerd/linkerd2-proxy#2127)
* build(deps): bump actions/download-artifact from 3.0.1 to 3.0.2 (linkerd/linkerd2-proxy#2131)
* build(deps): bump tokio from 1.23.1 to 1.24.0 (linkerd/linkerd2-proxy#2132)
* build(deps): bump prettyplease from 0.1.22 to 0.1.23 (linkerd/linkerd2-proxy#2133)
* Support router-scoped caches (linkerd/linkerd2-proxy#2128)
* stack: Fix `NewSpawnWatch::layer` type signature (linkerd/linkerd2-proxy#2134)
* Implement `Hash` for configuration types (linkerd/linkerd2-proxy#2135)
* outbound: separate TCP logical and concrete stacks (linkerd/linkerd2-proxy#2136)
* build(deps): bump ipnet from 2.7.0 to 2.7.1 (linkerd/linkerd2-proxy#2141)
* build(deps): bump glob from 0.3.0 to 0.3.1 (linkerd/linkerd2-proxy#2140)
* build(deps): bump async-trait from 0.1.60 to 0.1.61 (linkerd/linkerd2-proxy#2138)
* build(deps): bump actions/upload-artifact from 3.1.1 to 3.1.2 (linkerd/linkerd2-proxy#2137)
* Update routers to support per-request backend distributions (linkerd/linkerd2-proxy#2095)
* Disable musl in release build (linkerd/linkerd2-proxy#2143)

* Fix proxy scripts for new artifact format
2023-01-10 10:25:22 -08:00
Alejandro Pedraza 72589f0e53
Reenable `helm-upgrade` integration test (#10047)
Supersedes #9856, now that the `linkerd check` logic in the integrations tests got cleaned up via #9989.

The helm-upgrade test had been commented-out when we jumped to the new 2.12 helm charts. It can be used again to test upgrades from 2.12.x.

- Some of the logic in `test/integration/install/install_test.go` still hadn't considered the need to upgrade both the `linkerd-crds` and `linkerd-control-plane` charts, so that got fixed.
- Removed references to the now-deprecated `linkerd2` chart.
- Improved the `helm_cleanup()` function by uninstalling the charts in reverse order (extensions first, core last). We delete the namespaces afterwards because helm sometimes doesn't remove them, and so we shouldn't fail if we attempt to delete one that is already gone. Also removed unneeded `kubectl wait`s because `kubect delete ns` should be blocking.
2023-01-10 09:33:11 -05:00
Oliver Gould 51d8b583f6
dev: Always rebuild the CLI in bin/linkerd (#9957)
`bin/linkerd` may use an outdated cached binary. There's no mechanism to
invalidate this cache except to manually delete the file. This is
cumbersome, and a common source of developer confusion.

This change removes this caching logic so that the binary is always
rebuilt. This is relatively quick (<2s) when nothing has changed.
2022-12-07 10:04:15 -08:00
Alejandro Pedraza 927cd9ec41
Use self-hosted runner for ARM64 integration tests (#9830)
* Use self-hosted runner for ARM64 integration tests

This refactors the "ARM64 integration tests" job in `relase.yaml` to 
use an ARM self-hosted runner tagged with `[self-hosted, Linux, ARM64]`,
tied to the linkerd github org.

We no longer use a local (linux/x86_64) linkerd CLI that connects to an
existing k3s instance in the host. Instead, we run the CLI ARM64 binary
in the host itself, after creating the cluster with k3d (which gets
always torn down at the end of the tests regardless of their success).

Please check the "ARM CI host at Equinix Metal" doc in Notion for the
host setup.

## Other Changes

- The cni test was removed.
- Replaced `"$bindir"/docker` with just `docker` in `bin/image-load` as
  we do elsewhere.
- Properly detect k3d arch in `bin/k3d`
2022-11-17 10:51:42 -05:00
Andrew Seigner 22ddb16215
Modify k8s client to use admissionregistration/v1 (#9401)
The controller's k8s client was using `admissionregistration/v1beta1`
for its MWC shared informer. `v1beta1` was removed in k8s 1.22, and `v1`
was introduced in k8s 1.16:
https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-22

Modify the controller's k8s client to use `admissionregistration/v1` for
its MWC shared informer.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2022-09-20 09:44:18 -07:00
Oliver Gould e1c4841779
dev: Move devcontainer tooling to dedicated repo (#9198)
https://github.com/linkerd/dev is a new repo that contains our
devcontainer tooling and includes git submodules for all repositories
that use this tooling (to ease validating dev changes).

This change removes the devcontainer (and devcontainer-specific tooling)
from the linkerd2 repo in favor of using this new repo.

Signed-off-by: Oliver Gould <ver@buoyant.io>
2022-08-24 11:01:49 -07:00
Alejandro Pedraza 80856f8d5e
Allow semver suffixes in tags (#9204)
Updated the regexes in bin/create-release-tag and bin/helm-build to
allow tagging releases with suffixes such as rc2.
2022-08-18 19:00:02 -07:00
Eliza Weisman f6c6ff965c
inject: fix --default-inbound-policy not setting annotation (#9197)
Depends on #9195

Currently, `linkerd inject --default-inbound-policy` does not set the
`config.linkerd.io/default-inbound-policy` annotation on the injected
resource(s).

The `inject` command does _try_ to set that annotation if it's set in
the `Values` generated by `proxyFlagSet`:
14d1dbb3b7/cli/cmd/inject.go (L485-L487)

...but, the flag in the proxy `FlagSet` doesn't set
`Values.Proxy.DefaultInboundPolicy`, it sets
`Values.PolicyController.DefaultAllowPolicy`:
7c5e3aaf40/cli/cmd/options.go (L375-L379)

This is because the flag set is shared across `linkerd inject` and
`linkerd install` subcommands, and in `linkerd install`, we want to set
the default policy for the whole cluster by configuring the policy
controller. In `linkerd inject`, though, we want to add the annotation
to the injected pods only.

This branch fixes this issue by changing the flag so that it sets the
`Values.Proxy.DefaultInboundPolicy` instead of the
`Values.PolicyController.DefaultAllowPolicy` value. In `linkerd
install`, we then set `Values.PolicyController.DefaultAllowPolicy` based
on the value of `Values.Proxy.DefaultInboundPolicy`, while in `inject`,
we will now actually add the annotation.

This branch is based on PR #9195, which adds validation to reject
invalid values for `--default-inbound-policy`, rather than on `main`.
This is because the validation code added in that PR had to be moved
around a bit, since it now needs to validate the
`Values.Proxy.DefaultInboundPolicy` value rather than the
`Values.PolicyController.DefaultAllowPolicy` value. I thought using
#9195 as a base branch was better than basing this on `main` and then
having to resolve merge conflicts later. When that PR merges, this can 
be rebased onto `main`.

Fixes #9168
2022-08-18 17:16:27 -07:00
Oliver Gould e1c9b9d58d
dev: Fixup action-dev-check (#9187)
Avoid checking directories that do not exist.

Signed-off-by: Oliver Gould <ver@buoyant.io>

Signed-off-by: Oliver Gould <ver@buoyant.io>
2022-08-16 19:57:03 -07:00
Oliver Gould 5fb9b702de
dev: Add a reusable action-dev-check script (#9185)
Each of our repos now has variations of a script to check that all
github workflows/actions use the same version of the devcontainer as
that specified in devcontainer.json. Some versions of this have had
small problems (mostly with regard to `yq` syntax).

This change extracts a reusable script, `bin/action-dev-check`, that is
now bundled in v28 of the devcontainer. This will enable other
repositories to use the same validation logic.

```
:; just action-dev-check
bin/action-dev-check
.github/workflows/actions.yml:16: Expected image 'ghcr.io/linkerd/dev:v28'; found 'ghcr.io/linkerd/dev:v27'
.github/workflows/actions.yml:24: Expected image 'ghcr.io/linkerd/dev:v28'; found 'ghcr.io/linkerd/dev:v27'
.github/workflows/go.yml:19: Expected image 'ghcr.io/linkerd/dev:v28'; found 'ghcr.io/linkerd/dev:v27'
.github/workflows/go.yml:27: Expected image 'ghcr.io/linkerd/dev:v28'; found 'ghcr.io/linkerd/dev:v27'
.github/workflows/go.yml:35: Expected image 'ghcr.io/linkerd/dev:v28'; found 'ghcr.io/linkerd/dev:v27'
.github/workflows/helm.yml:18: Expected image 'ghcr.io/linkerd/dev:v28'; found 'ghcr.io/linkerd/dev:v27'
.github/workflows/proto.yml:18: Expected image 'ghcr.io/linkerd/dev:v28'; found 'ghcr.io/linkerd/dev:v27'
.github/workflows/rust.yml:45: Expected image 'ghcr.io/linkerd/dev:v28'; found 'ghcr.io/linkerd/dev:v27'
.github/workflows/rust.yml:53: Expected image 'ghcr.io/linkerd/dev:v28'; found 'ghcr.io/linkerd/dev:v27'
.github/workflows/rust.yml:63: Expected image 'ghcr.io/linkerd/dev:v28'; found 'ghcr.io/linkerd/dev:v27'
.github/workflows/rust.yml:73: Expected image 'ghcr.io/linkerd/dev:v28'; found 'ghcr.io/linkerd/dev:v27'
.github/workflows/shell.yml:18: Expected image 'ghcr.io/linkerd/dev:v28'; found 'ghcr.io/linkerd/dev:v27'
```

Signed-off-by: Oliver Gould <ver@buoyant.io>

Signed-off-by: Oliver Gould <ver@buoyant.io>
2022-08-16 18:14:37 -07:00
Oliver Gould adecf632ca
dev: Add go-mod-* scripts to inspect the go module hierarchy (#9094)
It can be difficult to understand why a given module is a part of our Go
dependencies. This change adds utility scripts--inspired by Rust's
`cargo tree`--that use `go mod graph` to inspect Go dependencies.

* `go-mod-tree` -- like `cargo tree`, prints all dependencies from an
  optional root module.
* `go-mod-versions` -- enumerates all versions of a module in the Go
  dependency graph
* `go-mod-why` -- like `cargo tree -i`, prints the tree of modules that
  depend on a given module.

Signed-off-by: Oliver Gould <ver@buoyant.io>
2022-08-08 11:32:17 -07:00
Dani Baeyens 074f5e6cdf
Allows RSA signed trust anchors on linkerd cli (#7771) (#8868)
* Allows RSA signed trust anchors on linkerd cli (#7771)

Linkerd currently forces using an ECDSA P-256
issuer certificate along with a ECDSA trust
anchor. Still, it's still cryptographically valid
to have an ECDSA P-256 issuer certificate issued
by an RSA signed CA.

CheckCertAlgoRequirements checks if CA cert uses
ECDSA or RSA 2048/4096 signing algorithm.

Fixes #7771

Signed-off-by: Baeyens, Daniel <daniel.baeyens@gmail.com>
Co-authored-by: Alejandro Pedraza <alejandro@buoyant.io>
2022-08-08 08:04:24 -05:00