mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 16:06:51 +00:00
Rate limit HPA controller to sync period
Since the HPA controller pulls information from an external source that makes no guarantees about consistency, it's possible for the HPA to get into an infinite update loop -- if the metrics change with every query, the HPA controller will run it's normal reconcilation, post a status update, see that status update itself, fetch new metrics, and if those metrics are different, post another status update, and repeat. This can lead to continuously updating a single HPA. By rate-limiting each HPA to once per sync interval, we prevent this from happening.
This commit is contained in:
@@ -490,7 +490,7 @@ func (tc *testCase) runTest(t *testing.T) {
|
||||
)
|
||||
|
||||
eventClient := &clientfake.Clientset{}
|
||||
eventClient.AddReactor("*", "events", func(action core.Action) (handled bool, ret runtime.Object, err error) {
|
||||
eventClient.AddReactor("create", "events", func(action core.Action) (handled bool, ret runtime.Object, err error) {
|
||||
tc.Lock()
|
||||
defer tc.Unlock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user