-
-
Notifications
You must be signed in to change notification settings - Fork 319
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
Enable game server ip address allocation for macvlan driver. #134
base: develop
Are you sure you want to change the base?
Enable game server ip address allocation for macvlan driver. #134
Conversation
2dd9c0a
to
8bc3820
Compare
I just rebased to the current develop and resolved the conflict. |
8bc3820
to
c3e346c
Compare
Made some tests, this PR needs more love:
|
Issue: For macvlan driver default docker config assign first available ip. Game servers get ip assigned in order of container creation. Solution proposal: Wings support only one docker network for each game server. To assign correct IP default allocation could be used. Allocations doesn't limit IPs at all, admin could set desired game server container ip and port by default allocation.
c3e346c
to
86842da
Compare
BriefChanges only affect the Server and Server Installer on Wings with configuration For those who do not want to wait for the merge (which may never happen), I provide the build and source I use: Tested cases:
Example configuration:Examples use Cloudflare DNS ( Additional Wing compose configuration (docker-compose.yml)networks:
services_net: # external macvlan network definition
external: true
name: "mvl115"
services:
wings:
image: ghcr.io/madpeteguy/wings:v1.7.2_mvl # My own build based on pterodactyl/wings:v1.7.2 with proposed fix
networks:
services_net: # uses external network only
ipv4_address: 192.168.115.152 # IP for Wings container (not for servers)
# remove other networks
dns: # dns config to have internet on macvlan only container
- 1.1.1.1
- 1.0.0.1 Additional Wing configuration (/etc/pterodactyl/config.yml)docker:
network:
interface: 192.168.115.1 # Not sure if that is correct or what it's for, on my setup it is network router interface.
dns: # Required for docker macvlans as they do not get configs from dhcp
- 1.1.1.1
- 1.0.0.1
name: mvl115 # Docker macvlan network name (must be created before use, haven't tested if wings will make valid network)
driver: macvlan # driver that this fix is all about
network_mode: mvl115 # I do not remember why it is set to network name :/
is_internal: false # network must exist so it is not internal
interfaces:
v4:
subnet: 192.168.115.0/24
gateway: 192.168.115.1 # Set on container interface as gateway Panel configI will not describe how to connect the Panel to the Wings. Allocation
ScreenshotsNode allocations (all three Servers are accessible by assigned IP Addresses): |
@madpeteguy this is a wonderful write up. My Pterodactyl VMs just died recently and I'm looking to revisit this project and I'd really like to have everything nicely integrated into unRAID. |
@Kieranwest Based on this PR and the low interest in mvl support, I think so. But I haven't updated since 1.10.3, So i cant tell for sure. |
I hope they will review this. It's a good feature especially for those who are using |
I'm not a Go programmer, please double check my code!
Issue (pterodactyl/panel#3865):
For macvlan driver default docker config assign first available ip.
Game servers get ip assigned in order of container creation.
Solution proposal:
Wings support only one docker network for each game server.
To assign correct IP default allocation could be used.
Allocations doesn't limit IPs at all, admin could set desired game server container ip and port by default allocation.
Risks: