Skip to content

Support for containers attached to Docker networks #21

@SpComb

Description

@SpComb

Currently clusterf-docker only allows advertising a single named Docker network, and only looks at the container.NetworkSettings.IPAddress / container.NetworkSettings.GlobalIPv6Address when configuring a ServiceBackend. These are only used for the default docker bridge network.

clusterf-docker should also support advertising clusterf Routes for other Docker networks, using docker network create --label net.qmsk.route=... labels for configuration. clusterf-docker should then recognize containers attached to any of these advertised Docker networks, and advertise any labeled clusterf service ServiceBackend using the container's address within that Docker network.

Succesfully using a Docker network for clusterf-ipvs masq forwarding requires that the machine advertising the route also acts as the default gateway for any Docker containers on that network. This is trivial for local host-scoped Docker networks which can always use the host machine as their gateway, but will not work for global-scoped networks like Docker swarm's overlay that use a single network address space for all containers.

The choice of what Docker network to use is straightforward for a container that only has a single Docker network that is advertised. A Docker Container with clusterf service labels that is not attached to any exported network is an error. A Docker Container attached to multiple advertised networks should also be an error, optionally using some label to explicitly select a single network/route for use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions