mirror of https://github.com/linkerd/linkerd2.git
				
				
				
			Update to Rust 1.63 (#9196)
Also, restore the go-lint timeout (10m) Signed-off-by: Oliver Gould <ver@buoyant.io>
This commit is contained in:
		
							parent
							
								
									fdf1f9c404
								
							
						
					
					
						commit
						695f843914
					
				| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
ARG GO_VERSION=1.18.5
 | 
					ARG GO_VERSION=1.18.5
 | 
				
			||||||
ARG RUST_TOOLCHAIN=1.62.1
 | 
					ARG RUST_TOOLCHAIN=1.63.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
##
 | 
					##
 | 
				
			||||||
## Base
 | 
					## Base
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    "name": "linkerd2",
 | 
					    "name": "linkerd2",
 | 
				
			||||||
    "image": "ghcr.io/linkerd/dev:v28",
 | 
					    "image": "ghcr.io/linkerd/dev:v29",
 | 
				
			||||||
    // "dockerFile": "./Dockerfile",
 | 
					    // "dockerFile": "./Dockerfile",
 | 
				
			||||||
    // "context": "..",
 | 
					    // "context": "..",
 | 
				
			||||||
    "extensions": [
 | 
					    "extensions": [
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,7 +13,7 @@ jobs:
 | 
				
			||||||
  actionlint:
 | 
					  actionlint:
 | 
				
			||||||
    runs-on: ubuntu-20.04
 | 
					    runs-on: ubuntu-20.04
 | 
				
			||||||
    timeout-minutes: 10
 | 
					    timeout-minutes: 10
 | 
				
			||||||
    container: ghcr.io/linkerd/dev:v28-tools
 | 
					    container: ghcr.io/linkerd/dev:v29-tools
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
					      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
				
			||||||
      - name: Run actionlint
 | 
					      - name: Run actionlint
 | 
				
			||||||
| 
						 | 
					@ -21,7 +21,7 @@ jobs:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  devcontainer-versions:
 | 
					  devcontainer-versions:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    container: ghcr.io/linkerd/dev:v28-tools
 | 
					    container: ghcr.io/linkerd/dev:v29-tools
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
					      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
				
			||||||
      - run: just action-dev-check
 | 
					      - run: just action-dev-check
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -50,7 +50,7 @@ jobs:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    timeout-minutes: 15
 | 
					    timeout-minutes: 15
 | 
				
			||||||
    container:
 | 
					    container:
 | 
				
			||||||
      image: docker://rust:1.62.1
 | 
					      image: docker://rust:1.63.0
 | 
				
			||||||
      options: --security-opt seccomp=unconfined
 | 
					      options: --security-opt seccomp=unconfined
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
					      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,15 +16,15 @@ jobs:
 | 
				
			||||||
  go-lint:
 | 
					  go-lint:
 | 
				
			||||||
    timeout-minutes: 10
 | 
					    timeout-minutes: 10
 | 
				
			||||||
    runs-on: ubuntu-20.04
 | 
					    runs-on: ubuntu-20.04
 | 
				
			||||||
    container: ghcr.io/linkerd/dev:v28-go
 | 
					    container: ghcr.io/linkerd/dev:v29-go
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
					      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
				
			||||||
      - run: just go-lint --verbose
 | 
					      - run: just go-lint --verbose --timeout=10m
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  go-format:
 | 
					  go-format:
 | 
				
			||||||
    timeout-minutes: 10
 | 
					    timeout-minutes: 10
 | 
				
			||||||
    runs-on: ubuntu-20.04
 | 
					    runs-on: ubuntu-20.04
 | 
				
			||||||
    container: ghcr.io/linkerd/dev:v28-go
 | 
					    container: ghcr.io/linkerd/dev:v29-go
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
					      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
				
			||||||
      - run: just go-fmt
 | 
					      - run: just go-fmt
 | 
				
			||||||
| 
						 | 
					@ -32,7 +32,7 @@ jobs:
 | 
				
			||||||
  go-test:
 | 
					  go-test:
 | 
				
			||||||
    timeout-minutes: 10
 | 
					    timeout-minutes: 10
 | 
				
			||||||
    runs-on: ubuntu-20.04
 | 
					    runs-on: ubuntu-20.04
 | 
				
			||||||
    container: ghcr.io/linkerd/dev:v28-go
 | 
					    container: ghcr.io/linkerd/dev:v29-go
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
					      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
				
			||||||
      - run: just go-fetch
 | 
					      - run: just go-fetch
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -15,7 +15,7 @@ jobs:
 | 
				
			||||||
  helm-docs-diff:
 | 
					  helm-docs-diff:
 | 
				
			||||||
    runs-on: ubuntu-20.04
 | 
					    runs-on: ubuntu-20.04
 | 
				
			||||||
    timeout-minutes: 5
 | 
					    timeout-minutes: 5
 | 
				
			||||||
    container: ghcr.io/linkerd/dev:v28-tools
 | 
					    container: ghcr.io/linkerd/dev:v29-tools
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
					    - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
				
			||||||
    - run: bin/helm-docs-diff
 | 
					    - run: bin/helm-docs-diff
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -15,7 +15,7 @@ jobs:
 | 
				
			||||||
  proto-diff:
 | 
					  proto-diff:
 | 
				
			||||||
    timeout-minutes: 10
 | 
					    timeout-minutes: 10
 | 
				
			||||||
    runs-on: ubuntu-20.04
 | 
					    runs-on: ubuntu-20.04
 | 
				
			||||||
    container: ghcr.io/linkerd/dev:v28-go
 | 
					    container: ghcr.io/linkerd/dev:v29-go
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
					      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
				
			||||||
      - run: bin/protoc-diff
 | 
					      - run: bin/protoc-diff
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -42,7 +42,7 @@ jobs:
 | 
				
			||||||
  fmt:
 | 
					  fmt:
 | 
				
			||||||
    timeout-minutes: 5
 | 
					    timeout-minutes: 5
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    container: ghcr.io/linkerd/dev:v28-rust
 | 
					    container: ghcr.io/linkerd/dev:v29-rust
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
					      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
				
			||||||
      - run: just rs-check-fmt
 | 
					      - run: just rs-check-fmt
 | 
				
			||||||
| 
						 | 
					@ -50,7 +50,7 @@ jobs:
 | 
				
			||||||
  clippy:
 | 
					  clippy:
 | 
				
			||||||
    timeout-minutes: 10
 | 
					    timeout-minutes: 10
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    container: ghcr.io/linkerd/dev:v28-rust
 | 
					    container: ghcr.io/linkerd/dev:v29-rust
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
					      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
				
			||||||
      - run: just rs-fetch
 | 
					      - run: just rs-fetch
 | 
				
			||||||
| 
						 | 
					@ -60,7 +60,7 @@ jobs:
 | 
				
			||||||
  check:
 | 
					  check:
 | 
				
			||||||
    timeout-minutes: 20
 | 
					    timeout-minutes: 20
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    container: ghcr.io/linkerd/dev:v28-rust
 | 
					    container: ghcr.io/linkerd/dev:v29-rust
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
					      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
				
			||||||
      - run: just rs-fetch
 | 
					      - run: just rs-fetch
 | 
				
			||||||
| 
						 | 
					@ -70,7 +70,7 @@ jobs:
 | 
				
			||||||
    name: test
 | 
					    name: test
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    timeout-minutes: 15
 | 
					    timeout-minutes: 15
 | 
				
			||||||
    container: ghcr.io/linkerd/dev:v28-rust
 | 
					    container: ghcr.io/linkerd/dev:v29-rust
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
					      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
				
			||||||
      - run: just rs-fetch
 | 
					      - run: just rs-fetch
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -15,7 +15,7 @@ jobs:
 | 
				
			||||||
  shellcheck:
 | 
					  shellcheck:
 | 
				
			||||||
    timeout-minutes: 10
 | 
					    timeout-minutes: 10
 | 
				
			||||||
    runs-on: ubuntu-20.04
 | 
					    runs-on: ubuntu-20.04
 | 
				
			||||||
    container: ghcr.io/linkerd/dev:v28-tools
 | 
					    container: ghcr.io/linkerd/dev:v29-tools
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
					      - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
 | 
				
			||||||
      - run: just sh-lint
 | 
					      - run: just sh-lint
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
ARG RUST_IMAGE=docker.io/library/rust:1.62.1
 | 
					ARG RUST_IMAGE=docker.io/library/rust:1.63.0
 | 
				
			||||||
ARG RUNTIME_IMAGE=gcr.io/distroless/cc
 | 
					ARG RUNTIME_IMAGE=gcr.io/distroless/cc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Builds the controller binary.
 | 
					# Builds the controller binary.
 | 
				
			||||||
| 
						 | 
					@ -11,10 +11,10 @@ COPY Cargo.toml Cargo.lock .
 | 
				
			||||||
COPY policy-controller policy-controller
 | 
					COPY policy-controller policy-controller
 | 
				
			||||||
RUN cargo new policy-test --lib
 | 
					RUN cargo new policy-test --lib
 | 
				
			||||||
RUN --mount=type=cache,target=target \
 | 
					RUN --mount=type=cache,target=target \
 | 
				
			||||||
    --mount=type=cache,from=rust:1.62.1,source=/usr/local/cargo,target=/usr/local/cargo \
 | 
					    --mount=type=cache,from=rust:1.63.0,source=/usr/local/cargo,target=/usr/local/cargo \
 | 
				
			||||||
    cargo fetch
 | 
					    cargo fetch
 | 
				
			||||||
RUN --mount=type=cache,target=target \
 | 
					RUN --mount=type=cache,target=target \
 | 
				
			||||||
    --mount=type=cache,from=rust:1.62.1,source=/usr/local/cargo,target=/usr/local/cargo \
 | 
					    --mount=type=cache,from=rust:1.63.0,source=/usr/local/cargo,target=/usr/local/cargo \
 | 
				
			||||||
    if [ "$BUILD_TYPE" = debug ]; then \
 | 
					    if [ "$BUILD_TYPE" = debug ]; then \
 | 
				
			||||||
        cargo build --frozen --target=x86_64-unknown-linux-gnu --package=linkerd-policy-controller && \
 | 
					        cargo build --frozen --target=x86_64-unknown-linux-gnu --package=linkerd-policy-controller && \
 | 
				
			||||||
        mv target/x86_64-unknown-linux-gnu/debug/linkerd-policy-controller /tmp/ ; \
 | 
					        mv target/x86_64-unknown-linux-gnu/debug/linkerd-policy-controller /tmp/ ; \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
ARG RUST_IMAGE=docker.io/library/rust:1.62.1
 | 
					ARG RUST_IMAGE=docker.io/library/rust:1.63.0
 | 
				
			||||||
ARG RUNTIME_IMAGE=gcr.io/distroless/cc
 | 
					ARG RUNTIME_IMAGE=gcr.io/distroless/cc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
FROM $RUST_IMAGE as build
 | 
					FROM $RUST_IMAGE as build
 | 
				
			||||||
| 
						 | 
					@ -13,11 +13,11 @@ COPY Cargo.toml Cargo.lock .
 | 
				
			||||||
COPY policy-controller policy-controller
 | 
					COPY policy-controller policy-controller
 | 
				
			||||||
RUN cargo new policy-test --lib
 | 
					RUN cargo new policy-test --lib
 | 
				
			||||||
RUN --mount=type=cache,target=target \
 | 
					RUN --mount=type=cache,target=target \
 | 
				
			||||||
    --mount=type=cache,from=rust:1.62.1,source=/usr/local/cargo,target=/usr/local/cargo \
 | 
					    --mount=type=cache,from=rust:1.63.0,source=/usr/local/cargo,target=/usr/local/cargo \
 | 
				
			||||||
    cargo fetch
 | 
					    cargo fetch
 | 
				
			||||||
# XXX(ver) we can't easily cross-compile against openssl, so use rustls on arm.
 | 
					# XXX(ver) we can't easily cross-compile against openssl, so use rustls on arm.
 | 
				
			||||||
RUN --mount=type=cache,target=target \
 | 
					RUN --mount=type=cache,target=target \
 | 
				
			||||||
    --mount=type=cache,from=rust:1.62.1,source=/usr/local/cargo,target=/usr/local/cargo \
 | 
					    --mount=type=cache,from=rust:1.63.0,source=/usr/local/cargo,target=/usr/local/cargo \
 | 
				
			||||||
    cargo build --frozen --release --target=armv7-unknown-linux-gnueabihf \
 | 
					    cargo build --frozen --release --target=armv7-unknown-linux-gnueabihf \
 | 
				
			||||||
        --package=linkerd-policy-controller --no-default-features --features="rustls-tls" && \
 | 
					        --package=linkerd-policy-controller --no-default-features --features="rustls-tls" && \
 | 
				
			||||||
    mv target/armv7-unknown-linux-gnueabihf/release/linkerd-policy-controller /tmp/
 | 
					    mv target/armv7-unknown-linux-gnueabihf/release/linkerd-policy-controller /tmp/
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
ARG RUST_IMAGE=docker.io/library/rust:1.62.1
 | 
					ARG RUST_IMAGE=docker.io/library/rust:1.63.0
 | 
				
			||||||
ARG RUNTIME_IMAGE=gcr.io/distroless/cc
 | 
					ARG RUNTIME_IMAGE=gcr.io/distroless/cc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
FROM $RUST_IMAGE as build
 | 
					FROM $RUST_IMAGE as build
 | 
				
			||||||
| 
						 | 
					@ -13,11 +13,11 @@ COPY Cargo.toml Cargo.lock .
 | 
				
			||||||
COPY policy-controller policy-controller
 | 
					COPY policy-controller policy-controller
 | 
				
			||||||
RUN cargo new policy-test --lib
 | 
					RUN cargo new policy-test --lib
 | 
				
			||||||
RUN --mount=type=cache,target=target \
 | 
					RUN --mount=type=cache,target=target \
 | 
				
			||||||
    --mount=type=cache,from=rust:1.62.1,source=/usr/local/cargo,target=/usr/local/cargo \
 | 
					    --mount=type=cache,from=rust:1.63.0,source=/usr/local/cargo,target=/usr/local/cargo \
 | 
				
			||||||
    cargo fetch
 | 
					    cargo fetch
 | 
				
			||||||
# XXX(ver) we can't easily cross-compile against openssl, so use rustls on arm.
 | 
					# XXX(ver) we can't easily cross-compile against openssl, so use rustls on arm.
 | 
				
			||||||
RUN --mount=type=cache,target=target \
 | 
					RUN --mount=type=cache,target=target \
 | 
				
			||||||
    --mount=type=cache,from=rust:1.62.1,source=/usr/local/cargo,target=/usr/local/cargo \
 | 
					    --mount=type=cache,from=rust:1.63.0,source=/usr/local/cargo,target=/usr/local/cargo \
 | 
				
			||||||
    cargo build --frozen --release --target=aarch64-unknown-linux-gnu \
 | 
					    cargo build --frozen --release --target=aarch64-unknown-linux-gnu \
 | 
				
			||||||
        --package=linkerd-policy-controller --no-default-features --features="rustls-tls" && \
 | 
					        --package=linkerd-policy-controller --no-default-features --features="rustls-tls" && \
 | 
				
			||||||
    mv target/aarch64-unknown-linux-gnu/release/linkerd-policy-controller /tmp/
 | 
					    mv target/aarch64-unknown-linux-gnu/release/linkerd-policy-controller /tmp/
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,6 +4,7 @@ use super::NamespacedTargetRef;
 | 
				
			||||||
    Clone,
 | 
					    Clone,
 | 
				
			||||||
    Debug,
 | 
					    Debug,
 | 
				
			||||||
    Default,
 | 
					    Default,
 | 
				
			||||||
 | 
					    Eq,
 | 
				
			||||||
    PartialEq,
 | 
					    PartialEq,
 | 
				
			||||||
    kube::CustomResource,
 | 
					    kube::CustomResource,
 | 
				
			||||||
    serde::Deserialize,
 | 
					    serde::Deserialize,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,6 @@
 | 
				
			||||||
#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize, schemars::JsonSchema)]
 | 
					#[derive(
 | 
				
			||||||
 | 
					    Clone, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize, schemars::JsonSchema,
 | 
				
			||||||
 | 
					)]
 | 
				
			||||||
#[serde(rename_all = "camelCase")]
 | 
					#[serde(rename_all = "camelCase")]
 | 
				
			||||||
pub struct Network {
 | 
					pub struct Network {
 | 
				
			||||||
    pub cidr: Cidr,
 | 
					    pub cidr: Cidr,
 | 
				
			||||||
| 
						 | 
					@ -6,7 +8,7 @@ pub struct Network {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[derive(
 | 
					#[derive(
 | 
				
			||||||
    Copy, Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize, schemars::JsonSchema,
 | 
					    Copy, Clone, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize, schemars::JsonSchema,
 | 
				
			||||||
)]
 | 
					)]
 | 
				
			||||||
#[serde(untagged)]
 | 
					#[serde(untagged)]
 | 
				
			||||||
pub enum Cidr {
 | 
					pub enum Cidr {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,6 +4,7 @@ pub use super::Network;
 | 
				
			||||||
    Clone,
 | 
					    Clone,
 | 
				
			||||||
    Debug,
 | 
					    Debug,
 | 
				
			||||||
    Default,
 | 
					    Default,
 | 
				
			||||||
 | 
					    Eq,
 | 
				
			||||||
    PartialEq,
 | 
					    PartialEq,
 | 
				
			||||||
    kube::CustomResource,
 | 
					    kube::CustomResource,
 | 
				
			||||||
    serde::Deserialize,
 | 
					    serde::Deserialize,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,20 +1,26 @@
 | 
				
			||||||
use super::targets_kind;
 | 
					use super::targets_kind;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize, schemars::JsonSchema)]
 | 
					#[derive(
 | 
				
			||||||
 | 
					    Clone, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize, schemars::JsonSchema,
 | 
				
			||||||
 | 
					)]
 | 
				
			||||||
