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

IAM ServiceAccount Roles: truncate name at 64 characters #10437

Merged

Conversation

justinsb
Copy link
Member

The maximum IAM role name length is 64 characters, which we hit much
more often now that we are constructing complex names. Use our normal
strategy of adding a hash when we truncate.

This is not a breaking change, because these names were not valid
previously.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 16, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the area/provider/aws Issues or PRs related to aws provider label Dec 16, 2020
@justinsb
Copy link
Member Author

This is intended to fix the scenario test: https://k8s-testgrid.appspot.com/google-aws#kops-grid-scenario-public-jwks

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 16, 2020
The maximum IAM role name length is 64 characters, which we hit much
more often now that we are constructing complex names.  Use our normal
strategy of adding a hash when we truncate.

This is not a breaking change, because these names were not valid
previously.
@justinsb justinsb force-pushed the truncate_iam_serviceaccount_role branch from fba42a4 to 72329db Compare December 16, 2020 18:38
@hakman
Copy link
Member

hakman commented Dec 16, 2020

Seems related to #10382.
/cc @rifelpet

@rifelpet
Copy link
Member

/lgtm
for reference, this will truncate the offending iam role name from

dns-controller.kube-system.sa.e2e-kops-scenario-public-jwks.test-cncf-aws.k8s.io

to

dns-controller.kube-system.sa.e2e-kops-scenario-public-jw-ucdio5

which i think provides enough of the cluster name to still be useful to users viewing an account's list of IAM roles.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 16, 2020
@k8s-ci-robot k8s-ci-robot merged commit 78ea629 into kubernetes:master Dec 16, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/aws Issues or PRs related to aws provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants