You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to specification and common sense, when bootloose.yaml defines several machine sets (e.g. workers and controllers), you'd expect portMappings.hostPort to be the base for port numbers only in a given machine set, not globally. However, the counter continues through all machine replicas in all specifications that include hostPort - contrary to name field, which expands %d as replica counter in given set.
https://github.com/k0sproject/bootloose/blob/main/pkg/cluster/cluster.go#L128 is the root cause - I think user should be in more control and have proper responsibility for input file specification. If user is the only party responsible for not having name collision, then we should just allow Docker to fail when attempting to assign a port that already exists.
Current behaviour lets user control ID of machine in replica set, while internally bootloose uses absolute IDs. If in the above example, you remove hostPort from a%d spec, then b0 will still get 14003 :/
According to specification and common sense, when
bootloose.yaml
defines several machine sets (e.g. workers and controllers), you'd expectportMappings.hostPort
to be the base for port numbers only in a given machine set, not globally. However, the counter continues through all machine replicas in all specifications that includehostPort
- contrary toname
field, which expands%d
as replica counter in given set.Bootloose version:
v0.8.0
Example
bootloose.yaml
:Expected mapping for port 22 in each container created:
Actual behaviour -
bootloose show
:The text was updated successfully, but these errors were encountered: