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

Manage aws_eks_addon resources #125

Merged
merged 17 commits into from
Aug 12, 2021
Merged

Manage aws_eks_addon resources #125

merged 17 commits into from
Aug 12, 2021

Conversation

nitrocode
Copy link
Member

@nitrocode nitrocode commented Aug 11, 2021

what

  • Manage aws_eks_addon resources

why

  • To install addons using a variable

references

notes

module "eks" {
  # ...
  addons = [
    {
      addon_name               = "vpc-cni"
      addon_version            = "v1.8.0-eksbuild.1"
      resolve_conflicts        = "NONE"
      service_account_role_arn = null
    }
  ]
  # ...
}

variables.tf Outdated Show resolved Hide resolved
@nitrocode
Copy link
Member Author

/test all

@nitrocode nitrocode marked this pull request as ready for review August 11, 2021 03:21
@nitrocode nitrocode requested review from a team as code owners August 11, 2021 03:21
@nitrocode
Copy link
Member Author

/test all

@nitrocode nitrocode merged commit 783799f into master Aug 12, 2021
@nitrocode nitrocode deleted the var.eks_addons branch August 12, 2021 02:56
@nitrocode
Copy link
Member Author

@z0rc
Copy link
Contributor

z0rc commented Aug 12, 2021

Testing single vpc-cni addon is not enough. At least add coredns, ideally all three: kube-proxy, vpc-cni and coredns should be tested. Otherwise resulting cluster differs from expected default EKS setup.

Also while doing so you might stumble across hashicorp/terraform-provider-aws#20404. Workaround for this issue requires delaying installation of coredns addon until some workers are available. This is doable in terraform by adding something like depends_on = [aws_eks_node_group.workers] for addon resource, which isn't achievable with current implementation.

@nitrocode nitrocode mentioned this pull request Aug 12, 2021
@nitrocode
Copy link
Member Author

@z0rc I tested it out the recommended addons in a draft #126 and you're correct.

We cannot add a depends_on = [module.eks_node_group] to the aws_eks_addon resource since the node groups are created in its own module.

Perhaps it may be best to have the eks addons in its own module so the depends_on can be used or simply create the addons from outside the terraform-aws-eks-cluster module. 🤔

@nitrocode
Copy link
Member Author

@z0rc please review #126 and let me know if that works for you

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.

Ability to install and manage EKS addons
5 participants