Skip to content

Commit

Permalink
Merge pull request #13 from marcincuber/feat/karpenter-v1-policy-update
Browse files Browse the repository at this point in the history
update karpenter controller policy for v1 support
  • Loading branch information
marcincuber authored Aug 16, 2024
2 parents 1240b63 + eefb438 commit 8987918
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions terraform/oidc-iam-policies.tf
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,15 @@ data "aws_iam_policy_document" "karpenter_controller" {
]
}

condition {
test = "StringEquals"
variable = "aws:RequestTag/eks:eks-cluster-name"

values = [
local.eks_cluster_name
]
}

condition {
test = "StringEquals"
variable = "ec2:CreateAction"
Expand Down Expand Up @@ -458,11 +467,21 @@ data "aws_iam_policy_document" "karpenter_controller" {
]
}

condition {
test = "StringEqualsIfExists"
variable = "aws:RequestTag/eks:eks-cluster-name"

values = [
local.eks_cluster_name
]
}

condition {
test = "ForAllValues:StringEquals"
variable = "aws:TagKeys"

values = [
"eks:eks-cluster-name",
"karpenter.sh/nodeclaim",
"Name"
]
Expand Down

0 comments on commit 8987918

Please sign in to comment.