Build: Always use local tmp dir on macOS. (#12741)

Co-authored-by: Marco Ebert <marco_ebert@icloud.com>
This commit is contained in:
k8s-infra-cherrypick-robot 2025-01-21 23:32:37 -08:00 committed by GitHub
parent bc3eb52a82
commit 61c88eb72d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,14 +26,11 @@ set -o nounset
set -o pipefail
# temporal directory for the /etc/ingress-controller directory
if [[ "$OSTYPE" == darwin* ]] && [[ "$RUNTIME" == podman ]]; then
if [[ "$OSTYPE" == darwin* ]]; then
mkdir -p "tmp"
INGRESS_VOLUME=$(pwd)/$(mktemp -d tmp/XXXXXX)
else
INGRESS_VOLUME=$(mktemp -d)
if [[ "$OSTYPE" == darwin* ]]; then
INGRESS_VOLUME=/private$INGRESS_VOLUME
fi
fi
# make sure directory for SSL cert storage exists under ingress volume