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

Fix AWS IAM permissions example for Karpenter #3712

Closed
sergkondr opened this issue Apr 6, 2023 · 1 comment · Fixed by #3726
Closed

Fix AWS IAM permissions example for Karpenter #3712

sergkondr opened this issue Apr 6, 2023 · 1 comment · Fixed by #3726
Labels
documentation Improvements or additions to documentation

Comments

@sergkondr
Copy link
Contributor

Is an existing page relevant?

https://karpenter.sh/preview/getting-started/migrating-from-cas/

What karpenter features are relevant?

Hi Karpenter team!

In the documentation, you give an example of the IAM policy:

        {
            "Action": "ec2:TerminateInstances",
            "Condition": {
                "StringLike": {
                    "ec2:ResourceTag/Name": "*karpenter*"
                }
            },
            "Effect": "Allow",
            "Resource": "*",
            "Sid": "ConditionalEC2Termination"
        },

However, if the "Name" tag has a different value, it may result in Karpenter drain nodes that cannot be terminated. This, in turn, causes the nodes to be unavailable for scheduling new pods, thereby exceeding the limit on the number of nodes and preventing new pods from being scheduled.

How should the docs be improved?

Would something like this be better?

  statement {
    actions = [
      "ec2:TerminateInstances",
    ]
    effect    = "Allow"
    resources = ["*"]
    condition {
      test     = "StringLike"
      values   = ["*"]
      variable = "ec2:ResourceTag/karpenter.sh/provisioner-name"
    }
  }

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 "me too" comments, 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
@ellistarn
Copy link
Contributor

Would you be willing to cut a PR for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
2 participants