-
Notifications
You must be signed in to change notification settings - Fork 66
feat: podman kubedock enhancement #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: eye0fra The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
d1d387a
to
215229b
Compare
d914534
to
d5f43be
Compare
Signed-off-by: Mattia Mascia <[email protected]>
attempts=$((attempts - 1)) | ||
sleep 5 | ||
fi | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not entirely sure, but could there be a case where the kubeconfig file is still missing after all retry attempts? If so, should we consider explicitly throwing an error or logging a warning at that point, rather than continuing silently?
OC_SRC=$(get_pod_for_container "$SRC") | ||
OC_DEST=$(get_pod_for_container "$DEST") | ||
|
||
#echo exec oc cp "${OPTIONS[@]}" "$OC_SRC" "$OC_DEST" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#echo exec oc cp "${OPTIONS[@]}" "$OC_SRC" "$OC_DEST" |
((i++)) # Skip the next argument (the value) | ||
continue | ||
;; | ||
-v|--volume|-e|--env|-w|--workdir|--name|--hostname|--entrypoint|--add-host|--device|--label|--network|--cap-add|--cap-drop|--security-opt|--tmpfs|--ulimit|--mount|--publish|--expose|--dns|--dns-search|--dns-option|--mac-address|--memory|--memory-swap|--cpu-shares|--cpus|--cpu-period|--cpu-quota|--cpu-rt-runtime|--cpu-rt-period|--cpuset-cpus|--cpuset-mems|--blkio-weight|--blkio-weight-device|--device-read-bps|--device-write-bps|--device-read-iops|--device-write-iops|--shm-size|--sysctl|--log-driver|--log-opt|--restart|--stop-signal|--stop-timeout|--health-cmd|--health-interval|--health-retries|--health-timeout|--health-start-period|--userns|--cgroup-parent|--pid|--ipc|--uts|--runtime|--storage-opt|--tmpfs|--volume-driver|--volumes-from|--env-file|--add-host|--security-opt|--device|--group-add|--init|--isolation|--kernel-memory|--label|--log-driver|--log-opt|--memory-reservation|--memory-swappiness|--oom-kill-disable|--oom-score-adj|--pids-limit|--privileged|--publish-all|--read-only|--restart|--sig-proxy|--stop-signal|--tmpfs|--ulimit|--userns|--uts|--volume|--workdir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this list has some options listed twice e.g., --log-opt
, --label
, --tmpfs
, --device
# Print the command for debug | ||
# echo podman run -d "${FINAL_RUN_OPTS[@]}" "$IMAGE" tail -f /dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Print the command for debug | |
# echo podman run -d "${FINAL_RUN_OPTS[@]}" "$IMAGE" tail -f /dev/null |
I created a DevWorkspace to test this image. I tried various podman commands mentioned in this guide and was able to run most of them https://eclipse.dev/che/docs/stable/end-user-guide/running-containers-with-kubedock/ However, When I tried to test
When listing all scripts in
|
Summary
This PR introduces significant enhancements to the Podman/Kubedock integration within the UBI9 base image, focusing on improved compatibility, usability, and automation for containerized workflows that rely on Podman, especially in environments where Kubedock is enabled.
Key Changes
1. Podman Wrapper System Overhaul
New Wrapper Scripts:
podman-compose-down-wrapper.sh
:Provides a robust replacement for
podman compose down
(ordocker compose down
) to ensure proper cleanup of containers/services, especially when running with Kubedock where standard compose down cannot directly shut down pods.podman-interactive-wrapper.sh
:Transparently intercepts problematic
podman run -it ...
invocations and replaces them with a workaround usingpodman exec
, ensuring interactive sessions work reliably with Kubedock.The wrapper forcibly replaces any
--user
or-u
options with the current user's numeric UID (viaid -u
), ensuring the container always runs as the invoking OpenShift user id, regardless of what is passed on the command line.docker.sh
:Emulates the Docker CLI using Podman, with logic to route commands through the appropriate wrapper when Kubedock is enabled.
Enhanced
podman-wrapper.sh
:compose down
and interactiverun
commands to the new specialized wrappers.2. Dockerfile Updates
/usr/bin/docker
and all wrappers are properly installed and owned.3. Kubedock Setup Improvements
kubedock_setup.sh
now:KUBEDOCK_PARAMS
based on available environment variables (REQUEST_CPU
,REQUEST_MEMORY
,REAPER_KEEPMAX
), allowing for more flexible resource and lifecycle management.Testing
podman run -it ...
)Backward Compatibility