pub struct ClusterTargetRef {
 | 
					pub struct ClusterTargetRef {
 | 
				
			||||||
    pub group: Option<String>,
 | 
					    pub group: Option<String>,
 | 
				
			||||||
    pub kind: String,
 | 
					    pub kind: String,
 | 
				
			||||||
    pub name: String,
 | 
					    pub name: String,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize, schemars::JsonSchema)]
 | 
					#[derive(
 | 
				
			||||||
 | 
					    Clone, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize, schemars::JsonSchema,
 | 
				
			||||||
 | 
					)]
 | 
				
			||||||
pub struct LocalTargetRef {
 | 
					pub struct LocalTargetRef {
 | 
				
			||||||
    pub group: Option<String>,
 | 
					    pub group: Option<String>,
 | 
				
			||||||
    pub kind: String,
 | 
					    pub kind: String,
 | 
				
			||||||
    pub name: String,
 | 
					    pub name: String,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize, schemars::JsonSchema)]
 | 
					#[derive(
 | 
				
			||||||
 | 
					    Clone, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize, schemars::JsonSchema,
 | 
				
			||||||
 | 
					)]
 | 
				
			||||||
pub struct NamespacedTargetRef {
 | 
					pub struct NamespacedTargetRef {
 | 
				
			||||||
    pub group: Option<String>,
 | 
					    pub group: Option<String>,
 | 
				
