mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 08:26:21 +02:00
* Added a config to create Minikube k8s, uses hostpath volumes * Reworked templater to produce docker compose and minikube output * Fix config templates
44 lines
890 B
Jsonnet
44 lines
890 B
Jsonnet
|
|
local k8s = import "k8s.jsonnet";
|
|
|
|
local ns = {
|
|
apiVersion: "v1",
|
|
kind: "Namespace",
|
|
metadata: {
|
|
name: "trustgraph",
|
|
},
|
|
"spec": {
|
|
},
|
|
};
|
|
|
|
local sc = {
|
|
apiVersion: "storage.k8s.io/v1",
|
|
kind: "StorageClass",
|
|
metadata: {
|
|
name: "tg",
|
|
},
|
|
provisioner: "pd.csi.storage.gke.io",
|
|
parameters: {
|
|
type: "pd-balanced",
|
|
"csi.storage.k8s.io/fstype": "ext4",
|
|
},
|
|
reclaimPolicy: "Delete",
|
|
volumeBindingMode: "WaitForFirstConsumer",
|
|
};
|
|
|
|
k8s + {
|
|
|
|
// Extract resources usnig the engine
|
|
package:: function(patterns)
|
|
local resources = [sc, ns] + std.flattenArrays([
|
|
p.create(self) for p in std.objectValues(patterns)
|
|
]);
|
|
local resourceList = {
|
|
apiVersion: "v1",
|
|
kind: "List",
|
|
items: [ns, sc] + resources,
|
|
};
|
|
resourceList
|
|
|
|
}
|
|
|