deployment: Ignore namespace termination errors when creating replicasets
Instead of reporting an event or displaying an error, simply exit when the namespace is being terminated. This reduces the amount of controller churn on namespace shutdown. Unlike other controllers, we drop the replica set create error very late (in the queue handleErr) in order to avoid changing the structure of the controller substantially.
This commit is contained in:
@@ -475,7 +475,7 @@ func (dc *DeploymentController) processNextWorkItem() bool {
|
||||
}
|
||||
|
||||
func (dc *DeploymentController) handleErr(err error, key interface{}) {
|
||||
if err == nil {
|
||||
if err == nil || errors.HasStatusCause(err, v1.NamespaceTerminatingCause) {
|
||||
dc.queue.Forget(key)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user