From 1fcb67bc2bb5d95edb2d022b2fdfcc64f6d86c09 Mon Sep 17 00:00:00 2001 From: Alok Behera Date: Sat, 13 Jun 2026 23:03:39 +0530 Subject: [PATCH] fix(scripts): tolerate missing /proc inotify path on non-Linux hosts The PROM_ENABLED pre-flight check reads /proc/sys/fs/inotify/max_user_instances, which only exists on Linux. On macOS the failed read aborts make env-dev-kind under set -eo pipefail before the cluster is created. Fall back to a passing value when the path is absent so the check degrades gracefully off-Linux; behavior on Linux is unchanged. Signed-off-by: Alok Behera --- scripts/kind-dev-env.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/kind-dev-env.sh b/scripts/kind-dev-env.sh index 57a94d96c5..d3ee4e1b33 100755 --- a/scripts/kind-dev-env.sh +++ b/scripts/kind-dev-env.sh @@ -200,7 +200,10 @@ done # Prometheus config-reloader needs sufficient inotify resources if [ "${PROM_ENABLED}" == "true" ]; then - INOTIFY_INSTANCES=$(cat /proc/sys/fs/inotify/max_user_instances) + # On non-Linux hosts (e.g. macOS) /proc does not exist and the kind pods run in + # the container-runtime VM, not the host, so fall back to a passing value rather + # than letting the failed read abort the script under `set -e`. + INOTIFY_INSTANCES=$(cat /proc/sys/fs/inotify/max_user_instances 2>/dev/null || echo 512) if [ "${INOTIFY_INSTANCES}" -lt 512 ]; then echo "Error: fs.inotify.max_user_instances is ${INOTIFY_INSTANCES} (need >= 512) for Prometheus." echo ""