Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upk8s Discoverer never stops sending updates even when there are no changes. #4518
Comments
krasi-georgiev
added
kind/bug
component/service discovery
labels
Aug 20, 2018
This comment has been minimized.
This comment has been minimized.
|
note: to replicate you need to remove the locking as there is another bug that blocks there.
|
This comment has been minimized.
This comment has been minimized.
|
the change happened in https://github.com/prometheus/prometheus/pull/3660/files so that we get updates even when the deployment is scaled to 0. In other words so that we send an update when all pods have been deleted. The k8s klient keeps sending updates for the old
new
There are 2 options to fix this.
option 1 would solve the problem generally even if the other providers have the same issue. |
krasi-georgiev commentedAug 20, 2018
as part of troubleshooting #4124 I figred that the k8s provider never stops sending updates.
if you put some printf's you will see that it keeps sending updated even when there are no changes in the k8s cluster.
prometheus/discovery/manager.go
Lines 143 to 153 in f571b69
if you add some printf's in the same corresponding block in v2.0.0 it stops sending updates when there are no changes.
prometheus/discovery/discovery.go
Lines 253 to 287 in 0a74f98
I am thinking something changed at some point when refactoring the k8s code, updating the k8s client or fixing the bug with the namespaces.
ping @cofyc , @simonpasquier