Skip to content
Draft
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
106 changes: 96 additions & 10 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions src/balancerd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ chrono = { version = "0.4.39", default-features = false, features = ["std"] }
clap = { version = "4.5.23", features = ["derive", "env"] }
domain = { version = "0.11.1", default-features = false, features = ["resolv"] }
futures = "0.3.31"
hickory-resolver = "0.25.2"
humantime = "2.2.0"
hyper = { version = "1.4.1", features = ["http1", "server"] }
hyper-openssl = "0.10.2"
Expand Down
17 changes: 7 additions & 10 deletions src/balancerd/src/bin/balancerd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ use std::path::PathBuf;
use std::time::Duration;

use anyhow::Context;
use domain::resolv::StubResolver;
use jsonwebtoken::DecodingKey;
use mz_balancerd::{
BUILD_INFO, BalancerConfig, BalancerService, CancellationResolver, FronteggResolver, Resolver,
SniResolver,
BUILD_INFO, BalancerConfig, BalancerResolver, BalancerService, CancellationResolver,
FronteggResolver, SniResolver,
};
use mz_frontegg_auth::{
Authenticator, AuthenticatorConfig, DEFAULT_REFRESH_DROP_FACTOR,
Expand Down Expand Up @@ -241,8 +240,10 @@ pub async fn run(args: ServiceArgs, tracing_handle: TracingHandle) -> Result<(),
if !cancellation_resolver_dir.is_dir() {
anyhow::bail!("{cancellation_resolver_dir:?} is not a directory");
}

(
Resolver::MultiTenant(
BalancerResolver::MultiTenant(
mz_balancerd::TenantDnsResolver::new(),
FronteggResolver {
auth,
addr_template,
Expand All @@ -261,11 +262,7 @@ pub async fn run(args: ServiceArgs, tracing_handle: TracingHandle) -> Result<(),
)
})
.expect("invalid port for pgwire_sni_resolver_template");
Some(SniResolver {
resolver: StubResolver::new(),
template,
port,
})
Some(SniResolver { template, port })
}
},
),
Expand All @@ -285,7 +282,7 @@ pub async fn run(args: ServiceArgs, tracing_handle: TracingHandle) -> Result<(),
drop(addrs);

(
Resolver::Static(addr.clone()),
BalancerResolver::Static(addr.clone()),
CancellationResolver::Static(addr),
)
}
Expand Down
Loading