Merge pull request #84123 from smarterclayton/terminating_cause

Handle namespace deletion more gracefully in built-in controllers
This commit is contained in:
Kubernetes Prow Robot
2019-11-04 07:55:41 -08:00
committed by GitHub
17 changed files with 131 additions and 33 deletions

View File

@@ -506,6 +506,11 @@ func (e *EndpointController) syncService(key string) error {
// 2. policy is misconfigured, in which case no service would function anywhere.
// Given the frequency of 1, we log at a lower level.
klog.V(5).Infof("Forbidden from creating endpoints: %v", err)
// If the namespace is terminating, creates will continue to fail. Simply drop the item.
if errors.HasStatusCause(err, v1.NamespaceTerminatingCause) {
return nil
}
}
if createEndpoints {