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

feat: Extend more control over Karpenter permissions for 0.32+ changes #315

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

bryantbiggs
Copy link
Contributor

@bryantbiggs bryantbiggs commented Nov 15, 2023

What does this PR do?

  • Extend more control over Karpenter permissions for 0.32+ changes
  • Remove the doubly redundant !var.karpenter_enable_instance_profile_creation conditional on the Karpenter instance profile

Motivation

  • With this change, users now have the ability to change the permissions used by the Karpenter IRSA to something like:
module "eks_blueprints_addons" {
  source = "aws-ia/eks-blueprints-addons/aws"
  
  ...
  enable_karpenter = true
  karpenter = {
    irsa_tag_key   = "aws:ResourceTag/karpenter.sh/nodepool"
    irsa_tag_value = "*" 
  }
}
  • This change also extends the current value patterns for the Name tag value to include *ec2.internal which has been reported as another common name pattern
  • The instance profile changes is meant to support users migrating from <= 0.31 to 0.32+ where Karpenter starts creating the instance profile that it will use. This change allows the current instance profile to stay around longer until users decide its safe to remove by using:
module "eks_blueprints_addons" {
  source = "aws-ia/eks-blueprints-addons/aws"
  
  ...
  enable_karpenter = true
  karpenter_node = {
    create_instance_profile = false
  }
}

More

  • Yes, I have tested the PR using my local account setup (Provide any test evidence report under Additional Notes)
  • Yes, I ran pre-commit run -a with this PR

For Moderators

  • E2E Test successfully complete before merge?

Additional Notes

@bryantbiggs bryantbiggs requested a review from a team as a code owner November 15, 2023 15:42
Copy link
Contributor

@rodrigobersa rodrigobersa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bryantbiggs bryantbiggs merged commit c9690d6 into main Nov 15, 2023
8 checks passed
@bryantbiggs bryantbiggs deleted the feat/karpenter branch November 15, 2023 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants