Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: Use container names for upstream names to avoid repeats#1938

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
rhansen wants to merge1 commit intonginx-proxy:main
base:main
Choose a base branch
Loading
fromrhansen:upstream

Conversation

rhansen
Copy link
Collaborator

@rhansenrhansen commentedApr 6, 2022
edited
Loading

Note: This depends on PR#2127, and will be marked as draft until that PR is merged.

@buchdag
Copy link
Member

{{- /* TODO: Replace the next few lines with a call tojoin once nginx-proxy has a version of
docker-gen that includesnginx-proxy/docker-gen#418. */}}

I'm on it:#1940

@rhansen
Copy link
CollaboratorAuthor

Thanks for updating docker-gen. I rebased and switched to thejoin function.

@buchdag
Copy link
Member

Thanks for the PR, unfortunately we can't make this behaviour a default one because a lot of people have custom configurations that rely on upstream names being equal to the hostnames.

See#1725,#1693 (comment),#1736 plus the release notes of version0.9.2 and0.9.3.

@rhansen
Copy link
CollaboratorAuthor

I updated the PR to keep the current behavior by default.

@rhansen
Copy link
CollaboratorAuthor

Friendly ping@buchdag

@rhansenrhansenforce-pushed theupstream branch 3 times, most recently from75c1402 tob5da566CompareJanuary 1, 2023 23:22
@rhansenrhansen marked this pull request as draftJanuary 1, 2023 23:26
@rhansen
Copy link
CollaboratorAuthor

Marking as draft until#2127 is merged.

@rhansenrhansenforce-pushed theupstream branch 3 times, most recently from8554677 to2664d2aCompareJanuary 13, 2023 03:35
@rhansenrhansenforce-pushed theupstream branch 2 times, most recently fromf9a01fe tod9b6c54CompareJanuary 17, 2023 05:58
@rhansenrhansen marked this pull request as ready for reviewJanuary 17, 2023 23:07
@rhansenrhansenforce-pushed theupstream branch 2 times, most recently fromf427fdd to78c82e9CompareJanuary 24, 2023 02:47
@rhansenrhansenforce-pushed theupstream branch 2 times, most recently fromcddce7f toeef4e4aCompareJanuary 29, 2023 23:54
@rhansenrhansenforce-pushed theupstream branch 2 times, most recently fromdc6fa03 to8db5b82CompareFebruary 1, 2023 08:20
@rhansenrhansen requested a review frombuchdagFebruary 9, 2023 08:22
@buchdag
Copy link
Member

buchdag commentedMay 9, 2023
edited
Loading

@rhansen sorry for the incredibly long delay on this one. I've tested the PR, and I'm still a bit confused about it.

Does it provide any advantage / behaviour change when not usingVIRTUAL_PATH ?

What kind of issue could the "repeat" of upstreams when usingVIRTUAL_PATH cause ?

I feel like I'm completely missing the point but I seem unable to grasp what issue this PR is attempting to solve or its benefits against its non trivial added complexity. 🤔

I also don't think it could realistically be made default as it would made upstream name somewhere between very hard to predict and unpredictable on systems or setups where container names are dynamically generated or containers replica dynamically started / stopped.

@rhansen
Copy link
CollaboratorAuthor

Does it provide any advantage / behaviour change when not usingVIRTUAL_PATH ?

Yes. Currently, if a single container is used for multiple vhosts (e.g.,VIRTUAL_HOST: foo.example,bar.example) then multiple identicalupstream blocks are created, one per vhost. With this change only oneupstream is generated and shared with both vhosts.

What kind of issue could the "repeat" of upstreams when usingVIRTUAL_PATH cause ?

VIRTUAL_PATH is irrelevant to this change.

I think the repeated upstreams could theoretically cause minor load balancing issues.

I feel like I'm completely missing the point but I seem unable to grasp what issue this PR is attempting to solve or its benefits against its non trivial added complexity. thinking

It's been a year so a lot has slipped away from memory, but IIRC my main motivation was to facilitate a fix for#1504. Give me some time to recall what I was doing and I'll update the commit message with some rationale.

I also don't think it could realistically be made default as it would made upstream name somewhere between very hard to predict and unpredictable on systems or setups where container names are dynamically generated or containers replica dynamically started / stopped.

Hmm, that's a good point. Let me think about this some more to see if there's a good general solution that checks all of these boxes:

  • avoids duplicates
  • avoids the need to encode a path in the upstream name
  • is stable
  • is predictable
  • is human-readable

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@buchdagbuchdagAwaiting requested review from buchdag

At least 1 approving review is required to merge this pull request.

Assignees

@buchdagbuchdag

Labels
type/featPR for a new feature
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@rhansen@buchdag

[8]ページ先頭

©2009-2025 Movatter.jp