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

#278: EKS Node Group Variable and Airflow Worker IAM Role #11

Merged
merged 9 commits into from
Mar 4, 2024

Conversation

drewm-swe
Copy link
Contributor

Purpose

  • This PR enables users of the terraform-eks-cluster module to specify node group configurations (instance types, min/max/desired size) for their cluster at deployment time.
  • It also enables Airflow workers to be able to write logs to S3. This was achieved by creating an IAM role for Airflow Workers with AssumeRoleWithWebIdentity using OIDC.

Proposed Changes

  • [ADD] Input variable for EKS node group configuration.
  • [ADD] IAM role for Airflow Workers with AssumeRoleWithWebIdentity using OIDC

Issues

Testing

  • An EKS cluster was manually provisioned in unity-venue-dev using terraform-unity-eks_module. Following the creation of the EKS cluster, an Airflow-based U-SPS was deployed onto the cluster. DAGs utilizing Docker-in-Docker containers were manually triggered and successfully ran to completion.

@drewm-swe drewm-swe requested a review from LucaCinquini March 2, 2024 00:20
Copy link
Collaborator

@LucaCinquini LucaCinquini left a comment

Choose a reason for hiding this comment

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

I followed the instructions and recreated the EKS cluster, redeployed SPS, executed the SBG PreProcess workflow - it all worked. Great job!

Please add the following instruction to the SPS guide to allow developers to work with multiple clusters at once:
terraform workspace new $CLUSTER_NAME

I also wonder whether we should make the policy more flexible - allow access to ALL AWS services from the worker node? Or at least, ALL operations on specific services like S3, SNS, SQS, SSM, ...?

@drewm-swe
Copy link
Contributor Author

Please add the following instruction to the SPS guide to allow developers to work with multiple clusters at once:

Thanks @LucaCinquini, I'll update the docs to mention using the terraform workspace.

Regarding the IAM policy, AWS recommends applying least-privilege permissions as a cybersecurity best practice. I think the policy is actually over-permissive in our current implementation and I think we should try to pare it down to only what's required.

@drewm-swe drewm-swe merged commit ee6041d into develop Mar 4, 2024
1 of 2 checks passed
@drewm-swe drewm-swe deleted the 278-customize-node-group branch March 4, 2024 17:48
@drewm-swe drewm-swe restored the 278-customize-node-group branch March 6, 2024 18:08
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.

2 participants