From 57dd49d9fcb7478cb66defb38bfa111392a2f1ce Mon Sep 17 00:00:00 2001 From: Enxebre Date: Wed, 30 Oct 2019 11:41:31 +0100 Subject: [PATCH] UPSTREAM: : openshift: Revert "Adding config for event filtering" This reverts commit 6601bf0598140884ed06d37123da6d1c310a45fa. See https://github.com/kubernetes/autoscaler/issues/2495 --- .../utils/kubernetes/factory.go | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/cluster-autoscaler/utils/kubernetes/factory.go b/cluster-autoscaler/utils/kubernetes/factory.go index 7a611104d577..2ab478b5f2db 100644 --- a/cluster-autoscaler/utils/kubernetes/factory.go +++ b/cluster-autoscaler/utils/kubernetes/factory.go @@ -27,31 +27,12 @@ import ( "k8s.io/klog" ) -const ( - // Rate of refill for the event spam filter in client go - // 1 per event key per 5 minutes. - defaultQPS = 1. / 300. - // Number of events allowed per event key before rate limiting is triggered - // Has to greater than or equal to 1. - defaultBurstSize = 1 - // Number of distinct event keys in the rate limiting cache. - defaultLRUCache = 8192 -) - // CreateEventRecorder creates an event recorder to send custom events to Kubernetes to be recorded for targeted Kubernetes objects func CreateEventRecorder(kubeClient clientset.Interface) kube_record.EventRecorder { - eventBroadcaster := kube_record.NewBroadcasterWithCorrelatorOptions(getCorrelationOptions()) + eventBroadcaster := kube_record.NewBroadcaster() eventBroadcaster.StartLogging(klog.V(4).Infof) if _, isfake := kubeClient.(*fake.Clientset); !isfake { eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: v1core.New(kubeClient.CoreV1().RESTClient()).Events("")}) } return eventBroadcaster.NewRecorder(scheme.Scheme, clientv1.EventSource{Component: "cluster-autoscaler"}) } - -func getCorrelationOptions() kube_record.CorrelatorOptions { - return kube_record.CorrelatorOptions{ - QPS: defaultQPS, - BurstSize: defaultBurstSize, - LRUCacheSize: defaultLRUCache, - } -}