You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* try to upgrade to 20241010143419
* Revert "try to upgrade to 20241010143419"
This reverts commit c0d8118.
* k8s.io/client-go v0.29.14
* meta about deleted pods expires too
* metric for metric on len k8s meta
* Revert "metric for metric on len k8s meta"
This reverts commit 2cd40c2.
* deletedPodsCounter
Copy file name to clipboardExpand all lines: plugin/input/k8s/meta/gatherer.go
+11-6Lines changed: 11 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,7 @@ var (
70
70
DisableMetaUpdates=false
71
71
metaAddedCounter atomic.Int64
72
72
expiredItemsCounter atomic.Int64
73
+
deletedPodsCounter atomic.Int64
73
74
74
75
CriType="docker"
75
76
NodeLabels=make(map[string]string)
@@ -163,6 +164,7 @@ func initInformer() {
163
164
pod:=obj.(*corev1.Pod)
164
165
PutMeta(pod)
165
166
deletedPodsCache.Add(PodName(pod.Name), true)
167
+
deletedPodsCounter.Inc()
166
168
},
167
169
}, cache.Indexers{})
168
170
controller=c
@@ -189,11 +191,19 @@ func removeExpired() {
189
191
cleanUpItems(expiredItems)
190
192
191
193
ifMaintenanceInterval>time.Second {
192
-
localLogger.Infof("k8s meta stat for last %d seconds: total=%d, updated=%d, expired=%d", MaintenanceInterval/time.Second, getTotalItems(), metaAddedCounter.Load(), expiredItemsCounter.Load())
194
+
localLogger.Infof(
195
+
"k8s meta stat for last %d seconds: total=%d, updated=%d, expired=%d, deleted=%d",
0 commit comments