Skip to content

Commit

Permalink
Update Dockerfile to install openssl dev dependencies.
Browse files Browse the repository at this point in the history
Unfortunately, kube doesn't work with rustls when talking to local
clusters: kube-rs/kube#153

Thankfully, openssl is only a dependency if the test-utils feature is
enabled, so our release builds will not depend on openssl.
Unfortunately, that means that our release builds will be interacting
with Kubernetes using a different TLS library than our tests use.
  • Loading branch information
branlwyd committed Jul 15, 2022
1 parent b37b7e5 commit 90f703e
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 4 deletions.
68 changes: 67 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Dockerfile
@@ -1,6 +1,6 @@
FROM rust:1.62.0-alpine as builder
ARG BINARY=aggregator
RUN apk add libc-dev
RUN apk add libc-dev openssl-dev

WORKDIR /src
COPY Cargo.toml /src/Cargo.toml
Expand Down
7 changes: 5 additions & 2 deletions janus_server/Cargo.toml
Expand Up @@ -7,11 +7,14 @@ publish = false
rust-version = "1.60"

[features]
default = ["kube-rustls"]
tokio-console = ["dep:console-subscriber"]
jaeger = ["dep:tracing-opentelemetry", "dep:opentelemetry-jaeger"]
otlp = ["dep:tracing-opentelemetry", "dep:opentelemetry-otlp", "dep:opentelemetry-semantic-conventions", "dep:tonic"]
prometheus = ["dep:opentelemetry-prometheus", "dep:prometheus"]
test-util = ["janus_core/test-util", "dep:lazy_static", "dep:testcontainers"]
kube-rustls = ["kube/rustls-tls"]
kube-openssl = ["kube/openssl-tls"]

[dependencies]
anyhow = "1"
Expand All @@ -30,7 +33,7 @@ hyper = "0.14.19"
itertools = "0.10.3"
janus_core = { path = "../janus_core", features = ["database"] }
k8s-openapi = { version = "*", features = ["v1_20"] }
kube = "0.65.0"
kube = { version = "0.65.0", default-features = false, features = ["client"] }
lazy_static = { version = "1", optional = true }
num_enum = "0.5.6"
opentelemetry = { version = "0.17.0", features = ["metrics", "rt-tokio"] }
Expand Down Expand Up @@ -67,7 +70,7 @@ warp = { version = "^0.3", features = ["tls"] }
assert_matches = "1"
hex = { version = "0.4.3", features = ["serde"] }
hyper = "0.14.19"
janus_server = { path = ".", features = ["test-util"] }
janus_server = { path = ".", default-features = false, features = ["kube-openssl", "test-util"] }
libc = "0.2.126"
mockito = "0.31.0"
serde_test = "1.0.139"
Expand Down

0 comments on commit 90f703e

Please sign in to comment.