feat: Add Podman support as drop-in replacement for Docker - #360
feat: Add Podman support as drop-in replacement for Docker #360ZPascal wants to merge 3 commits into
Conversation
e11a2de to
362eb75
Compare
|
/easycla |
4bc003f to
61afe52
Compare
feef7d2 to
0648cc2
Compare
22c8334 to
162984c
Compare
3c80079 to
bb577c4
Compare
fd8cb71 to
eb77fe2
Compare
41a67f7 to
1041b76
Compare
1041b76 to
43c32e8
Compare
43c32e8 to
cf675d9
Compare
|
Hi @ZPascal, The rootless Podman is incompatible with the CNI, therefore it is incompatible with |
cf675d9 to
c192589
Compare
2eb7302 to
abcb0ed
Compare
I've adapted the PR and removed the rootless support. |
7d111d9 to
d077578
Compare
pbusko
left a comment
There was a problem hiding this comment.
Unfortunately this PR still requires rebasing due to the usage of the releases folder, which no longer exists, and there are still rootless Podman artifacts, as well as Cilium replacement with kindnet
| --privileged \ | ||
| --pid host \ | ||
| -v /lib/modules:/lib/modules:ro \ | ||
| alpine sh -c "sysctl -w fs.inotify.max_user_instances=512 && modprobe nfs && modprobe nfsd" |
There was a problem hiding this comment.
is this still needed for rootful Podman?
There was a problem hiding this comment.
Yes, still needed. This CI job runs on Docker (ubuntu-latest) and is unchanged from before this PR. The step loads the NFS kernel modules and raises fs.inotify.max_user_instances which Docker requires for the test run.
| # Set to false when Cilium is not installed (e.g. rootless Podman CI). | ||
| # CiliumClusterwideNetworkPolicy CRDs won't exist without Cilium. | ||
| ciliumNetworkPolicies: | ||
| enabled: true |
There was a problem hiding this comment.
as it was discussed, Cilium replacement is not possible at this stage of the project
There was a problem hiding this comment.
Addressed. Removed all SKIP_CILIUM conditionality. Podman now uses Cilium via CILIUM_EXTRA_VALUES pointing to assets/values/cilium-podman.yaml (reduced-privilege Cilium config: no eBPF kube-proxy replacement, VXLAN tunnel, BPF masquerade disabled). kind-podman.yaml updated to disableDefaultCNI: true + kubeProxyMode: none so Cilium manages networking. CiliumClusterwideNetworkPolicy resources are always deployed.
| @@ -1,3 +1,4 @@ | |||
| {{- if .Values.ciliumNetworkPolicies.enabled }} | |||
There was a problem hiding this comment.
| @@ -0,0 +1,68 @@ | |||
| # This file is NOT used by default. When SKIP_CILIUM=true (the default under | |||
There was a problem hiding this comment.
| - name: tlsKey | ||
| file: {{ .Values.certsDir }}/all-in-one.key | ||
| - name: ciliumNetworkPolicies.enabled | ||
| value: {{ ne (env "SKIP_CILIUM") "true" }} |
There was a problem hiding this comment.
| # at startup which requires CAP_NET_ADMIN in the *host* (initial) user namespace – | ||
| # a privilege that rootless Podman containers structurally cannot have. | ||
| # kindnet provides full pod-to-pod connectivity without BPF privileges. | ||
| disableDefaultCNI: false |
There was a problem hiding this comment.
| install: | ||
| @ ./scripts/install.sh | ||
| @ . ./scripts/detect-runtime.sh; \ | ||
| if [ "$$IS_PODMAN" = "true" ]; then export SKIP_CILIUM="true"; fi; \ |
There was a problem hiding this comment.
| ### Linux (rootless Podman) | ||
|
|
||
| Rootless Podman is fully supported on Linux. The following kernel settings must be applied before running `make up` — either manually or via your system's sysctl configuration: |
There was a problem hiding this comment.
rootless Podman is incompatible
There was a problem hiding this comment.
I've adjusted it and the README now only documents rootful Podman.
| ### Limitations | ||
|
|
||
| - **CNI:** Cilium is skipped under rootless Podman (Linux CI / rootless desktop) because Cilium 1.18.x requires `CAP_NET_ADMIN` in the host user namespace, which rootless containers cannot provide. [kindnet](https://github.com/aojea/kindnet) is used instead, providing full pod-to-pod connectivity without eBPF privileges. Cilium network policies are therefore not enforced in this mode. | ||
| - **Image builds:** `make build` (which uses `docker buildx bake`) is not supported with Podman. Use `podman build` directly with the Dockerfiles in `releases/` for local image development. |
There was a problem hiding this comment.
Signed-off-by: Pascal Zimmermann <pascal.zimmermann01@sap.com>
Signed-off-by: ZPascal <pascal.zimmermann01@sap.com>
d077578 to
f45c240
Compare
Summary
aliasing required.
(assets/base-chart/templates/network-policy.yaml); https://github.com/kubernetes-sigs/kindnet provides pod networking instead. assets/values/cilium-podman.yaml documents a degraded-mode Cilium config for opt-in use.
ARM / Apple Silicon limitations
The CF application workload layer is amd64-only:
CF platform components (gorouter, diego, CAPI, etc.) build and run natively on ARM; only app workloads are restricted to amd64.
Rootless Podman limitations