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

Service Account IAM Role names are too long #10382

Closed
rifelpet opened this issue Dec 8, 2020 · 3 comments
Closed

Service Account IAM Role names are too long #10382

rifelpet opened this issue Dec 8, 2020 · 3 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@rifelpet
Copy link
Member

rifelpet commented Dec 8, 2020

The service account IAM roles created by the PublicJWKS feature flag can exceed the IAM role name length limit. See the failing job logs here.

W1206 04:58:15.902425 1067 executor.go:131] error running task "IAMRole/dns-controller.kube-system.sa.e2e-kops-scenario-public-jwks.test-cncf-aws.k8s.io" (5m52s remaining to succeed): error getting role: ValidationError: 1 validation error detected: Value 'dns-controller.kube-system.sa.e2e-kops-scenario-public-jwks.test-cncf-aws.k8s.io' at 'roleName' failed to satisfy constraint: Member must have length less than or equal to 64

A reasonable solution would be to hash a portion of the name:

return serviceAccount.Name + "." + serviceAccount.Namespace + ".sa." + b.ClusterName(), nil

but I'm wondering if others have opinions about which portion(s) to hash. We still don't tag IAM roles even though they support tagging, so to maintain discoverability to users we could add the service account name and namespace as tags in addition to the usual cloud tags.

@rifelpet rifelpet added the kind/bug Categorizes issue or PR as related to a bug. label Dec 8, 2020
@justinsb
Copy link
Member

I implemented a workaround for the failing test in #10437.

I really like the idea of tagging these roles now that they support tagging - it would make cleanup easier, and we could detect collisions (unlikely as they are)

@rifelpet
Copy link
Member Author

rifelpet commented Jan 7, 2021

confirmed this is no longer an issue
/close

@k8s-ci-robot
Copy link
Contributor

@rifelpet: Closing this issue.

In response to this:

confirmed this is no longer an issue
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants