Skip to content

Commit ce0713c

Browse files
NathanFlurryMasterPtato
authored andcommitted
chore: update opengb cf worker names
1 parent 5741772 commit ce0713c

File tree

12 files changed

+33
-33
lines changed

12 files changed

+33
-33
lines changed

infra/tf/dns/cert_packs.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
locals {
22
# Required if:
33
#
4-
# - OpenGB is enabled so requires access to `*.backend.{domain_main}`
4+
# - Backend is enabled so requires access to `*.backend.{domain_main}`
55
# - Main domain is not at the root of the zone, we need to provide a cert pack for the domain.
66
# - Using the old `{service}.api.{domain}` format, which requires two levels of subdomains.
7-
needs_main_cert_pack = var.opengb_enabled || var.dns_deprecated_subdomains || data.cloudflare_zone.main.name != var.domain_main
7+
needs_main_cert_pack = var.backend_enabled || var.dns_deprecated_subdomains || data.cloudflare_zone.main.name != var.domain_main
88

99
# If CDN is not at the root of the zone, we need to provide a cert pack for the CDN.
1010
#
@@ -40,7 +40,7 @@ resource "cloudflare_certificate_pack" "main" {
4040
# TODO: Only if we use deprecated subdomains
4141
"*.api.${var.domain_main}",
4242
],
43-
var.opengb_enabled ? [
43+
var.backend_enabled ? [
4444
"*.backend.${var.domain_main}",
4545
] : []
4646
])

infra/tf/dns/vars.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ variable "extra_dns" {
4141
}))
4242
}
4343

44-
# MARK: OpenGB
45-
variable "opengb_enabled" {
44+
# MARK: Backend
45+
variable "backend_enabled" {
4646
type = bool
4747
}
4848

infra/tf/tls/cloudflare.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ resource "cloudflare_origin_ca_certificate" "rivet_gg" {
6464
"*.api.${var.domain_main}",
6565
"api.${var.domain_main}",
6666
],
67-
var.opengb_enabled ? [
67+
var.backend_enabled ? [
6868
"*.backend.${var.domain_main}",
6969
] : []
7070
])

infra/tf/tls/vars.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ variable "prometheus_enabled" {
2525
type = bool
2626
}
2727

28-
# MARK: OpenGB
29-
variable "opengb_enabled" {
28+
# MARK: Backend
29+
variable "backend_enabled" {
3030
type = bool
3131
}
3232

infra/tf/vector/vector.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ resource "helm_release" "vector" {
100100
EOF
101101
}
102102

103-
opengb_worker = {
103+
backend_worker = {
104104
type = "filter"
105105
inputs = ["http_json"]
106106
condition = {
107107
type = "vrl"
108-
source = ".path == \"/opengb\""
108+
source = ".path == \"/backend\""
109109
}
110110
}
111111
}
@@ -160,9 +160,9 @@ resource "helm_release" "vector" {
160160
}
161161
}
162162

163-
clickhouse_opengb_logs = {
163+
clickhouse_backend_logs = {
164164
type = "clickhouse"
165-
inputs = ["opengb_worker"]
165+
inputs = ["backend_worker"]
166166
compression = "gzip"
167167
database = "db_cf_log"
168168
endpoint = "https://${var.clickhouse_host}:${var.clickhouse_port_https}"

lib/bolt/config/src/ns.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ pub struct Rivet {
536536
#[serde(default)]
537537
pub billing: Option<RivetBilling>,
538538
#[serde(default)]
539-
pub opengb: Option<RivetOpenGb>,
539+
pub backend: Option<RivetBackend>,
540540
}
541541

542542
#[derive(Serialize, Deserialize, Clone, Debug, Default)]
@@ -549,7 +549,7 @@ pub struct Telemetry {
549549

550550
#[derive(Serialize, Deserialize, Clone, Debug, Default)]
551551
#[serde(deny_unknown_fields)]
552-
pub struct RivetOpenGb {}
552+
pub struct RivetBackend {}
553553

554554
#[derive(Serialize, Deserialize, Clone, Debug)]
555555
#[serde(deny_unknown_fields)]

lib/bolt/core/src/context/project.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,11 @@ impl ProjectContextData {
214214
}
215215
}
216216

217-
// MARK: OpenGB
218-
if self.ns().rivet.opengb.is_some() {
217+
// MARK: Backend
218+
if self.ns().rivet.backend.is_some() {
219219
assert!(
220220
self.ns().dns.is_some(),
221-
"must have DNS configured with for OpenGB"
221+
"must have DNS configured with for backend"
222222
);
223223
}
224224

lib/bolt/core/src/context/service.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -897,13 +897,13 @@ impl ServiceContextData {
897897
(*infra_artifacts_output.job_runner_binary_key).clone(),
898898
);
899899

900-
// OpenGB
901-
if project_ctx.ns().rivet.opengb.is_some() {
902-
let opengb_output = terraform::output::read_opengb(&project_ctx).await;
900+
// Backend
901+
if project_ctx.ns().rivet.backend.is_some() {
902+
let backend_output = terraform::output::read_backend(&project_ctx).await;
903903

904904
env.insert(
905905
"CLOUDFLARE_BACKEND_DISPATCHER_NAMESPACE".into(),
906-
opengb_output.dispatcher_namespace_name.to_string(),
906+
backend_output.dispatcher_namespace_name.to_string(),
907907
);
908908
}
909909

lib/bolt/core/src/dep/terraform/gen.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,10 @@ async fn vars(ctx: &ProjectContext) {
230230
json!(config.rivet.provisioning.is_some()),
231231
);
232232

233-
// OpenGB
233+
// Backend
234234
vars.insert(
235-
"opengb_enabled".into(),
236-
json!(config.rivet.opengb.is_some()),
235+
"backend_enabled".into(),
236+
json!(config.rivet.backend.is_some()),
237237
);
238238

239239
// Tunnels
@@ -324,7 +324,7 @@ async fn vars(ctx: &ProjectContext) {
324324
"name": domain_main_api,
325325
}));
326326

327-
// OpenGB
327+
// Backend
328328
extra_dns.push(json!({
329329
"zone_name": "main",
330330
"name": format!("*.backend.{domain_main}"),

lib/bolt/core/src/dep/terraform/output.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub struct InfraArtifacts {
6060
}
6161

6262
#[derive(Debug, Clone, Deserialize)]
63-
pub struct OpenGb {
63+
pub struct Backend {
6464
pub dispatcher_namespace_name: TerraformOutputValue<String>,
6565
}
6666

@@ -153,8 +153,8 @@ pub async fn read_infra_artifacts(ctx: &ProjectContext) -> InfraArtifacts {
153153
read_plan::<InfraArtifacts>(ctx, "infra_artifacts").await
154154
}
155155

156-
pub async fn read_opengb(ctx: &ProjectContext) -> OpenGb {
157-
read_plan::<OpenGb>(ctx, "opengb").await
156+
pub async fn read_backend(ctx: &ProjectContext) -> Backend {
157+
read_plan::<Backend>(ctx, "backend").await
158158
}
159159

160160
/// Reads a Terraform plan's output and decodes in to type.

0 commit comments

Comments
 (0)