Skip to content
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

Allow overriding custom kamal network #1006

Open
luizkowalski opened this issue Sep 29, 2024 · 4 comments · May be fixed by #1020
Open

Allow overriding custom kamal network #1006

luizkowalski opened this issue Sep 29, 2024 · 4 comments · May be fixed by #1020

Comments

@luizkowalski
Copy link

hey 👋🏻

I'm running a couple of accessories that require host network mode and since v2, Kamnal forces the usage of custom kamal network.

Is there any chance to make this option configurable? These containers do not run behind a proxy anyway so there's no need for them to be discoverable

@mblayman
Copy link
Contributor

According to the upgrade guide, the recommendation for customizing the network is to use the docker-setup hook. https://kamal-deploy.org/docs/upgrading/network-changes/

@luizkowalski
Copy link
Author

then I would need to create a network called “kamal” with host access, which is far from ideal. i dont want all containers with host access, nor have to deal with port mapping because some containers port clash and host network exposes it all

@igor-alexandrov
Copy link
Contributor

@djmb I can add a configuration option to change the network if you are okay with this.

@djmb
Copy link
Collaborator

djmb commented Sep 30, 2024

then I would need to create a network called “kamal” with host access, which is far from ideal. i dont want all containers with host access, nor have to deal with port mapping because some containers port clash and host network exposes it all

I don't think this would work - it would put the app and proxy containers in a host network as well, and then the proxy won't be able to access the app container by its container ID.

@igor-alexandrov - yes please if you have a chance to add this 👍

We'd add something like network: <name> I guess and then you can set it to network: host?

accessories:
  redis:
    image: redis:latest
    port: 6379
    network: host

@igor-alexandrov igor-alexandrov linked a pull request Oct 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants