Repository navigation
feat: allocate a loopback address per application - #137
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR extends the port detection introduced in #130.
Each application that is intended to be reachable from the host (the workload + COS applications) is assigned an address from 127.220.1.1, 127.220.1.2, etc, taking the first address that is not already allocated:
127.220.1.n:<port>maps to<ip>:<port>, where<ip>is the container IP.This is prep work for:
Outputting
127.220.1.n:<port>as the workload address, instead of the container IP.<port>will be the last in the set that was dialed by a passing integration test - as in #130.Rootless Podman support, where it won't be possible to connect to container IPs from the host. Our
juju statuscommand will report the allocated 127.220.1.n as the unit IP.This PR also adjusts the
--stable-portaddress from #133. The address is now 127.220.0.1. Additionally, specifying--stable-portwill force the workload to use 127.220.0.1 as its allocated address, instead of 127.220.1.n. All dialed ports are published on 127.220.0.1. We don't care which dialed port is the last that came from a passing integration test - jjx outputs the port given by--stable-port.The switch from 127.0.0.220 to 127.220.0.1 is the only change to jjx output in this PR.