-
Notifications
You must be signed in to change notification settings - Fork 37
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
Using with podman #146
Comments
ooh nice! Ya, would love to accept a PR that gets this working with podman I just tried that with the docker CLI and it seemed to work OK. We also have pretty good integration tests that will run on CI, so don't worry too much about breaking it. |
@ccakes what version of podman are you using? i was playing around with this and couldn't get the |
OK I upgraded to podman 3.4 and now see the problem. Sent out: https://github.com/tilt-dev/ctlptl/pull/new/nicks/issue146 Unfortunately, kind creation still blows up:
:\ |
Sorry for the slow reply - I was using latest podman. I got about as far as you, I suspect that making it work for rootful containers is probably not that much work but rootless (how I was trying) would be much more difficult. For rootless, it feels like the best option would be to create a pod and run both kind and the registry together in that but doing so would require more changes to ctlptl than I really feel comfortable tackling. |
Thanks to we now have a working registry with Podman. Using Podman pods to create network contexts still appears out of scope. Meanwhile it happens that a specific networking setup for K3d clusters on Podman would also be required for connecting a K3d registry to a K3d cluster (on Podman): |
I'm using ctlptl with podman but I had to create a config file in the podman VM to make it treat the registry created by ctlptl as insecure (otherwise I couldn't use it): $ cat /etc/containers/registries.conf.d/100-kind.conf
[[registry]]
location = "localhost:61358"
insecure = true A few questions:
|
Besides the registries.conf addition (I put mine in ~/.config/containers/registries.conf), for running native rootless podman under Ubuntu 23.10 (upgraded from 22.04) I also had to install the golang-github-containernetworking-plugin-dnsname package so the kind container could resolve the ctlptl-registry hostname. Since I already had the I don't think ctlptl could/should install the plugin automatically, so that might just be something that just goes in the instructions, and it might also not be needed with a fresh Ubuntu install where you've only ever used podman 4.0+, since it then uses netavark by default, which has DNS support built in. Based on https://github.com/containers/podman/blob/main/docs/tutorials/basic_networking.md#bridge, the DNS lookup issue is also be fixable by destroying all podman resources under podman 4.0+ which should switch to netavark. |
Another fun little issue with podman. |
@aaomidi ??? what command are you running? we have a lot of integration tests. the machines they run on don't even have docker-desktop installed...so that seems like an unrelated issue... |
I can reproduce the same issue... Environment Information
Steps to reproduce
apiVersion: ctlptl.dev/v1alpha1
kind: Registry
name: registry
port: 5005
---
apiVersion: ctlptl.dev/v1alpha1
kind: Cluster
name: kind-foo
product: kind
registry: registry
kindV1Alpha4Cluster:
networking:
apiServerAddress: 0.0.0.0
nodes:
- role: control-plane
- role: worker
- role: worker
- role: worker ObservationsIt seems that ctlptl always assumes docker desktop machine when Lines 191 to 200 in 5282f72
And the error is returned from the attempt of reading the settings from docker desktop.
|
@aaomidi @nicks : I found a workaround for above issue with ctlptl trying to modify docker-desktop settings during From Lines 34 to 38 in 5282f72
ctlplt detects if it's "local" docker by checking the docker daemon socket at some typical default locations. Only when it's local docker desktop, it'll try to call its APIs (which will fail for podman). Line 142 in 5282f72
Usually for a podman installation with docker compatibility, we'll synlink the podman socket to the docker socket location, like I did here:
A quick workaround is to export |
I'm trying to use this with podman using the Docker API-compat socket. It seems like it'll probably work but I've hit a snag and don't know enough about the Docker ecosystem to know the "right solution" for a PR.
Running
ctlptl apply
with config to create a registry fails. It creates the container but then can't find it to proceed with the workflow. The problem is this linectlptl/pkg/registry/registry.go
Line 106 in f5d2f38
If I change that to use the fully-qualified path
docker.io/library/registry:2
then it works fine. I'm unsure if that would also work on native Docker though, or if instead I should add a check for podman and set the filter depending on Docker v podman. Thoughts?The text was updated successfully, but these errors were encountered: