mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-17 01:01:03 +02:00
Hacking around
This commit is contained in:
parent
572ad915c0
commit
583f11db0c
5 changed files with 33 additions and 9 deletions
|
|
@ -97,6 +97,7 @@ local images = import "values/images.jsonnet";
|
|||
.with_port(3000, 3000, "http");
|
||||
|
||||
engine.resources([
|
||||
vol,
|
||||
provVol,
|
||||
dashVol,
|
||||
containerSet,
|
||||
|
|
|
|||
|
|
@ -7,19 +7,20 @@ local images = import "values/images.jsonnet";
|
|||
|
||||
create:: function(engine)
|
||||
|
||||
local confVolume = engine.volume("pulsar-conf").with_size("2G");
|
||||
// local confVolume = engine.volume("pulsar-conf").with_size("2G");
|
||||
local dataVolume = engine.volume("pulsar-data").with_size("20G");
|
||||
|
||||
local container =
|
||||
engine.container("pulsar")
|
||||
.with_image(images.pulsar)
|
||||
.with_command(["bin/pulsar", "standalone"])
|
||||
// .with_command(["bin/pulsar", "standalone"])
|
||||
.with_command(["bin/sh", "-c", "sleep 1000000"])
|
||||
.with_environment({
|
||||
"PULSAR_MEM": "-Xms700M -Xmx700M"
|
||||
})
|
||||
.with_limits("1.0", "900M")
|
||||
.with_reservations("0.5", "900M")
|
||||
.with_volume_mount(confVolume, "/pulsar/conf")
|
||||
// .with_volume_mount(confVolume, "/pulsar/conf")
|
||||
.with_volume_mount(dataVolume, "/pulsar/data")
|
||||
.with_port(6650, 6650, "bookie")
|
||||
.with_port(8080, 8080, "http");
|
||||
|
|
@ -48,7 +49,7 @@ local images = import "values/images.jsonnet";
|
|||
.with_port(8080, 8080, "http");
|
||||
|
||||
engine.resources([
|
||||
confVolume,
|
||||
// confVolume,
|
||||
dataVolume,
|
||||
containerSet,
|
||||
service,
|
||||
|
|
|
|||
|
|
@ -19,6 +19,17 @@ local ns = {
|
|||
},
|
||||
};
|
||||
|
||||
local sc = {
|
||||
apiVersion: "storage.k8s.io/v1",
|
||||
kind: "StorageClass",
|
||||
metadata: {
|
||||
name: "tg",
|
||||
},
|
||||
provisioner: "k8s.io/minikube-hostpath",
|
||||
reclaimPolicy: "Delete",
|
||||
volumeBindingMode: "Immediate",
|
||||
};
|
||||
|
||||
// Extract resources usnig the engine
|
||||
local resources = std.foldl(
|
||||
function(state, p) state + p.create(engine),
|
||||
|
|
@ -29,7 +40,7 @@ local resources = std.foldl(
|
|||
local resourceList = {
|
||||
apiVersion: "v1",
|
||||
kind: "List",
|
||||
items: [ns] + std.objectValues(resources.resources),
|
||||
items: [ns, sc] + std.objectValues(resources.resources),
|
||||
};
|
||||
|
||||
std.manifestYamlDoc(resourceList, quote_keys=false)
|
||||
|
|
|
|||
|
|
@ -10,6 +10,16 @@
|
|||
reservations: {},
|
||||
ports: [],
|
||||
volumes: [],
|
||||
securityContext: {
|
||||
fsGroup: 1234
|
||||
// runAsUser: 65534
|
||||
// runAsGroup: 65534
|
||||
// runAsNonRoot: true
|
||||
// runAsUser: 0,
|
||||
// runAsGroup: 0,
|
||||
// runAsNonRoot: true,
|
||||
// readOnlyRootFilesystem: true,
|
||||
},
|
||||
|
||||
with_image:: function(x) self + { image: x },
|
||||
|
||||
|
|
@ -196,7 +206,7 @@
|
|||
}
|
||||
},
|
||||
spec: {
|
||||
storageClassName: "manual",
|
||||
storageClassName: "tg",
|
||||
capacity: {
|
||||
storage: volume.size,
|
||||
},
|
||||
|
|
@ -214,14 +224,14 @@
|
|||
namespace: "trustgraph",
|
||||
},
|
||||
spec: {
|
||||
storageClassName: "manual",
|
||||
storageClassName: "tg",
|
||||
accessModes: [ "ReadWriteOnce" ],
|
||||
resources: {
|
||||
requests: {
|
||||
storage: volume.size,
|
||||
}
|
||||
},
|
||||
volumeName: volume.name + "-pv",
|
||||
volumeName: volume.name,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -229,7 +239,7 @@
|
|||
|
||||
volRef:: function() {
|
||||
name: volume.name,
|
||||
persistentVolumeClaim: { claimName: volume.name + "-pvc" },
|
||||
persistentVolumeClaim: { claimName: volume.name },
|
||||
}
|
||||
|
||||
},
|
||||
|
|
|
|||
1
templates/values/version.jsonnet
Normal file
1
templates/values/version.jsonnet
Normal file
|
|
@ -0,0 +1 @@
|
|||
"0.9.3"
|
||||
Loading…
Add table
Add a link
Reference in a new issue