Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abort if namespace doesn't exist or terminating #96277

Merged
merged 1 commit into from Nov 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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