mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-26 00:46:22 +02:00
* Switching from docker compose to abstract form - should be easier to k8s later * Text loader util * Recreate templates
24 lines
533 B
Jsonnet
24 lines
533 B
Jsonnet
|
|
local engine = import "docker-compose.jsonnet";
|
|
local decode = import "decode-config.jsonnet";
|
|
local components = import "components.jsonnet";
|
|
|
|
// Options
|
|
local options = std.split(std.extVar("options"), ",");
|
|
|
|
// Produce patterns from config
|
|
local patterns = std.foldl(
|
|
function(state, p) state + components[p],
|
|
options,
|
|
{}
|
|
);
|
|
|
|
// Extract resources usnig the engine
|
|
local resources = std.foldl(
|
|
function(state, p) state + p.create(engine),
|
|
std.objectValues(patterns),
|
|
{}
|
|
);
|
|
|
|
std.manifestYamlDoc(resources)
|
|
|