diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5d1df7550..b64638fa5 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "linkerd2", - "image": "ghcr.io/linkerd/dev:v32", + "image": "ghcr.io/linkerd/dev:v39", // "dockerFile": "./Dockerfile", // "context": "..", "extensions": [ diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index a802843c8..24a499263 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -13,15 +13,14 @@ jobs: actionlint: runs-on: ubuntu-20.04 timeout-minutes: 10 - container: ghcr.io/linkerd/dev:v32-tools steps: + - uses: linkerd/dev/actions/setup-tools@v39 - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - name: Run actionlint - run: just action-lint + - run: just-dev lint-actions devcontainer-versions: runs-on: ubuntu-latest - container: ghcr.io/linkerd/dev:v32-tools steps: + - uses: linkerd/dev/actions/setup-tools@v39 - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - run: just action-dev-check + - run: just-dev check-action-images diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 68ccc22ee..1d7c255a6 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -14,7 +14,7 @@ jobs: timeout-minutes: 30 runs-on: ubuntu-20.04 container: - image: golang:1.18 + image: golang:1.19 steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - run: go install gotest.tools/gotestsum@v0.4.2 diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml index 411f369d5..9bd42e663 100644 --- a/.github/workflows/devcontainer.yml +++ b/.github/workflows/devcontainer.yml @@ -15,7 +15,7 @@ permissions: jobs: rust-version: runs-on: ubuntu-latest - container: ghcr.io/linkerd/dev:v32-rust + container: ghcr.io/linkerd/dev:v39-rust steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - run: | @@ -29,20 +29,6 @@ jobs: devcontainer-image: runs-on: ubuntu-latest steps: + - uses: linkerd/dev/actions/setup-tools@v39 - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - run: | - export DEBIAN_FRONTEND=noninteractive - sudo apt-get update - sudo apt-get -y --no-install-recommends install jq - - run: | - # Strip jsonc comments because `jq` doesn't support them. - image=$(sed -E '/^\s*\/\/.*/d' .devcontainer/devcontainer.json |jq -Mr .image) - line=$(grep -nF '"image"' .devcontainer/devcontainer.json |cut -d':' -f1 |head -n1) - if [ "$image" == "null" ]; then - echo "::error file=.devcontainer/devcontainer.json,line=$line::Missing image" - exit 1 - fi - if ! docker pull "$image" ; then - echo "::error file=.devcontainer/devcontainer.json,line=$line::Unable to pull image: $image" - exit 1 - fi + - run: just-dev pull-dev-image diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 224651e88..b5d3b8094 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -16,7 +16,7 @@ jobs: go-lint: timeout-minutes: 10 runs-on: ubuntu-20.04 - container: ghcr.io/linkerd/dev:v32-go + container: ghcr.io/linkerd/dev:v39-go steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - run: just go-lint --verbose --timeout=10m @@ -24,7 +24,7 @@ jobs: go-format: timeout-minutes: 10 runs-on: ubuntu-20.04 - container: ghcr.io/linkerd/dev:v32-go + container: ghcr.io/linkerd/dev:v39-go steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - run: just go-fmt @@ -32,7 +32,7 @@ jobs: go-test: timeout-minutes: 10 runs-on: ubuntu-20.04 - container: ghcr.io/linkerd/dev:v32-go + container: ghcr.io/linkerd/dev:v39-go steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - run: just go-fetch diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml index 910ef3263..d59cb2a7c 100644 --- a/.github/workflows/helm.yml +++ b/.github/workflows/helm.yml @@ -15,7 +15,8 @@ jobs: helm-docs-diff: runs-on: ubuntu-20.04 timeout-minutes: 5 - container: ghcr.io/linkerd/dev:v32-tools steps: - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - - run: bin/helm-docs-diff + - uses: linkerd/dev/actions/setup-tools@v39 + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - run: helm-docs + - run: git diff --exit-code -- charts/**/README.md diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 60a8e23d0..df6d858f7 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -124,7 +124,7 @@ jobs: steps: - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: '1.18' + go-version: '1.19' - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a with: @@ -264,7 +264,7 @@ jobs: steps: - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: '1.18' + go-version: '1.19' - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a with: @@ -307,7 +307,7 @@ jobs: steps: - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: '1.18' + go-version: '1.19' - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a with: @@ -358,7 +358,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: '1.18' + go-version: '1.19' - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a with: diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index 3fe65de02..3ac275a86 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -15,8 +15,9 @@ jobs: proto-diff: timeout-minutes: 10 runs-on: ubuntu-20.04 - container: ghcr.io/linkerd/dev:v32-go + container: ghcr.io/linkerd/dev:v39-go steps: + - run: apt update && apt install -y unzip - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - run: bin/protoc-diff diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 911ac0af3..bd34e2bfc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -146,7 +146,7 @@ jobs: uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: '1.18' + go-version: '1.19' - name: Download image archives uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a with: @@ -179,7 +179,7 @@ jobs: uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: '1.18' + go-version: '1.19' - name: Set environment variables from scripts run: | TAG='${{ needs.tag.outputs.tag }}' @@ -203,7 +203,7 @@ jobs: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 with: - go-version: '1.18' + go-version: '1.19' - uses: docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 - name: Pull linkerd binary run: | diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 82fafdb32..11cad3aaa 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -42,7 +42,7 @@ jobs: fmt: timeout-minutes: 5 runs-on: ubuntu-latest - container: ghcr.io/linkerd/dev:v32-rust + container: ghcr.io/linkerd/dev:v39-rust steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - run: just rs-check-fmt @@ -50,7 +50,7 @@ jobs: clippy: timeout-minutes: 10 runs-on: ubuntu-latest - container: ghcr.io/linkerd/dev:v32-rust + container: ghcr.io/linkerd/dev:v39-rust steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - run: just rs-fetch @@ -60,7 +60,7 @@ jobs: check: timeout-minutes: 20 runs-on: ubuntu-latest - container: ghcr.io/linkerd/dev:v32-rust + container: ghcr.io/linkerd/dev:v39-rust steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - run: just rs-fetch @@ -70,7 +70,7 @@ jobs: name: test runs-on: ubuntu-latest timeout-minutes: 15 - container: ghcr.io/linkerd/dev:v32-rust + container: ghcr.io/linkerd/dev:v39-rust steps: - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - run: just rs-fetch diff --git a/.github/workflows/shell.yml b/.github/workflows/shell.yml index c6bd83423..970d1f456 100644 --- a/.github/workflows/shell.yml +++ b/.github/workflows/shell.yml @@ -15,8 +15,8 @@ jobs: shellcheck: timeout-minutes: 10 runs-on: ubuntu-20.04 - container: ghcr.io/linkerd/dev:v32-tools steps: + - uses: linkerd/dev/actions/setup-tools@v39 - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - run: just sh-lint diff --git a/Dockerfile-proxy b/Dockerfile-proxy index f30436c2a..6437b7569 100644 --- a/Dockerfile-proxy +++ b/Dockerfile-proxy @@ -2,7 +2,7 @@ ARG RUNTIME_IMAGE=gcr.io/distroless/cc ARG BUILDPLATFORM=linux/amd64 # Precompile key slow-to-build dependencies -FROM --platform=$BUILDPLATFORM golang:1.18-alpine as go-deps +FROM --platform=$BUILDPLATFORM golang:1.19-alpine as go-deps WORKDIR /linkerd-build COPY go.mod go.sum ./ COPY bin/install-deps bin/ diff --git a/bin/fmt b/bin/fmt index e2dbd04d3..6428e8013 100755 --- a/bin/fmt +++ b/bin/fmt @@ -8,7 +8,7 @@ while IFS= read -r line; do dirs+=("$line"); done <<< "$(go list -f \{\{.Dir\}\} # results in certain files being reported multiple time. Therefore, we must # dedup them. We also ignore protobuf auto-generated code. files=() -while IFS= read -r line; do files+=("$line"); done <<< "$(bin/goimports -l "${dirs[@]}" | sort -u | grep -v pb.go | grep -v gogen.go )" +while IFS= read -r line; do files+=("$line"); done <<< "$(bin/goimports -l "${dirs[@]}" | sort -u | grep -v pb.go | grep -v gogen.go | grep -v /controller/gen )" if [[ ${files[*]} ]]; then for file in "${files[@]}"; do diff --git a/cli/Dockerfile b/cli/Dockerfile index d1cec751e..57141faf7 100644 --- a/cli/Dockerfile +++ b/cli/Dockerfile @@ -1,7 +1,7 @@ ARG BUILDPLATFORM=linux/amd64 # Precompile key slow-to-build dependencies -FROM --platform=$BUILDPLATFORM golang:1.18-alpine as go-deps +FROM --platform=$BUILDPLATFORM golang:1.19-alpine as go-deps WORKDIR /linkerd-build COPY go.mod go.sum ./ COPY bin/install-deps bin/ diff --git a/cni-plugin/Dockerfile b/cni-plugin/Dockerfile index 0dad47442..b2ca49b0d 100644 --- a/cni-plugin/Dockerfile +++ b/cni-plugin/Dockerfile @@ -1,7 +1,7 @@ ARG BUILDPLATFORM=linux/amd64 # Precompile key slow-to-build dependencies -FROM --platform=$BUILDPLATFORM golang:1.18-alpine as go-deps +FROM --platform=$BUILDPLATFORM golang:1.19-alpine as go-deps WORKDIR /linkerd-build COPY go.mod go.sum ./ COPY bin/install-deps bin/ diff --git a/controller/Dockerfile b/controller/Dockerfile index 8580208dc..488edeed3 100644 --- a/controller/Dockerfile +++ b/controller/Dockerfile @@ -1,7 +1,7 @@ ARG BUILDPLATFORM=linux/amd64 # Precompile key slow-to-build dependencies -FROM --platform=$BUILDPLATFORM golang:1.18-alpine as go-deps +FROM --platform=$BUILDPLATFORM golang:1.19-alpine as go-deps WORKDIR /linkerd-build COPY go.mod go.sum ./ COPY bin/install-deps bin/ diff --git a/controller/gen/common/net/net.pb.go b/controller/gen/common/net/net.pb.go index 15847a979..25e2a0c5a 100644 --- a/controller/gen/common/net/net.pb.go +++ b/controller/gen/common/net/net.pb.go @@ -26,6 +26,7 @@ type IPAddress struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Ip: + // // *IPAddress_Ipv4 // *IPAddress_Ipv6 Ip isIPAddress_Ip `protobuf_oneof:"ip"` diff --git a/go.mod b/go.mod index bb80a3ae1..d6380ff17 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/linkerd/linkerd2 -go 1.18 +go 1.19 require ( contrib.go.opencensus.io/exporter/ocagent v0.7.0 diff --git a/jaeger/injector/Dockerfile b/jaeger/injector/Dockerfile index 0bb471b38..3de3f0547 100644 --- a/jaeger/injector/Dockerfile +++ b/jaeger/injector/Dockerfile @@ -1,7 +1,7 @@ ARG BUILDPLATFORM=linux/amd64 # Precompile key slow-to-build dependencies -FROM --platform=$BUILDPLATFORM golang:1.18-alpine as go-deps +FROM --platform=$BUILDPLATFORM golang:1.19-alpine as go-deps WORKDIR /linkerd-build COPY go.mod go.sum ./ COPY bin/install-deps bin/ diff --git a/justfile b/justfile index c9bddd57e..0fefc8de2 100644 --- a/justfile +++ b/justfile @@ -547,7 +547,7 @@ action-lint: # Ensure all devcontainer versions are in sync action-dev-check: - action-dev-check + just-dev check-action-images ## ## Other tools... diff --git a/test/integration/deep/opaqueports/assertions.go b/test/integration/deep/opaqueports/assertions.go index 86e8b5efb..9eaf7093c 100644 --- a/test/integration/deep/opaqueports/assertions.go +++ b/test/integration/deep/opaqueports/assertions.go @@ -29,14 +29,15 @@ func hasNoOutboundHTTPRequest(metrics, ns string) error { } // hasOutboundHTTPRequestWithTLS checks there is a series matching: -// request_total{ -// direction="outbound", -// target_addr=~"[0-9\.]+:[0-9]+", -// target_ip=~"[0-9.]+", -// tls="true", -// dst_namespace="default.${ns}.serviceaccount.identity.linkerd.cluster.local", -// dst_serviceaccount="default" -// } +// +// request_total{ +// direction="outbound", +// target_addr=~"[0-9\.]+:[0-9]+", +// target_ip=~"[0-9.]+", +// tls="true", +// dst_namespace="default.${ns}.serviceaccount.identity.linkerd.cluster.local", +// dst_serviceaccount="default" +// } func hasOutboundHTTPRequestWithTLS(metrics, ns string) error { m := prommatch.NewMatcher("request_total", prommatch.Labels{ @@ -59,15 +60,16 @@ func hasOutboundHTTPRequestWithTLS(metrics, ns string) error { } // hasOutboundHTTPRequestNoTLS checks there is a series matching: -// request_total{ -// direction="outbound", -// target_addr=~"[0-9\.]+:[0-9]+", -// target_ip=~"[0-9.]+", -// tls="no_identity", -// no_tls_reason="not_provided_by_service_discovery", -// dst_namespace="default.${ns}.serviceaccount.identity.linkerd.cluster.local", -// dst_serviceaccount="default" -// } +// +// request_total{ +// direction="outbound", +// target_addr=~"[0-9\.]+:[0-9]+", +// target_ip=~"[0-9.]+", +// tls="no_identity", +// no_tls_reason="not_provided_by_service_discovery", +// dst_namespace="default.${ns}.serviceaccount.identity.linkerd.cluster.local", +// dst_serviceaccount="default" +// } func hasOutboundHTTPRequestNoTLS(metrics, ns string) error { m := prommatch.NewMatcher("request_total", prommatch.Labels{ @@ -90,16 +92,17 @@ func hasOutboundHTTPRequestNoTLS(metrics, ns string) error { } // hasInboundTCPTrafficWithTLS checks there is a series matching: -// tcp_open_total{ -// direction="inbound", -// peer="src", -// tls="true", -// client_id="default.${ns}.serviceaccount.identity.linkerd.cluster.local", -// srv_kind="default", -// srv_name="all-unauthenticated", -// target_addr=~"[0-9\.]+:[0-9]+", -// target_ip=~"[0-9\.]+" -// } +// +// tcp_open_total{ +// direction="inbound", +// peer="src", +// tls="true", +// client_id="default.${ns}.serviceaccount.identity.linkerd.cluster.local", +// srv_kind="default", +// srv_name="all-unauthenticated", +// target_addr=~"[0-9\.]+:[0-9]+", +// target_ip=~"[0-9\.]+" +// } func hasInboundTCPTrafficWithTLS(metrics, ns string) error { m := prommatch.NewMatcher( "tcp_open_total", @@ -125,13 +128,14 @@ func hasInboundTCPTrafficWithTLS(metrics, ns string) error { } // hasOutboundTCPWithAuthorityAndNoTLS checks there is a series matching: -// tcp_open_total{ -// direction="outbound", -// peer="dst", -// tls="no_identity", -// no_tls_reason="not_provided_by_service_discovery", -// authority=~"[a-zA-Z\-]+\.[a-zA-Z\-]+\.svc\.cluster\.local:[0-9]+" -// } +// +// tcp_open_total{ +// direction="outbound", +// peer="dst", +// tls="no_identity", +// no_tls_reason="not_provided_by_service_discovery", +// authority=~"[a-zA-Z\-]+\.[a-zA-Z\-]+\.svc\.cluster\.local:[0-9]+" +// } func hasOutboundTCPWithAuthorityAndNoTLS(metrics, ns string) error { m := prommatch.NewMatcher("tcp_open_total", prommatch.Labels{ @@ -153,13 +157,14 @@ func hasOutboundTCPWithAuthorityAndNoTLS(metrics, ns string) error { } // hasOutboundTCPWithNoTLSAndNoAuthority checks there is a series matching: -// tcp_open_total{ -// direction="outbound", -// peer="dst", -// tls="no_identity", -// no_tls_reason="not_provided_by_service_discovery", -// authority="" -// } +// +// tcp_open_total{ +// direction="outbound", +// peer="dst", +// tls="no_identity", +// no_tls_reason="not_provided_by_service_discovery", +// authority="" +// } func hasOutboundTCPWithNoTLSAndNoAuthority(metrics, ns string) error { m := prommatch.NewMatcher("tcp_open_total", prommatch.Labels{ @@ -180,13 +185,14 @@ func hasOutboundTCPWithNoTLSAndNoAuthority(metrics, ns string) error { } // hasOutboundTCPWithTLSAndAuthority checks there is a series matching: -// tcp_open_total{ -// direction="outbound", -// peer="dst", -// tls="true", -// target_addr=~"[0-9\.]+:[0-9]+", -// authority=~"[a-zA-Z\-]+\.[a-zA-Z\-]+\.svc\.cluster\.local:[0-9]+" -// } +// +// tcp_open_total{ +// direction="outbound", +// peer="dst", +// tls="true", +// target_addr=~"[0-9\.]+:[0-9]+", +// authority=~"[a-zA-Z\-]+\.[a-zA-Z\-]+\.svc\.cluster\.local:[0-9]+" +// } func hasOutboundTCPWithTLSAndAuthority(metrics, ns string) error { m := prommatch.NewMatcher("tcp_open_total", prommatch.Labels{ @@ -208,13 +214,14 @@ func hasOutboundTCPWithTLSAndAuthority(metrics, ns string) error { } // hasOutboundTCPWithTLSAndNoAuthority checks there is a series matching: -// tcp_open_total{ -// direction="outbound", -// peer="dst", -// tls="true", -// target_addr=~"[0-9\.]+:[0-9]+", -// authority="" -// } +// +// tcp_open_total{ +// direction="outbound", +// peer="dst", +// tls="true", +// target_addr=~"[0-9\.]+:[0-9]+", +// authority="" +// } func hasOutboundTCPWithTLSAndNoAuthority(metrics, ns string) error { m := prommatch.NewMatcher("tcp_open_total", prommatch.Labels{ diff --git a/test/integration/upgrade-edge/upgrade_edge_test.go b/test/integration/upgrade-edge/upgrade_edge_test.go index a91e42d58..ec300d43e 100644 --- a/test/integration/upgrade-edge/upgrade_edge_test.go +++ b/test/integration/upgrade-edge/upgrade_edge_test.go @@ -16,9 +16,6 @@ import ( "github.com/linkerd/linkerd2/testutil" ) -////////////////////// -/// TEST SETUP /// -////////////////////// var ( TestHelper *testutil.TestHelper @@ -44,9 +41,6 @@ func TestMain(m *testing.M) { os.Exit(m.Run()) } -////////////////////// -/// TEST EXECUTION /// -////////////////////// func TestInstallResourcesPreUpgrade(t *testing.T) { versions, err := TestHelper.GetReleaseChannelVersions() if err != nil { diff --git a/test/integration/upgrade-stable/upgrade_stable_test.go b/test/integration/upgrade-stable/upgrade_stable_test.go index 446647f46..923547c75 100644 --- a/test/integration/upgrade-stable/upgrade_stable_test.go +++ b/test/integration/upgrade-stable/upgrade_stable_test.go @@ -16,9 +16,6 @@ import ( "github.com/linkerd/linkerd2/testutil" ) -////////////////////// -/// TEST SETUP /// -////////////////////// var ( TestHelper *testutil.TestHelper @@ -44,9 +41,6 @@ func TestMain(m *testing.M) { os.Exit(m.Run()) } -////////////////////// -/// TEST EXECUTION /// -////////////////////// func TestInstallResourcesPreUpgrade(t *testing.T) { versions, err := TestHelper.GetReleaseChannelVersions() if err != nil { diff --git a/testutil/doc.go b/testutil/doc.go index cf6362033..7b4ca391d 100644 --- a/testutil/doc.go +++ b/testutil/doc.go @@ -1,5 +1,4 @@ /* - Package testutil provides helpers for running the linkerd integration tests. All helpers are defined as functions on the TestHelper struct, which you should @@ -44,6 +43,5 @@ the tests aren't inadvertently executed when unit tests for the project are run. TestHelper embeds KubernetesHelper, so all functions defined on KubernetesHelper are also available to instances of TestHelper. See the individual function definitions for details on how to use each helper in tests. - */ package testutil diff --git a/tools.go b/tools.go index 5dc96771e..1558379a1 100644 --- a/tools.go +++ b/tools.go @@ -1,3 +1,4 @@ +//go:build tools // +build tools package tools @@ -5,6 +6,6 @@ package tools import ( _ "github.com/shurcooL/vfsgen" _ "golang.org/x/tools/cmd/goimports" - _ "k8s.io/code-generator" _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc" + _ "k8s.io/code-generator" ) diff --git a/viz/metrics-api/Dockerfile b/viz/metrics-api/Dockerfile index b094d1637..3f79cd86c 100644 --- a/viz/metrics-api/Dockerfile +++ b/viz/metrics-api/Dockerfile @@ -1,7 +1,7 @@ ARG BUILDPLATFORM=linux/amd64 # Precompile key slow-to-build dependencies -FROM --platform=$BUILDPLATFORM golang:1.18-alpine as go-deps +FROM --platform=$BUILDPLATFORM golang:1.19-alpine as go-deps WORKDIR /linkerd-build COPY go.mod go.sum ./ COPY bin/install-deps bin/ diff --git a/viz/metrics-api/gen/viz/viz.pb.go b/viz/metrics-api/gen/viz/viz.pb.go index bfd0f4409..df2831b39 100644 --- a/viz/metrics-api/gen/viz/viz.pb.go +++ b/viz/metrics-api/gen/viz/viz.pb.go @@ -628,6 +628,7 @@ type Pod struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` PodIP string `protobuf:"bytes,2,opt,name=podIP,proto3" json:"podIP,omitempty"` // Types that are assignable to Owner: + // // *Pod_Deployment // *Pod_ReplicaSet // *Pod_ReplicationController @@ -850,6 +851,7 @@ type HttpMethod struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Type: + // // *HttpMethod_Registered_ // *HttpMethod_Unregistered Type isHttpMethod_Type `protobuf_oneof:"type"` @@ -930,6 +932,7 @@ type Scheme struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Type: + // // *Scheme_Registered_ // *Scheme_Unregistered Type isScheme_Type `protobuf_oneof:"type"` @@ -1057,6 +1060,7 @@ type Eos struct { unknownFields protoimpl.UnknownFields // Types that are assignable to End: + // // *Eos_GrpcStatusCode // *Eos_ResetErrorCode End isEos_End `protobuf_oneof:"end"` @@ -1422,6 +1426,7 @@ type StatSummaryRequest struct { Selector *ResourceSelection `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` TimeWindow string `protobuf:"bytes,2,opt,name=time_window,json=timeWindow,proto3" json:"time_window,omitempty"` // Types that are assignable to Outbound: + // // *StatSummaryRequest_None // *StatSummaryRequest_ToResource // *StatSummaryRequest_FromResource @@ -1546,6 +1551,7 @@ type StatSummaryResponse struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Response: + // // *StatSummaryResponse_Ok_ // *StatSummaryResponse_Error Response isStatSummaryResponse_Response `protobuf_oneof:"response"` @@ -1681,6 +1687,7 @@ type AuthzResponse struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Response: + // // *AuthzResponse_Ok_ // *AuthzResponse_Error Response isAuthzResponse_Response `protobuf_oneof:"response"` @@ -2064,6 +2071,7 @@ type StatTable struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Table: + // // *StatTable_PodGroup_ Table isStatTable_Table `protobuf_oneof:"table"` } @@ -2177,6 +2185,7 @@ type EdgesResponse struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Response: + // // *EdgesResponse_Ok_ // *EdgesResponse_Error Response isEdgesResponse_Response `protobuf_oneof:"response"` @@ -2338,6 +2347,7 @@ type TopRoutesRequest struct { Selector *ResourceSelection `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` TimeWindow string `protobuf:"bytes,2,opt,name=time_window,json=timeWindow,proto3" json:"time_window,omitempty"` // Types that are assignable to Outbound: + // // *TopRoutesRequest_None // *TopRoutesRequest_ToResource Outbound isTopRoutesRequest_Outbound `protobuf_oneof:"outbound"` @@ -2432,6 +2442,7 @@ type TopRoutesResponse struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Response: + // // *TopRoutesResponse_Error // *TopRoutesResponse_Ok_ Response isTopRoutesResponse_Response `protobuf_oneof:"response"` @@ -2677,6 +2688,7 @@ type GatewaysResponse struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Response: + // // *GatewaysResponse_Ok_ // *GatewaysResponse_Error Response isGatewaysResponse_Response `protobuf_oneof:"response"` @@ -2763,6 +2775,7 @@ type Headers_Header struct { // assumed and `value_bin` will be set. // // Types that are assignable to Value: + // // *Headers_Header_ValueStr // *Headers_Header_ValueBin Value isHeaders_Header_Value `protobuf_oneof:"value"` @@ -2850,6 +2863,7 @@ type PodErrors_PodError struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Error: + // // *PodErrors_PodError_Container Error isPodErrors_PodError_Error `protobuf_oneof:"error"` } diff --git a/viz/tap/Dockerfile b/viz/tap/Dockerfile index 1dab962c4..c21f99c97 100644 --- a/viz/tap/Dockerfile +++ b/viz/tap/Dockerfile @@ -1,7 +1,7 @@ ARG BUILDPLATFORM=linux/amd64 # Precompile key slow-to-build dependencies -FROM --platform=$BUILDPLATFORM golang:1.18-alpine as go-deps +FROM --platform=$BUILDPLATFORM golang:1.19-alpine as go-deps WORKDIR /linkerd-build COPY go.mod go.sum ./ COPY bin/install-deps bin/ diff --git a/viz/tap/api/grpc_server.go b/viz/tap/api/grpc_server.go index ba202048b..89d40771f 100644 --- a/viz/tap/api/grpc_server.go +++ b/viz/tap/api/grpc_server.go @@ -54,6 +54,7 @@ var ( // Tap is deprecated, use TapByResource. // This API endpoint is marked as deprecated but it's still used. +// //nolint:staticcheck func (s *GRPCTapServer) Tap(req *tapPb.TapRequest, stream tapPb.Tap_TapServer) error { return status.Error(codes.Unimplemented, "Tap is deprecated, use TapByResource") diff --git a/viz/tap/gen/tap/viz_tap.pb.go b/viz/tap/gen/tap/viz_tap.pb.go index 54995dae8..cf79eb252 100644 --- a/viz/tap/gen/tap/viz_tap.pb.go +++ b/viz/tap/gen/tap/viz_tap.pb.go @@ -79,6 +79,7 @@ type TapRequest struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Target: + // // *TapRequest_Pod // *TapRequest_Deployment Target isTapRequest_Target `protobuf_oneof:"target"` @@ -318,6 +319,7 @@ type TapEvent struct { RouteMeta *TapEvent_RouteMeta `protobuf:"bytes,7,opt,name=route_meta,json=routeMeta,proto3" json:"route_meta,omitempty"` ProxyDirection TapEvent_ProxyDirection `protobuf:"varint,6,opt,name=proxy_direction,json=proxyDirection,proto3,enum=linkerd2.tap.TapEvent_ProxyDirection" json:"proxy_direction,omitempty"` // Types that are assignable to Event: + // // *TapEvent_Http_ Event isTapEvent_Event `protobuf_oneof:"event"` } @@ -426,6 +428,7 @@ type TapByResourceRequest_Match struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Match: + // // *TapByResourceRequest_Match_All // *TapByResourceRequest_Match_Any // *TapByResourceRequest_Match_Not @@ -553,6 +556,7 @@ type TapByResourceRequest_Extract struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Extract: + // // *TapByResourceRequest_Extract_Http_ Extract isTapByResourceRequest_Extract_Extract `protobuf_oneof:"extract"` } @@ -666,6 +670,7 @@ type TapByResourceRequest_Match_Http struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Match: + // // *TapByResourceRequest_Match_Http_Scheme // *TapByResourceRequest_Match_Http_Method // *TapByResourceRequest_Match_Http_Authority @@ -774,6 +779,7 @@ type TapByResourceRequest_Extract_Http struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Extract: + // // *TapByResourceRequest_Extract_Http_Headers_ Extract isTapByResourceRequest_Extract_Http_Extract `protobuf_oneof:"extract"` } @@ -972,6 +978,7 @@ type TapEvent_Http struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Event: + // // *TapEvent_Http_RequestInit_ // *TapEvent_Http_ResponseInit_ // *TapEvent_Http_ResponseEnd_ diff --git a/web/Dockerfile b/web/Dockerfile index f59846c77..44aa82c7d 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -1,7 +1,7 @@ ARG BUILDPLATFORM=linux/amd64 # Precompile key slow-to-build dependencies -FROM --platform=$BUILDPLATFORM golang:1.18-alpine as go-deps +FROM --platform=$BUILDPLATFORM golang:1.19-alpine as go-deps WORKDIR /linkerd-build COPY go.mod go.sum ./ COPY bin/install-deps bin/