mirror of https://github.com/linkerd/linkerd2.git
Update to dev:v39 with Go 1.19 (#10336)
This commit is contained in:
parent
91db25cdb8
commit
363e123d79
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "linkerd2",
|
||||
"image": "ghcr.io/linkerd/dev:v32",
|
||||
"image": "ghcr.io/linkerd/dev:v39",
|
||||
// "dockerFile": "./Dockerfile",
|
||||
// "context": "..",
|
||||
"extensions": [
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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: |
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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/
|
||||
|
|
2
bin/fmt
2
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
|
||||
|
|
|
@ -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/
|
||||
|
|
|
@ -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/
|
||||
|
|
|
@ -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/
|
||||
|
|
|
@ -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"`
|
||||
|
|
2
go.mod
2
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
|
||||
|
|
|
@ -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/
|
||||
|
|
2
justfile
2
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...
|
||||
|
|
|
@ -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{
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
3
tools.go
3
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"
|
||||
)
|
||||
|
|
|
@ -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/
|
||||
|
|
|
@ -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"`
|
||||
}
|
||||
|
|
|
@ -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/
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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/
|
||||
|
|
Loading…
Reference in New Issue