From 5066916d634101ebbfbd186fc11f6ca10239db8d Mon Sep 17 00:00:00 2001 From: John Myers <9696606+johntmyers@users.noreply.github.com> Date: Sun, 15 Mar 2026 20:41:04 -0700 Subject: [PATCH] fix(cluster): preserve hostGatewayIP across fast deploys The fast deploy's helm upgrade was missing the hostGatewayIP value that the bootstrap entrypoint injects into the HelmChart CR. This caused host.openshell.internal hostAliases to be lost from the gateway pod and sandbox pods after any fast deploy, breaking host gateway routing. Read the IP from the HelmChart CR and pass it through to helm upgrade. --- tasks/scripts/cluster-deploy-fast.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tasks/scripts/cluster-deploy-fast.sh b/tasks/scripts/cluster-deploy-fast.sh index c9eba82d5..213c2e25a 100755 --- a/tasks/scripts/cluster-deploy-fast.sh +++ b/tasks/scripts/cluster-deploy-fast.sh @@ -405,6 +405,15 @@ if [[ "${needs_helm_upgrade}" == "1" ]]; then | cut -d'\"' -f4") || true SSH_HANDSHAKE_SECRET="${EXISTING_SECRET:-$(openssl rand -hex 32)}" + # Retrieve the host gateway IP from the entrypoint-rendered HelmChart CR so + # that hostAliases for host.openshell.internal are preserved across fast deploys. + HOST_GATEWAY_IP=$(cluster_exec "kubectl -n kube-system get helmchart openshell -o jsonpath='{.spec.valuesContent}' 2>/dev/null \ + | grep hostGatewayIP | awk '{print \$2}'" 2>/dev/null) || true + HOST_GATEWAY_ARGS="" + if [[ -n "${HOST_GATEWAY_IP}" ]]; then + HOST_GATEWAY_ARGS="--set server.hostGatewayIP=${HOST_GATEWAY_IP}" + fi + cluster_exec "helm upgrade openshell ${CONTAINER_CHART_DIR} \ --namespace openshell \ --set image.repository=${IMAGE_REPO_BASE}/gateway \ @@ -415,6 +424,7 @@ if [[ "${needs_helm_upgrade}" == "1" ]]; then --set server.tls.clientCaSecretName=openshell-server-client-ca \ --set server.tls.clientTlsSecretName=openshell-client-tls \ --set server.sshHandshakeSecret=${SSH_HANDSHAKE_SECRET} \ + ${HOST_GATEWAY_ARGS} \ ${helm_wait_args}" helm_end=$(date +%s) log_duration "Helm upgrade" "${helm_start}" "${helm_end}"