mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 16:36:21 +02:00
Feature/gateway auth (#186)
* Added auth module, just a simple token at this stage * Pass auth token GATEWAY_SECRET through * Auth token not mandatory, can be provided in env var
This commit is contained in:
parent
6d200c79c5
commit
1b9c6be4fc
18 changed files with 126 additions and 33 deletions
|
|
@ -15,6 +15,9 @@ local prompt = import "prompt-template.jsonnet";
|
|||
|
||||
create:: function(engine)
|
||||
|
||||
local envSecrets = engine.envSecrets("gateway-secret")
|
||||
.with_env_var("GATEWAY_SECRET", "gateway-secret");
|
||||
|
||||
local port = $["api-gateway-port"];
|
||||
|
||||
local container =
|
||||
|
|
@ -29,6 +32,7 @@ local prompt = import "prompt-template.jsonnet";
|
|||
"--port",
|
||||
std.toString(port),
|
||||
])
|
||||
.with_env_var_secrets(envSecrets)
|
||||
.with_limits("0.5", "256M")
|
||||
.with_reservations("0.1", "256M")
|
||||
.with_port(8000, 8000, "metrics")
|
||||
|
|
@ -44,6 +48,7 @@ local prompt = import "prompt-template.jsonnet";
|
|||
.with_port(port, port, "api");
|
||||
|
||||
engine.resources([
|
||||
envSecrets,
|
||||
containerSet,
|
||||
service,
|
||||
])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue