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

make node_groups module also for standalone usage #1682

Closed
daroga0002 opened this issue Nov 8, 2021 · 5 comments · Fixed by #1680
Closed

make node_groups module also for standalone usage #1682

daroga0002 opened this issue Nov 8, 2021 · 5 comments · Fixed by #1680

Comments

@daroga0002
Copy link
Contributor

Description

Sub module node_groups should be also allow to standalone usage similar to fargate submodule.

Example of fargate standalone execution:

module "fargate_profile_existing_cluster" {
source = "../../modules/fargate"
cluster_name = module.eks.cluster_id
subnets = [module.vpc.private_subnets[0], module.vpc.private_subnets[2]]
fargate_profiles = {
profile1 = {
name = "profile1"
selectors = [
{
namespace = "kube-system"
labels = {
k8s-app = "kube-dns"
}
},
{
namespace = "profile"
labels = {
WorkerType = "fargate"
}
}
]
tags = {
Owner = "profile1"
submodule = "true"
}
}
profile2 = {
name = "profile2"
selectors = [
{
namespace = "default"
labels = {
Fargate = "profile2"
}
}
]
# Using specific subnets instead of the ones configured in EKS (`subnets` and `fargate_subnets`)
subnets = [module.vpc.private_subnets[0]]
tags = {
Owner = "profile2"
submodule = "true"
}
timeouts = {
delete = "20m"
}
}
}
tags = {
Example = local.name
GithubRepo = "terraform-aws-eks"
GithubOrg = "terraform-aws-modules"
}
}

@tsurankov
Copy link

Would be nice to have.
As an example, if I want to create a node group per AZ it is just not possible to loop through the list of subnets and use for_each to create a node group per AZ with the same parameters. I have to hardcode subnet IDs in the var.node_group definition of the parent module or transform the data in locals which also has limitations and leads to over-complication of the setup.
Currently, the node groups module depends on the parent module mainly because of the var.workers_group_defaults variable.
This module has to be either decoupled into a separate module or refined from the dependencies

@github-actions
Copy link

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

@github-actions github-actions bot added the stale label Dec 11, 2021
@github-actions
Copy link

This issue was automatically closed because of stale in 10 days

@antonbabenko
Copy link
Member

This issue has been resolved in version 18.0.0 🎉

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants