diff --git a/pkg/controller/controller_utils.go b/pkg/controller/controller_utils.go index 8524ee4d128..127fcc5a7f7 100644 --- a/pkg/controller/controller_utils.go +++ b/pkg/controller/controller_utils.go @@ -35,21 +35,7 @@ import ( "k8s.io/kubernetes/pkg/runtime" ) -const ( - CreatedByAnnotation = "kubernetes.io/created-by" - - // If a watch drops a delete event for a pod, it'll take this long - // before a dormant controller waiting for those packets is woken up anyway. It is - // specifically targeted at the case where some problem prevents an update - // of expectations, without it the controller could stay asleep forever. This should - // be set based on the expected latency of watch events. - // - // Currently a controller can service (create *and* observe the watch events for said - // creation) about 10-20 pods a second, so it takes about 1 min to service - // 500 pods. Just creation is limited to 20qps, and watching happens with ~10-30s - // latency/pod at the scale of 3000 pods over 100 nodes. - ExpectationsTimeout = 3 * time.Minute -) +const CreatedByAnnotation = "kubernetes.io/created-by" var ( KeyFunc = framework.DeletionHandlingMetaNamespaceKeyFunc @@ -221,7 +207,7 @@ func (e *ControlleeExpectations) GetExpectations() (int64, int64) { // NewControllerExpectations returns a store for ControlleeExpectations. func NewControllerExpectations() *ControllerExpectations { - return &ControllerExpectations{cache.NewTTLStore(ExpKeyFunc, ExpectationsTimeout)} + return &ControllerExpectations{cache.NewStore(ExpKeyFunc)} } // PodControlInterface is an interface that knows how to add or delete pods diff --git a/pkg/controller/deployment/deployment_controller.go b/pkg/controller/deployment/deployment_controller.go index b1eaa67897f..a5e6c91fa4e 100644 --- a/pkg/controller/deployment/deployment_controller.go +++ b/pkg/controller/deployment/deployment_controller.go @@ -334,12 +334,12 @@ func (dc *DeploymentController) deletePod(obj interface{}) { if !ok { tombstone, ok := obj.(cache.DeletedFinalStateUnknown) if !ok { - glog.Errorf("Couldn't get object from tombstone %+v, could take up to %v before a ReplicaSet recreates a replica", obj, controller.ExpectationsTimeout) + glog.Errorf("Couldn't get object from tombstone %+v", obj) return } pod, ok = tombstone.Obj.(*api.Pod) if !ok { - glog.Errorf("Tombstone contained object that is not a pod %+v, could take up to %v before ReplicaSet recreates a replica", obj, controller.ExpectationsTimeout) + glog.Errorf("Tombstone contained object that is not a pod %+v", obj) return } } diff --git a/pkg/controller/job/controller.go b/pkg/controller/job/controller.go index b1d7a6a5838..729862aae73 100644 --- a/pkg/controller/job/controller.go +++ b/pkg/controller/job/controller.go @@ -224,12 +224,12 @@ func (jm *JobController) deletePod(obj interface{}) { if !ok { tombstone, ok := obj.(cache.DeletedFinalStateUnknown) if !ok { - glog.Errorf("Couldn't get object from tombstone %+v, could take up to %v before a job recreates a pod", obj, controller.ExpectationsTimeout) + glog.Errorf("Couldn't get object from tombstone %+v", obj) return } pod, ok = tombstone.Obj.(*api.Pod) if !ok { - glog.Errorf("Tombstone contained object that is not a pod %+v, could take up to %v before job recreates a pod", obj, controller.ExpectationsTimeout) + glog.Errorf("Tombstone contained object that is not a pod %+v", obj) return } } diff --git a/pkg/controller/replicaset/replica_set.go b/pkg/controller/replicaset/replica_set.go index eb8ec2e6419..521367c6881 100644 --- a/pkg/controller/replicaset/replica_set.go +++ b/pkg/controller/replicaset/replica_set.go @@ -283,12 +283,12 @@ func (rsc *ReplicaSetController) deletePod(obj interface{}) { if !ok { tombstone, ok := obj.(cache.DeletedFinalStateUnknown) if !ok { - glog.Errorf("Couldn't get object from tombstone %+v, could take up to %v before a replica set recreates a replica", obj, controller.ExpectationsTimeout) + glog.Errorf("Couldn't get object from tombstone %+v", obj) return } pod, ok = tombstone.Obj.(*api.Pod) if !ok { - glog.Errorf("Tombstone contained object that is not a pod %+v, could take up to %v before replica set recreates a replica", obj, controller.ExpectationsTimeout) + glog.Errorf("Tombstone contained object that is not a pod %+v", obj) return } } diff --git a/pkg/controller/replication/replication_controller.go b/pkg/controller/replication/replication_controller.go index 9aa8cab7a3f..19c38a8991d 100644 --- a/pkg/controller/replication/replication_controller.go +++ b/pkg/controller/replication/replication_controller.go @@ -285,12 +285,12 @@ func (rm *ReplicationManager) deletePod(obj interface{}) { if !ok { tombstone, ok := obj.(cache.DeletedFinalStateUnknown) if !ok { - glog.Errorf("Couldn't get object from tombstone %+v, could take up to %v before a controller recreates a replica", obj, controller.ExpectationsTimeout) + glog.Errorf("Couldn't get object from tombstone %+v", obj) return } pod, ok = tombstone.Obj.(*api.Pod) if !ok { - glog.Errorf("Tombstone contained object that is not a pod %+v, could take up to %v before controller recreates a replica", obj, controller.ExpectationsTimeout) + glog.Errorf("Tombstone contained object that is not a pod %+v", obj) return } }