-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PLAT-6023: Add support for optional pod subnet (#19)
* Also provision "internal" subnet * Ensure we can cleanly destroy * Make internal subnets optional * Run k8s module inside eks module * Switch CNI to use internal subnets * Internal subnets optionality in k8s module * Ensure the -ex is picked up * Terraform fmt * terraform fmt * Update terraform docs * Never added this * Explicitly allow egress to internal subnet Registry etc. not hitting svc's backed by internal subnet. * Add CIDR to eks cluster security group TODO: See if changing the ENIConfig to use the node group SG would fix this. Custom networking example uses cluster SG, but we're not really geared for that. * Revert "Add CIDR to eks cluster security group" This reverts commit 5e04926. * Revert "Explicitly allow egress to internal subnet" This reverts commit 753239c. * Use the node security group Amazon examples use the cluster group, but that's not actually right for our infra here. * Add default to `create_bastion_sg` * Update terraform-docs * s/internal_subnets/pod_subnets/ * s/internal_subnets/pod_subnets/ * feedback * Single set env call
- Loading branch information
1 parent
b7d1856
commit 9b50d6b
Showing
22 changed files
with
305 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
data "aws_iam_role" "eks_master_roles" { | ||
for_each = var.create_bastion_sg ? toset(var.eks_master_role_names) : [] | ||
name = each.key | ||
} | ||
|
||
module "k8s_setup" { | ||
count = var.create_bastion_sg ? 1 : 0 | ||
source = "../k8s" | ||
ssh_pvt_key_path = var.ssh_pvt_key_path | ||
bastion_user = var.bastion_user | ||
bastion_public_ip = try(var.bastion_public_ip, "") | ||
eks_node_role_arns = [aws_iam_role.eks_nodes.arn] | ||
eks_master_role_arns = [for r in concat(values(data.aws_iam_role.eks_master_roles), [aws_iam_role.eks_cluster]) : r.arn] | ||
kubeconfig_path = var.kubeconfig_path | ||
|
||
security_group_id = aws_security_group.eks_nodes.id | ||
pod_subnets = var.pod_subnets | ||
|
||
depends_on = [aws_eks_addon.vpc_cni, null_resource.kubeconfig] | ||
} |
Oops, something went wrong.