Skip to content

Commit

Permalink
fix: rename api-route -> api-traefik-provider (#697)
Browse files Browse the repository at this point in the history
<!-- 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
MasterPtato committed Apr 17, 2024
1 parent f25ffe4 commit 3bf5a1f
Show file tree
Hide file tree
Showing 51 changed files with 153 additions and 157 deletions.
4 changes: 2 additions & 2 deletions infra/tf/k8s_infra/traefik.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module "traefik_secrets" {
source = "../modules/secrets"

keys = [
"rivet/api_route/token",
"rivet/api_traefik_provider/token",
]
}

Expand Down Expand Up @@ -64,7 +64,7 @@ resource "helm_release" "traefik" {
} : null

additionalArguments = [
"--providers.http.endpoint=http://rivet-api-internal-monolith.rivet-service.svc.cluster.local/route/traefik/config/core?token=${module.traefik_secrets.values["rivet/api_route/token"]}",
"--providers.http.endpoint=http://rivet-api-internal-monolith.rivet-service.svc.cluster.local/traefik-provider/config/core?token=${module.traefik_secrets.values["rivet/api_traefik_provider/token"]}",
"--providers.http.pollInterval=2.5s",
# See docs/infrastructure/TIMEOUTS.md
"--entryPoints.web.transport.lifeCycle.graceTimeOut=60s",
Expand Down
2 changes: 1 addition & 1 deletion lib/bolt/core/src/tasks/config/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ pub async fn generate(project_path: &Path, ns_id: &str) -> Result<()> {
})
.await?;
generator
.generate_secret(&["rivet", "api_route", "token"], || async {
.generate_secret(&["rivet", "api_traefik_provider", "token"], || async {
Ok(value(generate_password(32)))
})
.await?;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
[package]
name = "rivet-route-server"
name = "rivet-traefik-provider-server"
version = "0.0.1"
authors = ["Rivet <developer@rivet.gg>"]
edition = "2021"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
[package]
name = "rivet-route-server"
name = "rivet-traefik-provider-server"
version = "0.0.1"
authors = ["Rivet <developer@rivet.gg>"]
edition = "2021"
Expand Down
File renamed without changes.
File renamed without changes.
58 changes: 29 additions & 29 deletions svc/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 svc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ members = [
"api/monolith",
"api/portal",
"api/provision",
"api/route",
"api/status",
"api/traefik-provider",
"pkg/build/ops/create",
"pkg/build/ops/get",
"pkg/build/ops/list-for-game",
Expand Down
2 changes: 1 addition & 1 deletion svc/api/internal-monolith/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ tracing-subscriber = { version = "0.3", default-features = false, features = [
] }
url = "2.2.2"

api-route = { path = "../route" }
api-traefik-provider = { path = "../traefik-provider" }
api-provision = { path = "../provision" }
2 changes: 1 addition & 1 deletion svc/api/internal-monolith/src/route/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ define_router! {
routes: {},
mounts: [
{
path: api_route::route::Router,
path: api_traefik_provider::route::Router,
prefix: "route",
},
{
Expand Down
5 changes: 0 additions & 5 deletions svc/api/route/src/main.rs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "api-route"
name = "api-traefik-provider"
version = "0.0.1"
authors = ["Rivet Gaming, LLC <developer@rivet.gg>"]
edition = "2021"
Expand Down Expand Up @@ -39,7 +39,7 @@ uuid = { version = "1", features = ["v4"] }

[dev-dependencies]
rivet-connection = { path = "../../../lib/connection" }
rivet-route = { path = "../../../lib/smithy-output/api-route/rust" }
rivet-route = { path = "../../../lib/smithy-output/api-traefik-provider/rust" }
base64 = "0.13"
reqwest = "0.11"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[service]
name = "api-route"
name = "api-traefik-provider"

[runtime]
kind = "rust"

[api-routes]

[secrets]
"rivet/api_route/token" = {}
"rivet/api_traefik_provider/token" = {}

[databases]
redis-job = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl Auth {
pub async fn token(&self, token: &str) -> GlobalResult<()> {
ensure_eq_with!(
token,
&util::env::read_secret(&["rivet", "api_route", "token"]).await?,
&util::env::read_secret(&["rivet", "api_traefik_provider", "token"]).await?,
API_FORBIDDEN,
reason = "Invalid token",
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pub mod auth;
pub mod route;
pub mod types;
5 changes: 5 additions & 0 deletions svc/api/traefik-provider/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
use api_helper::start;

fn main() {
start(api_traefik_provider::route::handle);
}
Loading

0 comments on commit 3bf5a1f

Please sign in to comment.