Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue where k8s ingresses are sometimes not deleted (linkerd#1810)
Problem Linkerd's io.l5d.ingress identifier watches ingress resources in order to function as an ingress controller in k8s. This watch receives events from k8s and relies on a resourceVersion to make sure the most up to date ingress is being used. The resourceVersion is supposedly a number that increases after a change event occurs on a resource. For a particular ingress resource, its resourceVersion increases after Add, Modify and Change events. Sometimes k8s returns a resourceVersion that is unchanged. Linkerd does not recognize this as a change since it expects a resourceVersion to always be larger than the previously observed resource and therefore does not update its IngressCache. Solution The solution is rather simple. When Linkerd encounters a resourceVersion that is the same as the the previously observed we do not ignore the event and notify the ingress watch process to update the IngressCache Validation Tests were done on a locally running Linkerd instance connected to k8s running on docker. Linkerd was able to update its IngressCache when an ingress was deleted in k8s. Fixes linkerd#1791 Signed-off-by: Dennis Adjei-Baah [email protected]
- Loading branch information