mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 08:26:21 +02:00
Added templates which produce K8s resources. With the provided GCP wrapper, it works on GCP K8s cluster. This isn't stable enough for other folks to use so will need more piloting before it can be documented and released.
76 lines
2 KiB
Jsonnet
76 lines
2 KiB
Jsonnet
local base = import "base/base.jsonnet";
|
|
local images = import "values/images.jsonnet";
|
|
local url = import "values/url.jsonnet";
|
|
local neo4j = import "stores/neo4j.jsonnet";
|
|
|
|
neo4j + {
|
|
|
|
"neo4j-url":: "bolt://neo4j:7687",
|
|
|
|
"store-triples" +: {
|
|
|
|
create:: function(engine)
|
|
|
|
local container =
|
|
engine.container("store-triples")
|
|
.with_image(images.trustgraph)
|
|
.with_command([
|
|
"triples-write-neo4j",
|
|
"-p",
|
|
url.pulsar,
|
|
"-g",
|
|
$["neo4j-url"],
|
|
])
|
|
.with_limits("0.5", "128M")
|
|
.with_reservations("0.1", "128M");
|
|
|
|
local containerSet = engine.containers(
|
|
"store-triples", [ container ]
|
|
);
|
|
|
|
local service =
|
|
engine.internalService(containerSet)
|
|
.with_port(8080, 8080, "metrics");
|
|
|
|
engine.resources([
|
|
containerSet,
|
|
service,
|
|
])
|
|
|
|
},
|
|
|
|
"query-triples" +: {
|
|
|
|
create:: function(engine)
|
|
|
|
local container =
|
|
engine.container("query-triples")
|
|
.with_image(images.trustgraph)
|
|
.with_command([
|
|
"triples-query-neo4j",
|
|
"-p",
|
|
url.pulsar,
|
|
"-g",
|
|
$["neo4j-url"],
|
|
])
|
|
.with_limits("0.5", "128M")
|
|
.with_reservations("0.1", "128M");
|
|
|
|
local containerSet = engine.containers(
|
|
"query-triples", [ container ]
|
|
);
|
|
|
|
local service =
|
|
engine.internalService(containerSet)
|
|
.with_port(8080, 8080, "metrics");
|
|
|
|
engine.resources([
|
|
containerSet,
|
|
service,
|
|
])
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|