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: Argo Workflow blueprint upgrade to latest Karpenter #459

Merged
merged 6 commits into from
Mar 3, 2024

Conversation

ovaleanu
Copy link
Contributor

@ovaleanu ovaleanu commented Mar 1, 2024

What does this PR do?

🛑 Please open an issue first to discuss any significant work and flesh out details/direction - we would hate for your time to be wasted.
Consult the CONTRIBUTING guide for submitting pull-requests.

Upgrade Karpenter version for Argo Workflow blueprint

Motivation

#413

More

  • Yes, I have tested the PR using my local account setup (Provide any test evidence report under Additional Notes)
  • Mandatory for new blueprints. Yes, I have added a example to support my blueprint PR
  • Mandatory for new blueprints. Yes, I have updated the website/docs or website/blog section for this feature
  • Yes, I ran pre-commit run -a with this PR. Link for installing pre-commit locally

For Moderators

  • E2E Test successfully complete before merge?

Additional Notes

@ovaleanu ovaleanu requested a review from vara-bonthu March 1, 2024 11:45
@ovaleanu ovaleanu added the enhancement New feature or request label Mar 1, 2024
Copy link
Collaborator

@vara-bonthu vara-bonthu left a comment

Choose a reason for hiding this comment

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

@ovaleanu Thanks for the upgrade 👍🏼 I left couple of comments .

@@ -1,109 +1,111 @@
apiVersion: karpenter.sh/v1alpha5
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is new way of deploying Karpenter provisioners which uses a local Helm Chart from EKS Data Add-ons
https://github.com/awslabs/data-on-eks/blob/1e4b51971bed042adf17cb7995cceafb7790a150/analytics/terraform/spark-k8s-operator/addons.tf#L180C1-L184C1

If you have bandwidth, then you can leverage the above approach or raise another PR for the upgrade. I am fine with either approach.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have seen this as well. I can use this approach.

Comment on lines 116 to 122
karpenter_node = {
iam_role_use_name_prefix = false
iam_role_name = "${local.name}-karpenter-node"
iam_role_additional_policies = {
AmazonSSMManagedInstanceCore = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Check this code where we are not defining iam_role_name.

https://github.com/awslabs/data-on-eks/blob/1e4b51971bed042adf17cb7995cceafb7790a150/analytics/terraform/spark-k8s-operator/addons.tf#L82C1-L96C4

iam role is being passed to the Karpenter provisioner here

karpenterRole: ${split("/", module.eks_blueprints_addons.karpenter.node_iam_role_arn)[1]}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I saw this, but if the provisioner is in a file separately and not embedded in the addons.tf, then it doesn't know who is "module".

Copy link
Collaborator

@vara-bonthu vara-bonthu left a comment

Choose a reason for hiding this comment

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

Thanks for updating the PR. Please remove the commented code so that we can merge the PR

schedulers/terraform/argo-workflow/addons.tf Outdated Show resolved Hide resolved
Copy link
Collaborator

@vara-bonthu vara-bonthu left a comment

Choose a reason for hiding this comment

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

🚀

@vara-bonthu vara-bonthu merged commit cde1440 into awslabs:main Mar 3, 2024
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants