Bug/fix longhorn disk pressure #28

Merged
kasun merged 3 commits from bug/fix-longhorn-diskPressure into main 2026-07-05 03:52:05 +02:00
Showing only changes of commit 135458c9ac - Show all commits
+34 -2
View File
@@ -122,7 +122,7 @@ new k8s.apiextensions.CustomResource(
// ── Longhorn ──────────────────────────────────────────────────────────────
new k8s.helm.v3.Release(
const longhorn = new k8s.helm.v3.Release(
"longhorn",
{
name: "longhorn",
@@ -134,13 +134,45 @@ new k8s.apiextensions.CustomResource(
values: {
defaultSettings: {
defaultReplicaCount: 2,
podDeletionPolicyWhenNodeIsDown: "delete-pod-and-force-delete-pod",
nodeDownPodDeletionPolicy: "delete-both-statefulset-and-deployment-pod",
createDefaultDiskLabeledNodes: true,
},
},
},
opts(),
);
// Patches Longhorn instances to use the mountend Longhorn storage on the worker nodes.
const workerLonghornDiskPatches = ["k3s-worker-1", "k3s-worker-2"].map(
(nodeName) =>
new k8s.apiextensions.CustomResourcePatch(
`${nodeName}-longhorn-disks`,
{
apiVersion: "longhorn.io/v1beta2",
kind: "Node",
metadata: {
name: nodeName,
namespace: "longhorn-system",
annotations: { "pulumi.com/patchForce": "true" },
},
spec: {
disks: {
"longhorn-extra": {
allowScheduling: true,
diskDriver: "",
diskType: "filesystem",
evictionRequested: false,
path: "/mnt/longhorn-extra",
storageReserved: 0,
tags: [],
},
},
},
},
opts({ dependsOn: [longhorn] }),
),
);
// ── kube-vip ────────────
const kubeVipNamespace = "kube-system";