added patch to longhorn to use dedicated mount for longhorn to avoid using root disk and causing diskPressure
Deploy k8s Bootstrap / Pulumi Preview (pull_request) Successful in 3m18s
Deploy k8s Bootstrap / Bootstrap k3s Cluster (pull_request) Has been skipped
Deploy k8s Infra / Pulumi Preview (pull_request) Successful in 1m7s
Deploy k8s Infra / Pulumi Deploy (pull_request) Has been skipped
Deploy k8s Bootstrap / Pulumi Preview (pull_request) Successful in 3m18s
Deploy k8s Bootstrap / Bootstrap k3s Cluster (pull_request) Has been skipped
Deploy k8s Infra / Pulumi Preview (pull_request) Successful in 1m7s
Deploy k8s Infra / Pulumi Deploy (pull_request) Has been skipped
This commit is contained in:
+34
-2
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user