From 07580a788b6fe10596f0f9aec3f1080fa2b3800e Mon Sep 17 00:00:00 2001 From: Cyber MacGeddon Date: Mon, 2 Dec 2024 19:51:31 +0000 Subject: [PATCH] Pass auth token GATEWAY_SECRET through --- templates/components/trustgraph.jsonnet | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/components/trustgraph.jsonnet b/templates/components/trustgraph.jsonnet index 6c60921c..31ae420e 100644 --- a/templates/components/trustgraph.jsonnet +++ b/templates/components/trustgraph.jsonnet @@ -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, ])