mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-17 09:11: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");
|
.with_port(3000, 3000, "http");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
|
vol,
|
||||||
provVol,
|
provVol,
|
||||||
dashVol,
|
dashVol,
|
||||||
containerSet,
|
containerSet,
|
||||||
|
|
|
||||||
|
|
@ -7,19 +7,20 @@ local images = import "values/images.jsonnet";
|
||||||
|
|
||||||
create:: function(engine)
|
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 dataVolume = engine.volume("pulsar-data").with_size("20G");
|
||||||
|
|
||||||
local container =
|
local container =
|
||||||
engine.container("pulsar")
|
engine.container("pulsar")
|
||||||
.with_image(images.pulsar)
|
.with_image(images.pulsar)
|
||||||
.with_command(["bin/pulsar", "standalone"])
|
// .with_command(["bin/pulsar", "standalone"])
|
||||||
|
.with_command(["bin/sh", "-c", "sleep 1000000"])
|
||||||
.with_environment({
|
.with_environment({
|
||||||
"PULSAR_MEM": "-Xms700M -Xmx700M"
|
"PULSAR_MEM": "-Xms700M -Xmx700M"
|
||||||
})
|
})
|
||||||
.with_limits("1.0", "900M")
|
.with_limits("1.0", "900M")
|
||||||
.with_reservations("0.5", "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_volume_mount(dataVolume, "/pulsar/data")
|
||||||
.with_port(6650, 6650, "bookie")
|
.with_port(6650, 6650, "bookie")
|
||||||
.with_port(8080, 8080, "http");
|
.with_port(8080, 8080, "http");
|
||||||
|
|
@ -48,7 +49,7 @@ local images = import "values/images.jsonnet";
|
||||||
.with_port(8080, 8080, "http");
|
.with_port(8080, 8080, "http");
|
||||||
|
|
||||||
engine.resources([
|
engine.resources([
|
||||||
confVolume,
|
// confVolume,
|
||||||
dataVolume,
|
dataVolume,
|
||||||
containerSet,
|
containerSet,
|
||||||
service,
|
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
|
// Extract resources usnig the engine
|
||||||
local resources = std.foldl(
|
local resources = std.foldl(
|
||||||
function(state, p) state + p.create(engine),
|
function(state, p) state + p.create(engine),
|
||||||
|
|
@ -29,7 +40,7 @@ local resources = std.foldl(
|
||||||
local resourceList = {
|
local resourceList = {
|
||||||
apiVersion: "v1",
|
apiVersion: "v1",
|
||||||
kind: "List",
|
kind: "List",
|
||||||
items: [ns] + std.objectValues(resources.resources),
|
items: [ns, sc] + std.objectValues(resources.resources),
|
||||||
};
|
};
|
||||||
|
|
||||||
std.manifestYamlDoc(resourceList, quote_keys=false)
|
std.manifestYamlDoc(resourceList, quote_keys=false)
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,16 @@
|
||||||
reservations: {},
|
reservations: {},
|
||||||
ports: [],
|
ports: [],
|
||||||
volumes: [],
|
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 },
|
with_image:: function(x) self + { image: x },
|
||||||
|
|
||||||
|
|
@ -196,7 +206,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
spec: {
|
spec: {
|
||||||
storageClassName: "manual",
|
storageClassName: "tg",
|
||||||
capacity: {
|
capacity: {
|
||||||
storage: volume.size,
|
storage: volume.size,
|
||||||
},
|
},
|
||||||
|
|
@ -214,14 +224,14 @@
|
||||||
namespace: "trustgraph",
|
namespace: "trustgraph",
|
||||||
},
|
},
|
||||||
spec: {
|
spec: {
|
||||||
storageClassName: "manual",
|
storageClassName: "tg",
|
||||||
accessModes: [ "ReadWriteOnce" ],
|
accessModes: [ "ReadWriteOnce" ],
|
||||||
resources: {
|
resources: {
|
||||||
requests: {
|
requests: {
|
||||||
storage: volume.size,
|
storage: volume.size,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
volumeName: volume.name + "-pv",
|
volumeName: volume.name,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -229,7 +239,7 @@
|
||||||
|
|
||||||
volRef:: function() {
|
volRef:: function() {
|
||||||
name: volume.name,
|
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