Skip to content

Commit 1f9aa37

Browse files
authored
Add comment to help debug test failures (#588)
*Issue #, if available:* N/A *Description of changes:* Adds a comment to our e2e tests to help debug failures when using EKS Pod Identity --- By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
1 parent 81ae00f commit 1f9aa37

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/e2e-kubernetes/testsuites/credentials.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,11 @@ func waitUntilRoleIsAssumableWithWebIdentity(ctx context.Context, f *framework.F
11561156
}
11571157

11581158
func waitUntilRoleIsAssumableWithEKS(ctx context.Context, f *framework.Framework, sa *v1.ServiceAccount, pod *v1.Pod) {
1159-
framework.Logf("Waiting until IAM role for ServiceAccount %s is assumable for EKS Pod Identity", sa.Name)
1159+
// If you're seeing the following error, then it means you've made a typo in the cluster name when running the tests!
1160+
// [FAILED] operation error EKS Auth: AssumeRoleForPodIdentity, https response error StatusCode: 404, RequestID:
1161+
// ResourceNotFoundException: The token included in the request has no service account role association for it.
1162+
1163+
framework.Logf("Waiting until IAM role for ServiceAccount %s is assumable for EKS Pod Identity (%s, %s, %s)", sa.Name, pod.Name, pod.UID, pod.Namespace)
11601164

11611165
saClient := f.ClientSet.CoreV1().ServiceAccounts(sa.Namespace)
11621166
serviceAccountToken, err := saClient.CreateToken(ctx, sa.Name, &authenticationv1.TokenRequest{

0 commit comments

Comments
 (0)