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

Allow additional_node_role_arns to be specified on karpenter #353

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/karpenter/controller_iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ data "aws_iam_policy_document" "karpenter_controller" {
statement {
sid = "AllowPassingInstanceRole"
effect = "Allow"
resources = [aws_iam_role.karpenter_node.arn]
resources = concat([aws_iam_role.karpenter_node.arn], var.additional_node_role_arns)
actions = ["iam:PassRole"]

condition {
Expand Down
12 changes: 12 additions & 0 deletions modules/karpenter/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,15 @@ variable "oidc_config" {
arn = string
})
}

variable "additional_node_role_arns" {
description = <<-EOF
Additional Node Role ARNS that karpenter should manage

This can be used where karpenter is using existing node
roles, and you want to transition to the namespaced role
created by this module
EOF
type = list(string)
default = []
}
Loading