			||||||
    pub kind: String,
 | 
					    pub kind: String,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,13 +8,13 @@ use linkerd_policy_controller_k8s_api::{
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
use std::num::NonZeroU16;
 | 
					use std::num::NonZeroU16;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[derive(Clone, Debug, PartialEq)]
 | 
					#[derive(Clone, Debug, Eq, PartialEq)]
 | 
				
			||||||
pub struct InboundRouteBinding {
 | 
					pub struct InboundRouteBinding {
 | 
				
			||||||
    pub parents: Vec<InboundParentRef>,
 | 
					    pub parents: Vec<InboundParentRef>,
 | 
				
			||||||
    pub route: http_route::InboundHttpRoute,
 | 
					    pub route: http_route::InboundHttpRoute,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[derive(Clone, Debug, PartialEq)]
 | 
					#[derive(Clone, Debug, Eq, PartialEq)]
 | 
				
			||||||
pub enum InboundParentRef {
 | 
					pub enum InboundParentRef {
 | 
				
			||||||
    Server(String),
 | 
					    Server(String),
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -86,7 +86,7 @@ fn container_http_probe_paths(
 | 
				
			||||||
    fn get_port(port: &k8s::IntOrString, container: &k8s::Container) -> Option<NonZeroU16> {
 | 
					    fn get_port(port: &k8s::IntOrString, container: &k8s::Container) -> Option<NonZeroU16> {
 | 
				
			||||||
        match port {
 | 
					        match port {
 | 
				
			||||||
            k8s::IntOrString::Int(p) => u16::try_from(*p).ok()?.try_into().ok(),
 | 
					            k8s::IntOrString::Int(p) => u16::try_from(*p).ok()?.try_into().ok(),
 | 
				
			||||||
            k8s::IntOrString::String(n) => find_by_name(n, &*container.ports.as_ref()?),
 | 
					            k8s::IntOrString::String(n) => find_by_name(n, container.ports.as_ref()?),
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1 +1 @@
 | 
				
			||||||
1.62.1
 | 
					1.63.0
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue