mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-17 17:21:02 +02:00
Hacking around
This commit is contained in:
parent
ee41fa1636
commit
614ffc0fd3
4 changed files with 23 additions and 10 deletions
|
|
@ -31,15 +31,23 @@ local images = import "values/images.jsonnet";
|
||||||
.with_command([
|
.with_command([
|
||||||
"sh",
|
"sh",
|
||||||
"-c",
|
"-c",
|
||||||
"pulsar-admin --admin-url http://pulsar:8080 tenants create tg && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response && pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response",
|
"sleep 1000000",
|
||||||
|
// "pulsar-admin --admin-url http://pulsar:8080 tenants create tg && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/flow && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/request && pulsar-admin --admin-url http://pulsar:8080 namespaces create tg/response && pulsar-admin --admin-url http://pulsar:8080 namespaces set-retention --size -1 --time 3m tg/response",
|
||||||
])
|
])
|
||||||
.with_limits("0.1", "256M")
|
.with_limits("2", "256M")
|
||||||
.with_reservations("0.1", "256M");
|
.with_reservations("0.1", "256M");
|
||||||
|
|
||||||
local containerSet = engine.containers(
|
local containerSet = engine.containers(
|
||||||
"pulsar",
|
"pulsar",
|
||||||
[
|
[
|
||||||
container, adminContainer
|
container
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
local adminContainerSet = engine.containers(
|
||||||
|
"init-pulsar",
|
||||||
|
[
|
||||||
|
adminContainer
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -52,6 +60,7 @@ local images = import "values/images.jsonnet";
|
||||||
// confVolume,
|
// confVolume,
|
||||||
dataVolume,
|
dataVolume,
|
||||||
containerSet,
|
containerSet,
|
||||||
|
adminContainerSet,
|
||||||
service,
|
service,
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,8 @@
|
||||||
|
|
||||||
name: containers.name,
|
name: containers.name,
|
||||||
|
|
||||||
with_port:: function(src, dest, name) self + { port: [src, dest] },
|
with_port:: function(src, dest, name)
|
||||||
|
self + { port: [src, dest] },
|
||||||
|
|
||||||
add:: function() {
|
add:: function() {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -149,11 +149,12 @@
|
||||||
ports: [],
|
ports: [],
|
||||||
|
|
||||||
with_port::
|
with_port::
|
||||||
function(src, dest, name) self + {
|
function(src, dest, name)
|
||||||
ports: super.ports + [
|
self + {
|
||||||
{ src: src, dest: dest, name: name }
|
ports: super.ports + [
|
||||||
]
|
{ src: src, dest: dest, name: name }
|
||||||
},
|
]
|
||||||
|
},
|
||||||
|
|
||||||
add:: function() [
|
add:: function() [
|
||||||
|
|
||||||
|
|
@ -166,6 +167,7 @@
|
||||||
namespace: "trustgraph",
|
namespace: "trustgraph",
|
||||||
},
|
},
|
||||||
spec: {
|
spec: {
|
||||||
|
// type: "NodePort",
|
||||||
selector: {
|
selector: {
|
||||||
app: service.name,
|
app: service.name,
|
||||||
},
|
},
|
||||||
|
|
@ -173,6 +175,7 @@
|
||||||
{
|
{
|
||||||
port: port.src,
|
port: port.src,
|
||||||
targetPort: port.dest,
|
targetPort: port.dest,
|
||||||
|
// nodePort: port.nodeport,
|
||||||
name: port.name,
|
name: port.name,
|
||||||
}
|
}
|
||||||
for port in service.ports
|
for port in service.ports
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ local images = import "values/images.jsonnet";
|
||||||
|
|
||||||
local service =
|
local service =
|
||||||
engine.service(containerSet)
|
engine.service(containerSet)
|
||||||
.with_port(2379, 2379, "api");
|
.with_port(2379, 2379, 30379, "api");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
vol,
|
vol,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue