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

Update Karpenter controller AWS IAM role #290

Closed
jakeskyaws opened this issue Nov 1, 2023 · 1 comment
Closed

Update Karpenter controller AWS IAM role #290

jakeskyaws opened this issue Nov 1, 2023 · 1 comment

Comments

@jakeskyaws
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

What is the outcome that you are trying to reach?

The Karpenter controller uses an AWS Identity and Access Management (AWS IAM) role to grant the permissions to launch and operate Amazon Elastic Compute Cloud (Amazon EC2) instances in your AWS account. As part of the upgrade to v0.32.X , we need to make changes to the IAM role.

Describe the solution you would like

As part of the upgrade to v0.32.X, I propose creating a new permission policy for the AWS IAM role used by the Karpenter controller. This new policy should include the following changes:

  • Add the following permissions scoped down to the tag-based constraint "karpenter.sh/nodepool" instead of the previous tag key "karpenter.sh/provisioner-name":

    • ec2:RunInstances
    • ec2:CreateFleet
    • ec2:CreateLaunchTemplate
  • Grant permissions to the following actions:

    • iam:CreateInstanceProfile
    • iam:AddRoleToInstanceProfile
    • iam:RemoveRoleFromInstanceProfile
    • iam:DeleteInstanceProfile
    • iam:GetInstanceProfile

All of these permissions (except for the GetInstanceProfile permission) should be constrained by tag-based policies to ensure that the controller only has permission to operate on instance profiles that it was responsible for creating. These changes are necessary to support the Karpenter-managed instance profiles.

Describe alternatives you have considered

We have not considered any alternative solutions at this time.

Additional context

For more information on the upgrade and migration path, please refer to the Karpenter documentation.

@bryantbiggs
Copy link
Contributor

We are tracking intermediate changes to support v0.32.x+ of Karpenter in #285 - and then the larger, breaking changes to re-align Karpenter's permissions with the upstream project in #286

closing as duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants