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

Can you pass dynamic or variable values to EC2NodeClass' role or instance profile attributes? #7175

Open
mnazir23 opened this issue Oct 7, 2024 · 2 comments
Labels
question Further information is requested

Comments

@mnazir23
Copy link

mnazir23 commented Oct 7, 2024

Description

Hi,

This is something that I would like some clarification on as I haven't been able to find anything in the documentation.

Can you pass a value from a variable to the spec.role or spec.instanceprofile attributes in EC2NodeClass file?

From what I can see from the examples, we can use the ${CLUSTER_NAME} env variable because it is global but other than that I haven't seen a variable value being passed to these attributes.

Does it need to be hardcoded for each EC2NodeClass file that we have?

Please confirm.

Thank you.

Link: https://karpenter.sh/docs/concepts/nodeclasses/#specrole

@mnazir23 mnazir23 added documentation Improvements or additions to documentation needs-triage Issues that need to be triaged labels Oct 7, 2024
@engedaam
Copy link
Contributor

You can pass in a variable for spec.role or spec.instanceprofile https://karpenter.sh/docs/getting-started/getting-started-with-karpenter/#5-create-nodepool

@engedaam engedaam added question Further information is requested and removed documentation Improvements or additions to documentation needs-triage Issues that need to be triaged labels Oct 16, 2024
@mnazir23
Copy link
Author

Hi @engedaam

Yes, you can pass pre-defined Karpenter variables to a role or an instance profile but not a custom variable value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants