From b0711a5b49099dbb3d928958e780ba472b29a8be Mon Sep 17 00:00:00 2001 From: Zuzana Miklankova Date: Fri, 30 Jan 2026 12:59:11 +0100 Subject: [PATCH] Use our ztunnel Signed-off-by: Zuzana Miklankova --- bin/build_ztunnel.sh | 44 ++----------------------------------------- bin/update_ztunnel.sh | 2 +- istio.deps | 2 +- 3 files changed, 4 insertions(+), 44 deletions(-) diff --git a/bin/build_ztunnel.sh b/bin/build_ztunnel.sh index 0f6ebbabbc..49efd4f4ab 100755 --- a/bin/build_ztunnel.sh +++ b/bin/build_ztunnel.sh @@ -76,50 +76,11 @@ function download_ztunnel_if_necessary () { cp -f "${2}" "${TARGET_OUT_LINUX}/ztunnel" } -function maybe_build_ztunnel() { - # TODO detect git changes or something to avoid unnecessarily building - # BUILD_ZTUNNEL=1 with no BUILD_ZTUNNEL_REPO tries to infer BUILD_ZTUNNEL_REPO - if [[ "${BUILD_ZTUNNEL_REPO:-}" == "" ]] && [[ "${BUILD_ZTUNNEL:-}" != "" ]]; then - local ZTUNNEL_DIR - ZTUNNEL_DIR="$(pwd)/../ztunnel" - if [[ -d "${ZTUNNEL_DIR}" ]]; then - BUILD_ZTUNNEL_REPO="${ZTUNNEL_DIR}" - else - echo "No directory at ${ZTUNNEL_DIR}" - return - fi - fi - if [[ "${BUILD_ZTUNNEL_REPO:-}" == "" ]]; then - return - fi - - if ! which cargo; then - echo "the rust toolchain (cargo, etc) is required for building ztunnel" - return 1 - fi - - pushd "${BUILD_ZTUNNEL_REPO}" - cargo build --profile="${BUILD_ZTUNNEL_PROFILE:-dev}" ${BUILD_ZTUNNEL_TARGET:+--target=${BUILD_ZTUNNEL_TARGET}} - - local ZTUNNEL_BIN_PATH - if [[ "${BUILD_ZTUNNEL_PROFILE:-dev}" == "dev" ]]; then - ZTUNNEL_BIN_PATH=debug - else - ZTUNNEL_BIN_PATH="${BUILD_ZTUNNEL_PROFILE}" - fi - ZTUNNEL_BIN_PATH="out/rust/${BUILD_ZTUNNEL_TARGET:+${BUILD_ZTUNNEL_TARGET}/}${ZTUNNEL_BIN_PATH}/ztunnel" - - echo "Copying $(pwd)/${ZTUNNEL_BIN_PATH} to ${TARGET_OUT_LINUX}/ztunnel" - mkdir -p "${TARGET_OUT_LINUX}" - cp "${ZTUNNEL_BIN_PATH}" "${TARGET_OUT_LINUX}/ztunnel" - popd -} - # ztunnel binary vars (TODO handle debug builds, arm, darwin etc.) -ISTIO_ZTUNNEL_BASE_URL="${ISTIO_ZTUNNEL_BASE_URL:-https://storage.googleapis.com/istio-build/ztunnel}" +ISTIO_ZTUNNEL_BASE_URL="${ISTIO_ZTUNNEL_BASE_URL:-https://storage.googleapis.com/maistra-prow-testing/ztunnel}" # If we are not using the default, assume its private and we need to authenticate -if [[ "${ISTIO_ZTUNNEL_BASE_URL}" != "https://storage.googleapis.com/istio-build/ztunnel" ]]; then +if [[ "${ISTIO_ZTUNNEL_BASE_URL}" != "https://storage.googleapis.com/istio-build/ztunnel" && "${ISTIO_ZTUNNEL_BASE_URL}" != "https://storage.googleapis.com/maistra-prow-testing/ztunnel" ]]; then AUTH_HEADER="Authorization: Bearer $(gcloud auth print-access-token)" export AUTH_HEADER fi @@ -133,5 +94,4 @@ ISTIO_ZTUNNEL_LINUX_DEBUG_DIR="${ISTIO_ZTUNNEL_LINUX_DEBUG_DIR:-${TARGET_OUT_LIN ISTIO_ZTUNNEL_LINUX_RELEASE_PATH="${ISTIO_ZTUNNEL_LINUX_RELEASE_PATH:-${ISTIO_ZTUNNEL_LINUX_RELEASE_DIR}/${ISTIO_ZTUNNEL_LINUX_RELEASE_NAME}}" set_download_command -maybe_build_ztunnel download_ztunnel_if_necessary "${ISTIO_ZTUNNEL_RELEASE_URL}" "$ISTIO_ZTUNNEL_LINUX_RELEASE_PATH" "ztunnel" diff --git a/bin/update_ztunnel.sh b/bin/update_ztunnel.sh index c63cb1b443..047a7f1e74 100755 --- a/bin/update_ztunnel.sh +++ b/bin/update_ztunnel.sh @@ -27,7 +27,7 @@ cd "${ROOTDIR}" function getSha() { local dir result dir=$(mktemp -d) - git clone --depth=1 "https://github.com/istio/${1}.git" -b "${UPDATE_BRANCH}" "${dir}" + git clone --depth=1 "https://github.com/openshift-service-mesh/${1}.git" -b "${UPDATE_BRANCH}" "${dir}" result="$(cd "${dir}" && git rev-parse HEAD)" rm -rf "${dir}" diff --git a/istio.deps b/istio.deps index 1f0504f52f..57d8509d3e 100644 --- a/istio.deps +++ b/istio.deps @@ -11,6 +11,6 @@ "name": "ZTUNNEL_REPO_SHA", "repoName": "ztunnel", "file": "", - "lastStableSHA": "055baef94d1d1ec90859196ce015ac0bba587503" + "lastStableSHA": "f64fcbc3cf1cc47106187837bb9a6cf24e5e66b7" } ]