@@ -6,11 +6,6 @@ source scripts/funcs/install
66
77set -Eeou pipefail
88
9- # Ensure XDG_RUNTIME_DIR is set for rootless podman
10- if [[ -z " ${XDG_RUNTIME_DIR:- } " ]]; then
11- export XDG_RUNTIME_DIR=" /run/user/$( id -u) "
12- fi
13-
149set_limits () {
1510 echo " Increasing fs.inotify.max_user_instances"
1611 sudo sysctl -w fs.inotify.max_user_instances=8192
3833 sudo sysctl -w vm.max_map_count=262144
3934}
4035
41- # retrieve arch variable off the shell command line
4236ARCH=" $( detect_architecture) "
4337
4438echo " Setting up minikube host for architecture: ${ARCH} "
@@ -63,7 +57,6 @@ setup_local_registry_and_custom_image() {
6357 if ! ${registry_running} ; then
6458 echo " Starting local container registry on port 5000 (rootless)..."
6559
66- # Clean up any existing registry first (rootless)
6760 podman rm -f registry 2> /dev/null || true
6861
6962 # Use port 5000 - rootless podman can bind to high ports without issues
@@ -72,7 +65,6 @@ setup_local_registry_and_custom_image() {
7265 exit 1
7366 fi
7467
75- # Wait for registry to be ready
7668 echo " Waiting for registry to be ready..."
7769 for _ in {1..30}; do
7870 if curl -s http://localhost:5000/v2/_catalog > /dev/null 2>&1 ; then
134126 return 0
135127}
136128
137- # Setup rootless podman requirements
138- setup_rootless_requirements () {
139- echo " >>> Setting up rootless podman requirements..."
140-
141- # Enable cgroup v2 delegation for the current user (required for rootless containers)
142- # This allows the user to manage cgroups without root
143- if [[ -d /sys/fs/cgroup/user.slice ]]; then
144- echo " cgroup v2 detected"
145- fi
146-
147- # Ensure user namespaces are enabled
148- if [[ -f /proc/sys/user/max_user_namespaces ]]; then
149- max_userns=$( cat /proc/sys/user/max_user_namespaces)
150- if [[ " ${max_userns} " -lt 1000 ]]; then
151- echo " Warning: max_user_namespaces is low (${max_userns} ), rootless may have issues"
152- fi
153- fi
154-
155- # Setup subuid/subgid if not already configured (requires sudo once)
156- if ! grep -q " ^$( whoami) :" /etc/subuid 2> /dev/null; then
157- echo " Setting up subuid/subgid for rootless podman..."
158- sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 " $( whoami) " || true
159- fi
160-
161- # Migrate podman system if needed (cleans up any rootful leftovers in user space)
162- podman system migrate 2> /dev/null || true
163-
164- echo " ✅ Rootless requirements configured"
165- }
166129
167130# Start minikube with podman driver (rootless)
168131start_minikube_cluster () {
@@ -212,9 +175,6 @@ start_minikube_cluster() {
212175set_limits
213176download_minikube
214177
215- # Setup rootless podman requirements
216- setup_rootless_requirements
217-
218178# Setup local registry and custom kicbase image for ppc64le if needed
219179setup_local_registry_and_custom_image
220180
0 commit comments