Skip to content

Commit

Permalink
Revert "Make v1 and v1beta policies mutually exclusive"
Browse files Browse the repository at this point in the history
This reverts commit 0db1769.
  • Loading branch information
coord-e committed Oct 29, 2024
1 parent c820fe1 commit f4200c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/karpenter/controller_iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ data "aws_iam_policy_document" "karpenter_controller_assume_role_policy" {
}

resource "aws_iam_role_policy" "karpenter_controller_v1_beta" {
count = var.v1 ? 0 : 1
count = var.v1beta ? 1 : 0
name = "KarpenterController-v1beta"
role = aws_iam_role.karpenter_controller.id
policy = data.aws_iam_policy_document.karpenter_controller_v1_beta.json
Expand Down
10 changes: 8 additions & 2 deletions modules/karpenter/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@ variable "oidc_config" {
})
}

variable "v1beta" {
description = "Enable controller policy for v1beta resources (Karpenter >= 0.32.*)"
type = bool
default = true
}

variable "v1" {
description = "Use controller policy for v1 resources (Karpenter >= 1.*)"
description = "Enable controller policy for v1 resources (Karpenter >= 1.*)"
type = bool
default = false
default = true
}

variable "additional_node_role_arns" {
Expand Down

0 comments on commit f4200c1

Please sign in to comment.