fix(local-setup): support podman rootless networking for local kind clusters - #1
Merged
Conversation
crstrn13
approved these changes
Jun 25, 2026
silvi-t
reviewed
Jun 25, 2026
| fi; \ | ||
| echo "Starting cloud-provider-kind..."; \ | ||
| if [ "$$(uname)" = "Darwin" ]; then \ | ||
| sudo env $$DOCKER_HOST_ENV cloud-provider-kind --enable-lb-port-mapping > /tmp/cloud-provider-kind.log 2>&1 & \ |
Owner
There was a problem hiding this comment.
On macOS with Docker, --enable-lb-port-mapping breaks connectivity to LoadBalancer services. Can you remove this flag from the macOS path? The IPs are directly routable on Mac without port mapping. Just keep it for the Linux path.
Allow access to the podman network from the host machine for the test. Ensure cloud-provider-kind is started and stopped correctly. Signed-off-by: Jim Fitzpatrick <jfitzpat@redhat.com>
Boomatang
force-pushed
the
local-setup-fix_patch
branch
from
June 25, 2026 17:33
76c2a9c to
d95cf5e
Compare
silvi-t
approved these changes
Jun 29, 2026
silvi-t
left a comment
Owner
There was a problem hiding this comment.
LGTM, works on macOS with podman/docker.
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.
Summary
podman unshare --rootless-netnswhen running under rootless podman, so tests can reach kind cluster LoadBalancer IPspgrep, brokenkill [c]loud-...pattern) with PID file tracking forcloud-provider-kindon Linux--enable-lb-port-mappingflag tocloud-provider-kindon both platformsDetails
podman unshare --rootless-netnsWhen podman runs in rootless mode, containers operate inside an isolated user and network namespace. The host process (pytest) cannot directly reach IP addresses assigned inside that namespace, such as the LoadBalancer IPs that
cloud-provider-kindprovisions for kind clusters.podman unshare --rootless-netnsexecutes the given command inside podman's rootless network namespace, granting the process visibility into the container network. This allows pytest to connect to services exposed via LoadBalancer without requiring root privileges or manual network configuration.Docker users and macOS podman users are unaffected: the
ROOTLESS_NETNSvariable evaluates to empty when podman is not detected or is not running in rootless mode, so the pytest command runs unchanged.cloud-provider-kindlifecycleThe previous
pgrep -xcheck and thekill [c]loud-provider-kindstop pattern were unreliable. The start target now unconditionally kills any prior instance (via PID file on Linux,sudo pkillon macOS) before launching a fresh process, avoiding stale-process issues duringmake local-setupre-runs.Not tested on macOS
These changes have been developed and tested on Linux with rootless podman. macOS behavior has not been verified. In particular, the PID file (
/tmp/cloud-provider-kind.pid) is only written on Linux because the macOS path usessudo, which makes capturing the background PID of the actualcloud-provider-kindprocess unreliable. macOS continues to usesudo pkill -ffor cleanup. If issues arise on macOS, follow-up changes to the PID file handling may be needed.