Commit 57ad590d authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #30925 from caesarxuchao/gc-concurrency

Automatic merge from submit-queue Increase concurrent GC workers, adjust the polling interval and timeout in e2e test ref: https://github.com/kubernetes/kubernetes/issues/30759#issuecomment-240853949
parents 06cfb189 a0c6a664
...@@ -93,7 +93,7 @@ func NewCMServer() *CMServer { ...@@ -93,7 +93,7 @@ func NewCMServer() *CMServer {
LeaderElection: leaderelection.DefaultLeaderElectionConfiguration(), LeaderElection: leaderelection.DefaultLeaderElectionConfiguration(),
ControllerStartInterval: unversioned.Duration{Duration: 0 * time.Second}, ControllerStartInterval: unversioned.Duration{Duration: 0 * time.Second},
EnableGarbageCollector: false, EnableGarbageCollector: false,
ConcurrentGCSyncs: 5, ConcurrentGCSyncs: 100,
ClusterSigningCertFile: "/etc/kubernetes/ca/ca.pem", ClusterSigningCertFile: "/etc/kubernetes/ca/ca.pem",
ClusterSigningKeyFile: "/etc/kubernetes/ca/ca.key", ClusterSigningKeyFile: "/etc/kubernetes/ca/ca.key",
}, },
......
...@@ -3131,7 +3131,22 @@ func DeleteRCAndWaitForGC(c *client.Client, ns, name string) error { ...@@ -3131,7 +3131,22 @@ func DeleteRCAndWaitForGC(c *client.Client, ns, name string) error {
} }
deleteRCTime := time.Now().Sub(startTime) deleteRCTime := time.Now().Sub(startTime)
Logf("Deleting RC %s took: %v", name, deleteRCTime) Logf("Deleting RC %s took: %v", name, deleteRCTime)
err = waitForPodsInactive(ps, 10*time.Millisecond, 10*time.Minute) var interval, timeout time.Duration
switch {
case rc.Spec.Replicas < 100:
interval = 10 * time.Millisecond
timeout = 10 * time.Minute
case rc.Spec.Replicas < 1000:
interval = 1 * time.Second
timeout = 10 * time.Minute
case rc.Spec.Replicas < 10000:
interval = 10 * time.Second
timeout = 10 * time.Minute
default:
interval = 10 * time.Second
timeout = 40 * time.Minute
}
err = waitForPodsInactive(ps, interval, timeout)
if err != nil { if err != nil {
return fmt.Errorf("error while waiting for pods to become inactive %s: %v", name, err) return fmt.Errorf("error while waiting for pods to become inactive %s: %v", name, err)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment