-
Notifications
You must be signed in to change notification settings - Fork 93
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
test/e2e: Add wait for namespace service account #1661
test/e2e: Add wait for namespace service account #1661
Conversation
When testing this locally I see that is can sometime take a while between the namespace being active and the service account being created:
so I think this was the cause of the failures before. |
In testing I saw that the default ServiceAccount for the newly created namespace wasn't always available straight away, especially as the cluster gets more namespaces in. To try and fix this I've added a new waitForNamespaceToBeUseable method and done a poll in there every 5 seconds to check if the 'default' serviceAccount is in the namespace yet Fixes: confidential-containers#1657 Signed-off-by: stevenhorsman <[email protected]>
90cb0a7
to
b32a6dd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @stevenhorsman
this is helpful to avoid we meet the error assessment_runner.go:223: pods "simple-test" is forbidden: error looking up service account coco-pp-e2e-test-947078b3/default: serviceaccount "default" not found
again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In testing I saw that the default ServiceAccount for the newly created namespace wasn't always available straight away, especially as the cluster gets more namespaces in.
To try and fix this I've added a new waitForNamespaceToBeUseable method and done a poll in there every 5 seconds to check if the 'default' serviceAccount is in the namespace yet
Fixes: #1657