Make ConfigureIPTables idempotent and poll it
- Instead of EnsureBridge - Adds ipset.ExistEntry method - Refactor ipset method names Exist <-> EntryExists - Turn on iptable-refresh by default (10s) - Adds a test that checks iptables are refreshed, check EXPOSE recovers
This commit is contained in:
1 parent
1ff09fd4d1
commit
94e75e45af
8 files changed
+228
-74
No files matched your search
+1
-1
@@ -441,7 +441,7 @@ func (ns *ns) updateDefaultAllowIPSetEntry(oldObj, newObj *coreapi.Pod, ipsetNam
|
||||
// Instead of iterating over all selectors we check whether old pod IP
|
||||
// has been inserted into default-allow ipset to decide whether the IP
|
||||
// in the ipset has to be updated.
|
||||
if ns.ips.Exist(oldObj.ObjectMeta.UID, ipsetName, oldObj.Status.PodIP) {
|
||||
if ns.ips.EntryExists(oldObj.ObjectMeta.UID, ipsetName, oldObj.Status.PodIP) {
|
||||
|
||||
if err := ns.ips.DelEntry(oldObj.ObjectMeta.UID, ipsetName, oldObj.Status.PodIP); err != nil {
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user