fix(terraform): cap EPHEMERAL volume size to reserve disk space for swap partition on worker nodes
This commit is contained in:
@@ -102,6 +102,7 @@ resource "local_file" "worker_configs" {
|
|||||||
gpu_count = each.value.gpu_count
|
gpu_count = each.value.gpu_count
|
||||||
extra_disks = each.value.extra_disks
|
extra_disks = each.value.extra_disks
|
||||||
swap_size = each.value.swap_size
|
swap_size = each.value.swap_size
|
||||||
|
ephemeral_max_size = each.value.ephemeral_max_size
|
||||||
|
|
||||||
# Cluster config
|
# Cluster config
|
||||||
cluster_id = var.cluster_id
|
cluster_id = var.cluster_id
|
||||||
|
|||||||
@@ -44,8 +44,7 @@ machine:
|
|||||||
validSubnets:
|
validSubnets:
|
||||||
- 192.168.1.0/24
|
- 192.168.1.0/24
|
||||||
install:
|
install:
|
||||||
diskSelector:
|
disk: ${install_disk}
|
||||||
match: disk.transport == "nvme"
|
|
||||||
image: ${factory_image}
|
image: ${factory_image}
|
||||||
wipe: true
|
wipe: true
|
||||||
grubUseUKICmdline: true
|
grubUseUKICmdline: true
|
||||||
@@ -100,6 +99,15 @@ cluster:
|
|||||||
%{ if swap_size != "" ~}
|
%{ if swap_size != "" ~}
|
||||||
---
|
---
|
||||||
apiVersion: v1alpha1
|
apiVersion: v1alpha1
|
||||||
|
kind: VolumeConfig
|
||||||
|
name: EPHEMERAL
|
||||||
|
provisioning:
|
||||||
|
diskSelector:
|
||||||
|
match: disk.transport == "nvme"
|
||||||
|
maxSize: ${ephemeral_max_size}
|
||||||
|
grow: false
|
||||||
|
---
|
||||||
|
apiVersion: v1alpha1
|
||||||
kind: SwapVolumeConfig
|
kind: SwapVolumeConfig
|
||||||
name: swap1
|
name: swap1
|
||||||
provisioning:
|
provisioning:
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ variable "worker_configs" {
|
|||||||
gpu_count = optional(number, 0)
|
gpu_count = optional(number, 0)
|
||||||
factory_image = optional(string)
|
factory_image = optional(string)
|
||||||
swap_size = optional(string, "")
|
swap_size = optional(string, "")
|
||||||
|
ephemeral_max_size = optional(string, "700GiB")
|
||||||
extra_disks = optional(list(object({
|
extra_disks = optional(list(object({
|
||||||
device = string
|
device = string
|
||||||
mountpoint = string
|
mountpoint = string
|
||||||
|
|||||||
Reference in New Issue
Block a user