-
Notifications
You must be signed in to change notification settings - Fork 687
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
Change resource name to store if duplicate found #2230
Merged
kflynn
merged 5 commits into
emissary-ingress:master
from
concaf:concaf/fix/mappings-same-name
Jan 24, 2020
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6e88048
Change resource name to store if duplicate found
concaf ae9f2e0
Add same ingress multiple namespaces test
concaf 8fad8d3
Update Ingress status by name.namespace
concaf 7e597dd
Add same mapping different namespaces test
concaf 011cc0b
Merge branch 'master' into concaf/fix/mappings-same-name
concaf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why changing the resource name done in an
else
block? It currently feels like we handle an edge-case, yet I'm pretty sure allresource.name
could include the namespace from the moment they are handled.Following the logic here, it seems given resources:
{name: something, namespace: a}
and{name: something, namespace: b}
, we would end up with 2 resources named:something
andsomething.b
where we don't associate the namespace to the first resource we put in storage.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're correct. This is what I tried to explain at #2230 (comment) that we need to identify all resources with both name and namespace, and that's what I tried to do in the first go - but it turned out to be a much more intrusive change for the following reasons -
So, yes, this is more or less handling of an edge case without breaking the status quo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll definitely need to handle the larger case, but, yeah, got it.