From 5c73f8aa8936217a3dd8c4598ca733063d9e3ead Mon Sep 17 00:00:00 2001 From: Alexey Orlov Date: Mon, 16 Dec 2024 12:40:55 +0300 Subject: [PATCH] added necessary var for the mks module --- modules/mks/k8s-nodegroup-gpu/main.tf | 3 +++ modules/mks/k8s-nodegroup/main.tf | 2 ++ 2 files changed, 5 insertions(+) diff --git a/modules/mks/k8s-nodegroup-gpu/main.tf b/modules/mks/k8s-nodegroup-gpu/main.tf index 0e1f979..d8db643 100644 --- a/modules/mks/k8s-nodegroup-gpu/main.tf +++ b/modules/mks/k8s-nodegroup-gpu/main.tf @@ -10,6 +10,9 @@ resource "selectel_mks_nodegroup_v1" "nodegroup_1" { volume_type = var.volume_type labels = var.labels flavor_id = var.flavor_id + + install_nvidia_device_plugin = true + dynamic "taints" { for_each = var.taints[*] content { diff --git a/modules/mks/k8s-nodegroup/main.tf b/modules/mks/k8s-nodegroup/main.tf index a5a2fe1..d46c3cf 100644 --- a/modules/mks/k8s-nodegroup/main.tf +++ b/modules/mks/k8s-nodegroup/main.tf @@ -10,6 +10,8 @@ resource "selectel_mks_nodegroup_v1" "nodegroup_1" { volume_type = var.volume_type labels = var.labels + install_nvidia_device_plugin = false + cpus = var.cpus != "" && var.flavor_id == "" ? var.cpus : null ram_mb = var.ram_mb != "" && var.flavor_id == "" ? var.ram_mb : null flavor_id = var.flavor_id != "" && var.ram_mb == "" && var.cpus == "" ? var.flavor_id : null