Azure AKS, experimenting with config (#317)

This commit is contained in:
cybermaggedon 2025-03-15 12:41:46 +00:00 committed by GitHub
parent 1db6dd5dfd
commit a22bf0f04e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 62 additions and 1 deletions

View file

@ -0,0 +1,45 @@
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: "disk.csi.azure.com",
parameters: {
// Standard disks (spinning magnetic), Locally Redundant Storage
// Cheapest, basically
skuName: "Standard_LRS",
},
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
}