Skip to content

Commit

Permalink
fix: conditionally remove cluster & ds code dependent on external pro…
Browse files Browse the repository at this point in the history
…viders (#1328)

<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
  • Loading branch information
NathanFlurry committed Nov 13, 2024
1 parent e2d5587 commit fdae5a4
Show file tree
Hide file tree
Showing 30 changed files with 721 additions and 322 deletions.
85 changes: 43 additions & 42 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion docker/dev-full/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ services:
- RUST_LOG=debug,hyper=info
- RUST_LOG_TARGET=1
- RUST_LOG_SPAN_PATH=1
- RUST_LOG_ANSI_COLOR=1
stop_grace_period: 0s
ports:
# API
Expand Down
12 changes: 12 additions & 0 deletions packages/common/config/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,18 @@ impl Server {
pub fn hcaptcha(&self) -> GlobalResult<&Hcaptcha> {
Ok(unwrap_ref!(self.hcaptcha, "hcaptcha disabled"))
}

/// If automatically issuing TLS certs is enabled.
pub fn is_tls_enabled(&self) -> bool {
self.rivet
.dns
.as_ref()
.map_or(false, |x| x.domain_main.is_some() && x.domain_job.is_some())
&& self
.cloudflare
.as_ref()
.map_or(false, |x| x.zone.main.is_some() && x.zone.job.is_some())
}
}

#[derive(Debug, Serialize, Deserialize, Clone)]
Expand Down
2 changes: 2 additions & 0 deletions packages/common/config/src/config/rivet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ pub struct Datacenter {
#[serde(default)]
pub hardware: Option<DatacenterHardware>,

// #[serde(default)]
// pub reserve_resources: Option<ReserveResources>,
/// Configures how servers are provisioned.
///
/// Enterprise only.
Expand Down
Loading

0 comments on commit fdae5a4

Please sign in to comment.