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
deflake kube-root-ca.crt e2e test #96274
Conversation
/cc @liggitt /sig auth |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: zshihang The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The controller is logging many attempt to create that are getting 404 errors:
It is not handling the case where a namespace is deleted properly, which is backing up the queue with retry attempts. I think we need this: diff --git a/pkg/controller/certificates/rootcacertpublisher/publisher.go b/pkg/controller/certificates/rootcacertpublisher/publisher.go
index 34fd3127a5d..ee8925cb3f9 100644
--- a/pkg/controller/certificates/rootcacertpublisher/publisher.go
+++ b/pkg/controller/certificates/rootcacertpublisher/publisher.go
@@ -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 |
I don't think this will be needed after #96277, but keep an eye on the testgrid to be sure |
passing after #96277 |
What type of PR is this?
/kind flake
What this PR does / why we need it:
flaky in https://k8s-testgrid.appspot.com/sig-auth-gce#gce
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?: