diff --git a/main.tf b/main.tf index c3e8ce5..d3c1ae7 100644 --- a/main.tf +++ b/main.tf @@ -152,6 +152,7 @@ module "support" { worker = var.worker nfs_server = module.vpc_support.vpc_support_server_ip nfs_path = var.nfs_path + cluster_network_mtu = var.cluster_network_mtu } module "worker" { diff --git a/modules/4_pvs_support/pvs_support.tf b/modules/4_pvs_support/pvs_support.tf index 0613437..1b9ebce 100644 --- a/modules/4_pvs_support/pvs_support.tf +++ b/modules/4_pvs_support/pvs_support.tf @@ -196,13 +196,23 @@ resource "null_resource" "adjust_mtu" { timeout = "${var.connection_timeout}m" } - # The mtu.network.to was originally targetting 9000, and has been moved to 1350 based on the VPC/IBM Cloud configurations. + # The mtu.network.to was originally targetting 9000, and has been moved to ${var.cluster_network_mtu} (Default 1350) based on the VPC/IBM Cloud configurations. User can override it by setting desired value in var.tfvars file # we previously supported OpenShiftSDN since it's deprecation we have removed it from automation. provisioner "remote-exec" { inline = [<&1 | grep TARGET_MTU=9100) while [ -z "$${CHECK_CONFIG}" ] diff --git a/modules/4_pvs_support/variables.tf b/modules/4_pvs_support/variables.tf index b06841f..ee3e532 100644 --- a/modules/4_pvs_support/variables.tf +++ b/modules/4_pvs_support/variables.tf @@ -19,6 +19,7 @@ variable "powervs_machine_cidr" {} variable "keep_dns" {} variable "nfs_server" {} variable "nfs_path" {} +variable "cluster_network_mtu" {} variable "worker" { type = object({ count = number, memory = string, processors = string }) default = { diff --git a/variables.tf b/variables.tf index cac29b5..c6f0f47 100644 --- a/variables.tf +++ b/variables.tf @@ -317,6 +317,11 @@ variable "use_zone_info_for_names" { description = "Add zone info to instance name or not" } +variable "cluster_network_mtu" { + type = number + description = "MTU value for the OCP cluster network" + default = 1350 +} ################################################################ # Additional Settings ################################################################