Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@ locals {

# Local block to verify validations for OCP AI Addon.
locals {
# get the total workers per pool
workers_per_pool = {
for pool in var.worker_pools :
pool.pool_name => (
pool.vpc_subnets != null ? length(pool.vpc_subnets) * pool.workers_per_zone : length(var.vpc_subnets[pool.subnet_prefix]) * pool.workers_per_zone
)
}

# retrieve worker specs (CPU & RAM) for all worker pools
worker_specs = {
Expand Down
5 changes: 0 additions & 5 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,6 @@ variable "addons" {
error_message = "OCP AI add-on requires OCP version >= 4.16.0"
}

validation {
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])
error_message = "OCP AI add-on requires at least 2 worker nodes in each worker pool."
}

validation {
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])
error_message = "To install OCP AI add-on, all worker nodes in all pools must have at least 8-core CPU and 32GB memory."
Expand Down