diff --git a/01-proxmox-infra/index.ts b/01-proxmox-infra/index.ts index 48cd142..57f8ec4 100644 --- a/01-proxmox-infra/index.ts +++ b/01-proxmox-infra/index.ts @@ -173,6 +173,7 @@ interface NodeConfig { template: proxmox.VmLegacy; diskDatastore: string; ip: pulumi.Output; + longhornDiskSize?: number; } const nodeConfigs: NodeConfig[] = [ @@ -202,6 +203,7 @@ const nodeConfigs: NodeConfig[] = [ template: pveTemplate, diskDatastore: "local-lvm", ip: worker1Ip, + longhornDiskSize: 50, }, { name: "k3s-master-3", @@ -220,6 +222,7 @@ const nodeConfigs: NodeConfig[] = [ template: pveBckpTemplate, diskDatastore: "local", ip: worker2Ip, + longhornDiskSize: 20, }, ]; @@ -244,17 +247,28 @@ const k3sVms = nodeConfigs.map( numa: true, }, memory: { - dedicated: 2048, + dedicated: node.role === "master" ? 4096 : 8192, floating: 0, }, disks: [ { interface: "scsi0", datastoreId: node.diskDatastore, - size: 10, + size: node.role === "master" ? 10 : 20, ssd: true, discard: "on", }, + ...(node.longhornDiskSize + ? [] + : [ + { + interface: "scsi1", + datastoreId: node.diskDatastore, + size: node.longhornDiskSize, + ssd: true, + discard: "on", + }, + ]), ], initialization: { datastoreId: node.diskDatastore, @@ -279,7 +293,7 @@ const k3sVms = nodeConfigs.map( { provider: node.provider, retainOnDelete: true, - ignoreChanges: ["clone", "started", "disks"], + ignoreChanges: ["clone", "started"], }, ), );