Skip to content

Commit

Permalink
Merge pull request #96277 from zshihang/fix
Browse files Browse the repository at this point in the history
abort if namespace doesn't exist or terminating
  • Loading branch information
k8s-ci-robot committed Nov 5, 2020
2 parents 0bb7328 + 2c378be commit e609b71
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controller/certificates/rootcacertpublisher/publisher.go
Expand Up @@ -187,6 +187,10 @@ func (c *Publisher) syncNamespace(ns string) error {
"ca.crt": string(c.rootCA),
},
}, metav1.CreateOptions{})
// don't retry a create if the namespace doesn't exist or is terminating
if apierrors.IsNotFound(err) || apierrors.HasStatusCause(err, v1.NamespaceTerminatingCause) {
return nil
}
return err
case err != nil:
return err
Expand Down

0 comments on commit e609b71

Please sign in to comment.