Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inbound fuzzing build #1594

Merged
merged 1 commit into from
Apr 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ ARG YQ_VERSION=v4.2.0
RUN curl --proto '=https' --tlsv1.3 -vsSfLo /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" \
&& chmod +x /usr/local/bin/yq

FROM docker.io/rust:${RUST_VERSION}-bullseye as nightly
RUN rustup toolchain add nightly

FROM nightly as fuzz
RUN cargo +nightly install cargo-fuzz

#
# Main image
#
Expand Down Expand Up @@ -63,6 +69,8 @@ COPY --from=cargo-deny /usr/local/bin/cargo-deny /usr/local/bin/cargo-deny
COPY --from=k3d /usr/local/bin/k3d /usr/local/bin/k3d
COPY --from=kubectl /usr/local/bin/kubectl /usr/local/bin/kubectl
COPY --from=yq /usr/local/bin/yq /usr/local/bin/yq
COPY --from=nightly /usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-gnu /usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-gnu
COPY --from=fuzz /usr/local/cargo/bin/cargo-fuzz /usr/local/cargo/bin/cargo-fuzz

ENTRYPOINT ["/usr/local/share/docker-init.sh"]
CMD ["sleep", "infinity"]
6 changes: 5 additions & 1 deletion linkerd/app/inbound/src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ pub mod fuzz {
kind: "server".into(),
name: "testsaz".into(),
}],
kind: "server".into(),
name: "testsrv".into(),
},
);
Expand All @@ -228,7 +229,10 @@ pub mod fuzz {

impl svc::Param<policy::ServerLabel> for Target {
fn param(&self) -> policy::ServerLabel {
policy::ServerLabel("testsrv".into())
policy::ServerLabel {
kind: "server".into(),
name: "testsrv".into(),
}
}
}

Expand Down