mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-17 09:11:03 +02:00
More K8s hacking
This commit is contained in:
parent
583f11db0c
commit
ee41fa1636
5 changed files with 79 additions and 71 deletions
|
|
@ -12,7 +12,7 @@ local images = import "values/images.jsonnet";
|
|||
local cfgVol = engine.configVolume(
|
||||
"prometheus-cfg", "./prometheus",
|
||||
{
|
||||
"prometheus.cfg": importstr "prometheus/prometheus.yml",
|
||||
"prometheus.yml": importstr "prometheus/prometheus.yml",
|
||||
}
|
||||
);
|
||||
|
||||
|
|
@ -21,8 +21,9 @@ local images = import "values/images.jsonnet";
|
|||
.with_image(images.prometheus)
|
||||
.with_limits("0.5", "128M")
|
||||
.with_reservations("0.1", "128M")
|
||||
// .with_command(["/bin/sh", "-c", "sleep 9999999"])
|
||||
.with_port(9090, 9090, "http")
|
||||
.with_volume_mount(cfgVol, "/etc/prometheus")
|
||||
.with_volume_mount(cfgVol, "/etc/prometheus/")
|
||||
.with_volume_mount(vol, "/prometheus");
|
||||
|
||||
local containerSet = engine.containers(
|
||||
|
|
@ -48,16 +49,24 @@ local images = import "values/images.jsonnet";
|
|||
|
||||
local vol = engine.volume("grafana-storage").with_size("20G");
|
||||
|
||||
local provVol = engine.configVolume(
|
||||
"provisioning", "./grafana/provisioning/",
|
||||
local provDashVol = engine.configVolume(
|
||||
"prov-dash", "./grafana/provisioning/",
|
||||
{
|
||||
"dashboard.yml":
|
||||
importstr "grafana/provisioning/dashboard.yml",
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
local provDataVol = engine.configVolume(
|
||||
"prov-data", "./grafana/provisioning/",
|
||||
{
|
||||
"datasource.yml":
|
||||
importstr "grafana/provisioning/datasource.yml",
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
local dashVol = engine.configVolume(
|
||||
"dashboards", "./grafana/dashboards/",
|
||||
{
|
||||
|
|
@ -82,7 +91,10 @@ local images = import "values/images.jsonnet";
|
|||
.with_port(3000, 3000, "cassandra")
|
||||
.with_volume_mount(vol, "/var/lib/grafana")
|
||||
.with_volume_mount(
|
||||
provVol, "/etc/grafana/provisioning/dashboards/"
|
||||
provDashVol, "/etc/grafana/provisioning/dashboards/"
|
||||
)
|
||||
.with_volume_mount(
|
||||
provDataVol, "/etc/grafana/provisioning/datasources/"
|
||||
)
|
||||
.with_volume_mount(
|
||||
dashVol, "/var/lib/grafana/dashboards/"
|
||||
|
|
@ -98,9 +110,11 @@ local images = import "values/images.jsonnet";
|
|||
|
||||
engine.resources([
|
||||
vol,
|
||||
provVol,
|
||||
provDashVol,
|
||||
provDataVol,
|
||||
dashVol,
|
||||
containerSet,
|
||||
service,
|
||||
])
|
||||
|
||||
},
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ local images = import "values/images.jsonnet";
|
|||
local container =
|
||||
engine.container("pulsar")
|
||||
.with_image(images.pulsar)
|
||||
// .with_command(["bin/pulsar", "standalone"])
|
||||
.with_command(["bin/sh", "-c", "sleep 1000000"])
|
||||
.with_command(["bin/pulsar", "standalone"])
|
||||
// .with_command(["/bin/sh", "-c", "sleep 9999999"])
|
||||
.with_environment({
|
||||
"PULSAR_MEM": "-Xms700M -Xmx700M"
|
||||
})
|
||||
.with_limits("1.0", "900M")
|
||||
.with_reservations("0.5", "900M")
|
||||
.with_limits("1.0", "1500M")
|
||||
.with_reservations("0.5", "1500M")
|
||||
// .with_volume_mount(confVolume, "/pulsar/conf")
|
||||
.with_volume_mount(dataVolume, "/pulsar/data")
|
||||
.with_port(6650, 6650, "bookie")
|
||||
|
|
@ -33,8 +33,8 @@ local images = import "values/images.jsonnet";
|
|||
"-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",
|
||||
])
|
||||
.with_limits("0.5", "128M")
|
||||
.with_reservations("0.1", "128M");
|
||||
.with_limits("0.1", "256M")
|
||||
.with_reservations("0.1", "256M");
|
||||
|
||||
local containerSet = engine.containers(
|
||||
"pulsar",
|
||||
|
|
@ -59,5 +59,3 @@ local images = import "values/images.jsonnet";
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ local prompts = import "prompts/mixtral.jsonnet";
|
|||
"-m",
|
||||
$["vertexai-model"],
|
||||
])
|
||||
.with_limits("0.5", "128M")
|
||||
.with_reservations("0.1", "128M")
|
||||
.with_limits("0.5", "256M")
|
||||
.with_reservations("0.1", "256M")
|
||||
.with_volume_mount(cfgVol, "/vertexai");
|
||||
|
||||
local containerSet = engine.containers(
|
||||
|
|
@ -90,8 +90,8 @@ local prompts = import "prompts/mixtral.jsonnet";
|
|||
"-o",
|
||||
"non-persistent://tg/response/text-completion-rag-response",
|
||||
])
|
||||
.with_limits("0.5", "128M")
|
||||
.with_reservations("0.1", "128M")
|
||||
.with_limits("0.5", "256M")
|
||||
.with_reservations("0.1", "256M")
|
||||
.with_volume_mount(cfgVol, "/vertexai");
|
||||
|
||||
local containerSet = engine.containers(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue