Skip to content

Commit da998b5

Browse files
Changes for gitProxy variable in proxy.yaml file (#1047)
1 parent 7cd2965 commit da998b5

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

installer/generate_cluster_yaml.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,16 @@ update_proxy() {
322322
fi
323323

324324
export TMP_VALUE="$value"
325-
echo "🛠️ Setting .argo.proxy.${yaml_key} = \"$value\""
326-
yq eval -i ".argo.proxy.${yaml_key} = strenv(TMP_VALUE)" "$OUTPUT_FILE"
325+
326+
# Special handling for gitProxy - update at .argo.git location
327+
if [ "$yaml_key" = "gitProxy" ]; then
328+
echo "🛠️ Setting .argo.git.${yaml_key} = \"$value\""
329+
yq eval -i ".argo.git.${yaml_key} = strenv(TMP_VALUE)" "$OUTPUT_FILE"
330+
else
331+
echo "🛠️ Setting .argo.proxy.${yaml_key} = \"$value\""
332+
yq eval -i ".argo.proxy.${yaml_key} = strenv(TMP_VALUE)" "$OUTPUT_FILE"
333+
fi
334+
327335
unset TMP_VALUE
328336
}
329337

@@ -335,6 +343,7 @@ update_proxy "enHttpsProxy" "EN_HTTPS_PROXY"
335343
update_proxy "enFtpProxy" "EN_FTP_PROXY"
336344
update_proxy "enSocksProxy" "EN_SOCKS_PROXY"
337345
update_proxy "enNoProxy" "EN_NO_PROXY"
346+
update_proxy "gitProxy" "GIT_PROXY"
338347

339348
# -----------------------------------------------------------------------------
340349
# Manual review (if PROCEED != yes)

on-prem-installers/onprem/onprem.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,4 @@ export EN_HTTPS_PROXY=""
9292
export EN_FTP_PROXY=""
9393
export EN_SOCKS_PROXY=""
9494
export EN_NO_PROXY=""
95+
export GIT_PROXY=""

terraform/orchestrator/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ resource "null_resource" "copy_files" {
300300
"bash -c 'source /home/ubuntu/functions.sh; update_config_variable /home/ubuntu/onprem.env EN_FTP_PROXY ${var.ftp_proxy}'",
301301
"bash -c 'source /home/ubuntu/functions.sh; update_config_variable /home/ubuntu/onprem.env EN_SOCKS_PROXY ${var.socks_proxy}'",
302302
"bash -c 'source /home/ubuntu/functions.sh; update_config_variable /home/ubuntu/onprem.env EN_NO_PROXY ${var.no_proxy}'",
303+
"bash -c 'source /home/ubuntu/functions.sh; update_config_variable /home/ubuntu/onprem.env GIT_PROXY ${var.git_proxy}'",
303304
"bash -c 'source /home/ubuntu/functions.sh; update_config_variable /home/ubuntu/onprem.env OXM_PXE_SERVER_INT ${var.oxm_pxe_server_int}'",
304305
"bash -c 'source /home/ubuntu/functions.sh; update_config_variable /home/ubuntu/onprem.env OXM_PXE_SERVER_IP ${var.oxm_pxe_server_ip}'",
305306
"bash -c 'source /home/ubuntu/functions.sh; update_config_variable /home/ubuntu/onprem.env OXM_PXE_SERVER_SUBNET ${var.oxm_pxe_server_subnet}'",

terraform/orchestrator/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,4 +318,10 @@ variable "enable_explicit_proxy" {
318318
type = bool
319319
description = "Whether to enable explicit proxy settings for the VM."
320320
default = false
321+
}
322+
323+
variable "git_proxy" {
324+
type = string
325+
description = "Sets the GIT_PROXY environment variable in the VM."
326+
default = ""
321327
}

0 commit comments

Comments
 (0)