Hacking around

This commit is contained in:
Cyber MacGeddon 2024-09-07 15:42:19 +01:00
parent ee41fa1636
commit 614ffc0fd3
4 changed files with 23 additions and 10 deletions

View file

@ -31,15 +31,23 @@ local images = import "values/images.jsonnet";
.with_command([
"sh",
"-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");
local containerSet = engine.containers(
"pulsar",
[
container, adminContainer
container
]
);
local adminContainerSet = engine.containers(
"init-pulsar",
[
adminContainer
]
);
@ -52,6 +60,7 @@ local images = import "values/images.jsonnet";
// confVolume,
dataVolume,
containerSet,
adminContainerSet,
service,
])

View file

@ -88,7 +88,8 @@
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() {
}

View file

@ -149,11 +149,12 @@
ports: [],
with_port::
function(src, dest, name) self + {
ports: super.ports + [
{ src: src, dest: dest, name: name }
]
},
function(src, dest, name)
self + {
ports: super.ports + [
{ src: src, dest: dest, name: name }
]
},
add:: function() [
@ -166,6 +167,7 @@
namespace: "trustgraph",
},
spec: {
// type: "NodePort",
selector: {
app: service.name,
},
@ -173,6 +175,7 @@
{
port: port.src,
targetPort: port.dest,
// nodePort: port.nodeport,
name: port.name,
}
for port in service.ports

View file

@ -37,7 +37,7 @@ local images = import "values/images.jsonnet";
local service =
engine.service(containerSet)
.with_port(2379, 2379, "api");
.with_port(2379, 2379, 30379, "api");
engine.resources([
vol,