Skip to content

Commit b50d9f9

Browse files
authored
fix: updated worker node input validation logic (#724)
1 parent f9d3a41 commit b50d9f9

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

main.tf

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,6 @@ locals {
4343

4444
# Local block to verify validations for OCP AI Addon.
4545
locals {
46-
# get the total workers per pool
47-
workers_per_pool = {
48-
for pool in var.worker_pools :
49-
pool.pool_name => (
50-
pool.vpc_subnets != null ? length(pool.vpc_subnets) * pool.workers_per_zone : length(var.vpc_subnets[pool.subnet_prefix]) * pool.workers_per_zone
51-
)
52-
}
5346

5447
# retrieve worker specs (CPU & RAM) for all worker pools
5548
worker_specs = {

variables.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,11 +367,6 @@ variable "addons" {
367367
error_message = "OCP AI add-on requires OCP version >= 4.16.0"
368368
}
369369

370-
validation {
371-
condition = (lookup(var.addons, "openshift-ai", null) != null ? lookup(var.addons["openshift-ai"], "version", null) == null : true) || alltrue([for workers in values(local.workers_per_pool) : workers >= 2])
372-
error_message = "OCP AI add-on requires at least 2 worker nodes in each worker pool."
373-
}
374-
375370
validation {
376371
condition = (lookup(var.addons, "openshift-ai", null) != null ? lookup(var.addons["openshift-ai"], "version", null) == null : true) || alltrue([for spec in values(local.worker_specs) : spec.cpu_count >= 8 && spec.ram_count >= 32])
377372
error_message = "To install OCP AI add-on, all worker nodes in all pools must have at least 8-core CPU and 32GB memory."

0 commit comments

Comments
 (0)