Invalidate stale router cache entry with podIP's for deleted pods. (#546)

The router's cache entry for a function might become stale if the pod that had the function specialized gets deleted somehow. In such a case, we'd retry getting a new service for the function from executor and retry forwarding the user request to the newly created service.
This commit is contained in:
smruthi2187
2018-04-05 13:47:47 -07:00
committed by GitHub
parent db2f620121
commit 8014c83b02
10 changed files with 302 additions and 90 deletions
+5
View File
@@ -75,3 +75,8 @@ func (fmap *functionServiceMap) assign(f *metav1.ObjectMeta, serviceUrl *url.URL
// ignore error
}
}
func (fmap *functionServiceMap) remove(f *metav1.ObjectMeta) error {
mk := keyFromMetadata(f)
return fmap.cache.Delete(*mk)
}