Merge pull request #424 from GLYASAI/podevent

[REV]  do not record event in 10 min
This commit is contained in:
barnettZQG 2019-09-03 06:38:17 -05:00 committed by GitHub
commit 8a579ff91f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,6 +70,11 @@ func (p *PodEvent) Handle() {
for {
select {
case pod := <-p.podEventCh:
// do not record events that occur 10 minutes after startup
if time.Now().Sub(pod.CreationTimestamp.Time) > 10 * time.Minute {
continue
}
recordUpdateEvent(p.clientset, pod, defDetermineOptType)
case <-p.stopCh:
return