Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: race when tunnel endpoint becomes unavailable (#58)
The current implementation using an index on the endpoint cache by pod name was flawed. A pod could be targeted by multiple services, so when processing the endpoints update for a service the pod name could be still present in an endpoints object of a different service. This could lead to missing the event that the tunnel endoint has became unavailable leaving the tunnel for this service broken until the next endpoints update. This commit removes the index entirely and explicitly searches the current endpoints object for the pod name of the current port forward. This is simpler and leaves no room for a race. Signed-off-by: Fabian Ruff <fabian.ruff@sap.com>
- Loading branch information