-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat: allow nginx / docker-gen network segregation #2279
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
feat: allow nginx / docker-gen network segregation #2279
Conversation
8bcb1c7
to
5ed66ea
Compare
92316cd
to
390223a
Compare
dc9a559
to
b14140f
Compare
* fix tests * remove obsolete compose version
b14140f
to
c338e1b
Compare
@buchdag sorry to ping you, but is there a chance that this gets merged? |
@Knapoc yes I'd like to see this merged, but I know I worked on it on a different computer last december and it looks like I lost my work. I can't remember everything I did but I think I made the label configurable. |
@Knapoc I was able to remember what I did and pushed that in this branch:
The tests on this branch are okay. If you're okay with those change I can add them to your PR's branch and merge the PR. |
@buchdag your changes make total sense and provide a cleaner solution. I'm totally fine with them. Also thank you for considering this feature/pull requests. |
@Knapoc thank you for the PR and sorry for the long wait 😅 |
The tests seems to be a bit flaky. Failing for me most of the time. |
@SchoNie indeed the tests for the feature I added (custom label) seems flaky, I'll remove the feature and test for now until I can understand what's happening / reproduce what's going on during tests. |
This PR adds the ability to allow for network segregation of the nginx and docker-gen containers in a separate container setup.
As of now this is not possible as it is assumed, that docker-gen and nginx are attached to the same networks.
In case
docker-gen would set the server to a fallback-entry within the upstream directive.
This behavior is changed with this PR when the nginx-container is known to docker-gen (by having a label applied). In this case the fallback-entry is only set, when the backend is not available to nginx.