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: Override karpenter instance profile name #325

Merged

Conversation

blakepettersson
Copy link
Contributor

@blakepettersson blakepettersson commented Dec 4, 2023

What does this PR do?

There is a pre-existing variable in karpenter which can override the instance profile name, but it's only applied for the Helm chart. For the instance profile name itself it's not used. Here we change the name to instead use instance_profile_name as a default, and only if it is not set then local.karpenter_node_iam_role_name is used.

Motivation

We have a pre-existing Karpenter setup (in Argo CD) which assumes a different instance profile name than the one being set.

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

There is a pre-existing variable in `karpenter` which can override the
instance profile name, but it's only applied for the Helm chart. For
the instance profile name itself it's not used. We use
`instance_profile_name` as a default, and only if it is not set
`local.karpenter_node_iam_role_name` is instead used.
@blakepettersson blakepettersson requested a review from a team as a code owner December 4, 2023 11:58
Copy link

github-actions bot commented Jan 5, 2024

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Jan 5, 2024
@blakepettersson
Copy link
Contributor Author

Any opinions on this PR @csantanapr @bryantbiggs?

@github-actions github-actions bot removed the stale label Jan 6, 2024
Copy link
Contributor

@csantanapr csantanapr left a comment

Choose a reason for hiding this comment

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

This change LGTM, @bryantbiggs could you double check?

Copy link
Contributor

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

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

clarified the names a bit since there are two different use cases - the name passed to the instance profile the module creates, and the name passed to the Helm chart for Karpenter to use

@bryantbiggs bryantbiggs merged commit 9b865f1 into aws-ia:main Feb 2, 2024
6 checks passed
@blakepettersson blakepettersson deleted the fix/override-instance-profile-name branch February 2, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants