Skip to content

Conversation

@neaggarwMS
Copy link
Member

Cache the PodIp which is added in the ipset so that it gets cleaned up deterministically as Pod DeleteEvent callback is asynchronous.

In case Pod DeleteEvent is received after ip has been reassigning to another POD deployed in the same namespace, then there wont be any ipset change.

@codecov
Copy link

codecov bot commented Jul 1, 2020

Codecov Report

Merging #600 into master will increase coverage by 0.20%.
The diff coverage is 96.00%.

@@            Coverage Diff             @@
##           master     #600      +/-   ##
==========================================
+ Coverage   39.88%   40.08%   +0.20%     
==========================================
  Files          42       42              
  Lines        4586     4595       +9     
==========================================
+ Hits         1829     1842      +13     
+ Misses       2502     2500       -2     
+ Partials      255      253       -2     

@neaggarwMS neaggarwMS marked this pull request as ready for review July 2, 2020 20:57
@neaggarwMS neaggarwMS requested review from csfmomo and jaer-tsun July 2, 2020 20:57
@neaggarwMS neaggarwMS force-pushed the npm_handle_podupdates branch from 4375a35 to 4fb531f Compare July 6, 2020 18:07
@neaggarwMS neaggarwMS force-pushed the npm_handle_podupdates branch from 4fb531f to 6253ad8 Compare July 8, 2020 23:08
@Azure Azure deleted a comment from neaggarwMS Jul 9, 2020
npm/ipsm/ipsm.go Outdated
}

// Now cleanup the cache
if _, exists := ipsMgr.setMap[setName].elements[ip]; exists {
Copy link
Contributor

@csfmomo csfmomo Jul 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit pick, I think this condition check has already been done in line 285, we can go ahead and cleanup the cache.

@neaggarwMS neaggarwMS merged commit 508a2bb into Azure:master Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants