-
Notifications
You must be signed in to change notification settings - Fork 260
Make throttling nmagent fetches for nodesubnet more dynamic #3023
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
Merged
santhoshmprabhu
merged 49 commits into
master
from
sanprabhu/cilium-node-subnet-intelligent-refresh
Oct 14, 2024
Merged
Changes from 45 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
3a4625e
feat(CNS): Early work on better throttling in NMAgent fetch for nodes…
santhoshmprabhu 8f00354
feat(CNS): Update NMAgent fetches to be async with binary exponential…
santhoshmprabhu 187cb66
chore: check for empty nmagent response
santhoshmprabhu e21a29f
test: update test for empty response
santhoshmprabhu c7e88fb
style: make linter happy
santhoshmprabhu ab97370
Merge remote-tracking branch 'origin/master' into sanprabhu/cilium-no…
santhoshmprabhu 8011972
chore: fix some comments
santhoshmprabhu b6bc7ad
Merge remote-tracking branch 'origin/master' into sanprabhu/cilium-no…
santhoshmprabhu b20588e
fix: Fix bug in refresh
santhoshmprabhu 4c7394d
refactor: Address comments
santhoshmprabhu 7708cc9
Merge remote-tracking branch 'origin/master' into sanprabhu/cilium-no…
santhoshmprabhu f0e3f3d
Merge branch 'master' into sanprabhu/cilium-node-subnet-intelligent-r…
santhoshmprabhu 3b07378
refactor: ignore primary ip
santhoshmprabhu c5e154e
Merge branch 'sanprabhu/cilium-node-subnet-intelligent-refresh' of gi…
santhoshmprabhu 720358b
Merge branch 'master' into sanprabhu/cilium-node-subnet-intelligent-r…
santhoshmprabhu 9ad80f5
refactor: move refresh out of ipfetcher
santhoshmprabhu 62daac4
test: add ip fetcher tests
santhoshmprabhu 72b685d
fix: remove broken import
santhoshmprabhu 90c56b7
fix: fix import
santhoshmprabhu a6f4889
fix: fix linting
santhoshmprabhu 7ed21ae
fix: fix some failing tests
santhoshmprabhu 7551a04
chore: Remove unused function
santhoshmprabhu 2a2ae20
test: test updates
santhoshmprabhu 945784f
Merge remote-tracking branch 'origin/master' into sanprabhu/cilium-no…
santhoshmprabhu f3e076c
fix: address comments
santhoshmprabhu d57810a
chore: add missed file
santhoshmprabhu 510d7cf
chore: add comment about static interval
santhoshmprabhu 7e720a7
Merge branch 'master' into sanprabhu/cilium-node-subnet-intelligent-r…
santhoshmprabhu 14be616
Merge branch 'master' into sanprabhu/cilium-node-subnet-intelligent-r…
santhoshmprabhu 8fc2a4c
Merge branch 'master' into sanprabhu/cilium-node-subnet-intelligent-r…
santhoshmprabhu 64da2bc
feat: address Evan's comment to require Equal method on cached results
santhoshmprabhu f79a6c3
chore: add missed file
santhoshmprabhu 2331766
feat: more efficient equality
santhoshmprabhu a78ae15
Merge branch 'master' into sanprabhu/cilium-node-subnet-intelligent-r…
santhoshmprabhu 2f323e6
Merge branch 'master' into sanprabhu/cilium-node-subnet-intelligent-r…
santhoshmprabhu 38c5047
refactor: address Evan's comment
santhoshmprabhu 22bdf3a
Merge branch 'sanprabhu/cilium-node-subnet-intelligent-refresh' of gi…
santhoshmprabhu c62f74a
Merge branch 'master' into sanprabhu/cilium-node-subnet-intelligent-r…
santhoshmprabhu 6ed6687
Merge branch 'master' into sanprabhu/cilium-node-subnet-intelligent-r…
santhoshmprabhu 5b64c2e
Merge branch 'master' into sanprabhu/cilium-node-subnet-intelligent-r…
santhoshmprabhu 1ee34c2
Merge branch 'master' into sanprabhu/cilium-node-subnet-intelligent-r…
santhoshmprabhu f8b1c64
refactor: address Tim's comment
santhoshmprabhu 8541631
fix: undo accidental commit
santhoshmprabhu cc0b7d7
Merge branch 'master' into sanprabhu/cilium-node-subnet-intelligent-r…
santhoshmprabhu 0abad88
Merge branch 'master' into sanprabhu/cilium-node-subnet-intelligent-r…
santhoshmprabhu df3d900
fix: make linter happy
santhoshmprabhu d1b1461
Merge branch 'master' into sanprabhu/cilium-node-subnet-intelligent-r…
santhoshmprabhu 0407ef0
fix: make linter happy
santhoshmprabhu b235877
Merge branch 'sanprabhu/cilium-node-subnet-intelligent-refresh' of gi…
santhoshmprabhu 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 was deleted.
Oops, something went wrong.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| package nmagent | ||
|
|
||
| // Equal compares two Interfaces objects for equality. | ||
| func (i Interfaces) Equal(other Interfaces) bool { | ||
| if len(i.Entries) != len(other.Entries) { | ||
| return false | ||
| } | ||
| for idx, entry := range i.Entries { | ||
| if !entry.Equal(other.Entries[idx]) { | ||
| return false | ||
| } | ||
| } | ||
| return true | ||
| } | ||
|
|
||
| // Equal compares two Interface objects for equality. | ||
| func (i Interface) Equal(other Interface) bool { | ||
| if len(i.InterfaceSubnets) != len(other.InterfaceSubnets) { | ||
| return false | ||
| } | ||
| for idx, subnet := range i.InterfaceSubnets { | ||
| if !subnet.Equal(other.InterfaceSubnets[idx]) { | ||
| return false | ||
| } | ||
| } | ||
| if i.IsPrimary != other.IsPrimary || !i.MacAddress.Equal(other.MacAddress) { | ||
| return false | ||
| } | ||
| return true | ||
| } | ||
|
|
||
| // Equal compares two InterfaceSubnet objects for equality. | ||
| func (s InterfaceSubnet) Equal(other InterfaceSubnet) bool { | ||
| if len(s.IPAddress) != len(other.IPAddress) { | ||
| return false | ||
| } | ||
| if s.Prefix != other.Prefix { | ||
| return false | ||
| } | ||
| for idx, ip := range s.IPAddress { | ||
| if !ip.Equal(other.IPAddress[idx]) { | ||
| return false | ||
| } | ||
| } | ||
| return true | ||
| } | ||
|
|
||
| // Equal compares two NodeIP objects for equality. | ||
| func (ip NodeIP) Equal(other NodeIP) bool { | ||
| return ip.IsPrimary == other.IsPrimary && ip.Address.Equal(other.Address) | ||
| } |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| package refresh | ||
|
|
||
| type equaler[T any] interface { | ||
| Equal(T) bool | ||
santhoshmprabhu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.