When services share IP, modifying any service should fail instead of allocating new IP#1230
Merged
fedepaol merged 2 commits intometallb:mainfrom Mar 2, 2022
Merged
Conversation
4a18f16 to
3437e4e
Compare
rata
approved these changes
Feb 18, 2022
Contributor
rata
left a comment
There was a problem hiding this comment.
On a cursory look, this LGTM. Quite what we discussed on slack, thanks! :)
controller/controller_test.go
Outdated
| Status: statusAssigned([]string{"4.5.6.0"}), | ||
| } | ||
| if c.SetBalancer(l, "test2", svc2, k8s.EpsOrSlices{}) != k8s.SyncStateError { | ||
| t.Fatalf("SetBalancer failed") |
Contributor
There was a problem hiding this comment.
nit: setBalancer did fail, we just expected it to fail
Comment on lines
+101
to
+106
| if errors.Is(err, allocator.ErrCannotShareKey) { | ||
| c.client.Errorf(svc, "svcCannotShareKey", "current IP not allowed by config:%s", err) | ||
| return false |
Contributor
There was a problem hiding this comment.
Can we add a comment explaining why we want to return here? Either link to an issue (there is not, right? We just talked on slack, I guess?) or explain the situation briefly
…allocating newIP Users prefer seeing errors when modify services that are sharing the sameIP using "allow-shared-ip" annotation than getting newly allocated serviceIP Signed-off-by: Mohamed Mahmoud <mmahmoud@redhat.com>
3437e4e to
588065b
Compare
Member
|
LGTM |
6 tasks
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.
Users prefer seeing errors when modify services that are sharing the sameIP
using "allow-shared-ip" annotation than getting newly allocated serviceIP
Unit-test (using new test case in controller component to repro the issue)
Signed-off-by: Mohamed Mahmoud mmahmoud@redhat.com