fix: don't abort kind-dev-env.sh on macOS when PROM_ENABLED=true#1645
Closed
sudoalok wants to merge 1 commit into
Closed
fix: don't abort kind-dev-env.sh on macOS when PROM_ENABLED=true#1645sudoalok wants to merge 1 commit into
sudoalok wants to merge 1 commit into
Conversation
shmuelk
approved these changes
Jun 21, 2026
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 <alokbeherak061@gmail.com>
sudoalok
force-pushed
the
fix/inotify-check-macos-1640
branch
from
June 22, 2026 13:09
14dc0df to
1fcb67b
Compare
Collaborator
|
@sudoalok please fix the conflict |
Contributor
Author
Collaborator
|
closing as superseded by #1654 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Stops
PROM_ENABLED=true make env-dev-kindfrom aborting on macOS.The Prometheus pre-flight check in
scripts/kind-dev-env.shreads/proc/sys/fs/inotify/max_user_instances, a Linux-only path. On macOS thatread fails and, under
set -eo pipefail, the failedcatkills the wholescript before the cluster is ever created.
This falls back to a passing value when the path is absent, so the host-side
check degrades gracefully off-Linux. On Linux the behavior is unchanged.
if [ "${PROM_ENABLED}" == "true" ]; then - INOTIFY_INSTANCES=$(cat /proc/sys/fs/inotify/max_user_instances) + INOTIFY_INSTANCES=$(cat /proc/sys/fs/inotify/max_user_instances 2>/dev/null || echo 512)