From 175ec8bb38448f38c77048e4ef3b41082deb1d1f Mon Sep 17 00:00:00 2001 From: shont Date: Tue, 4 Nov 2025 12:44:46 +0000 Subject: [PATCH] feat(VSECPC-12006): Added support for R82.10 in the GCP NSI solution. --- modules/common/common/variables.tf | 4 ++-- modules/common/startup-script.sh | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/common/common/variables.tf b/modules/common/common/variables.tf index f458b27..b5c1a7b 100644 --- a/modules/common/common/variables.tf +++ b/modules/common/common/variables.tf @@ -8,8 +8,8 @@ variable "os_version" { description = "GAIA OS version" default = "R8120" validation { - condition = contains(["R8110", "R8120" , "R82"], var.os_version) - error_message = "Allowed values for os_version are 'R8110' , 'R8120', 'R82'" + condition = contains(["R8110", "R8120" , "R82", "R8210"], var.os_version) + error_message = "Allowed values for os_version are 'R8110' , 'R8120', 'R82', 'R8210'" } } variable "image_name" { diff --git a/modules/common/startup-script.sh b/modules/common/startup-script.sh index 9d45ccb..f1c37ad 100644 --- a/modules/common/startup-script.sh +++ b/modules/common/startup-script.sh @@ -21,6 +21,10 @@ kernel_parameters: - fwtls_bridge_mode_inspection=1 - fw_geneve_enabled=1 bootcmd: +%{ if os_version == "R8210" ~} + - $CGEDIR/scripts/hairpin_on.sh eth1 br1 +%{ else ~} - echo "brctl hairpin br1 eth1 on" >> /etc/rc.local +%{ endif ~} runcmd: - 'python3 /etc/cloud_config.py generatePassword=\"${generatePassword}\" allowUploadDownload=\"${allowUploadDownload}\" templateName=\"${templateName}\" templateVersion=\"${templateVersion}\" mgmtNIC="X${mgmtNIC}X" hasInternet=\"${hasInternet}\" config_url=\"${config_url}\" config_path=\"${config_path}\" installationType="X${installation_type}X" enableMonitoring=\"${enableMonitoring}\" shell=\"${shell}\" computed_sic_key=\"${computed_sic_key}\" sicKey=\"${sicKey}\" managementGUIClientNetwork=\"${managementGUIClientNetwork}\" primary_cluster_address_name=\"${primary_cluster_address_name}\" secondary_cluster_address_name=\"${secondary_cluster_address_name}\" managementNetwork=\"${managementNetwork}\" numAdditionalNICs=\"${numAdditionalNICs}\" smart1CloudToken="X${smart_1_cloud_token}X" name=\"${name}\" zone=\"${zoneConfig}\" region=\"${region}\" osVersion=\"${os_version}\" MaintenanceModePassword=\"${maintenance_mode_password_hash}\"' \ No newline at end of file