-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from youngjeong46/feature/trino-on-eks
feat: Trino on EKS part 2
- Loading branch information
Showing
7 changed files
with
324 additions
and
321 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 was deleted.
Oops, something went wrong.
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,114 @@ | ||
module "eks" { | ||
source = "terraform-aws-modules/eks/aws" | ||
version = "~> 20.0" | ||
|
||
cluster_name = local.name | ||
cluster_version = var.eks_cluster_version | ||
|
||
cluster_endpoint_public_access = true # if true, Your cluster API server is accessible from the internet. You can, optionally, limit the CIDR blocks that can access the public endpoint. | ||
|
||
vpc_id = module.vpc.vpc_id | ||
subnet_ids = module.vpc.private_subnets | ||
|
||
enable_cluster_creator_admin_permissions = true | ||
|
||
#--------------------------------------- | ||
# Note: This can further restricted to specific required for each Add-on and your application | ||
#--------------------------------------- | ||
# Extend cluster security group rules | ||
cluster_security_group_additional_rules = { | ||
ingress_nodes_ephemeral_ports_tcp = { | ||
description = "Nodes on ephemeral ports" | ||
protocol = "tcp" | ||
from_port = 1025 | ||
to_port = 65535 | ||
type = "ingress" | ||
source_node_security_group = true | ||
} | ||
} | ||
|
||
# Extend node-to-node security group rules | ||
node_security_group_additional_rules = { | ||
ingress_self_all = { | ||
description = "Node to node all ports/protocols" | ||
protocol = "-1" | ||
from_port = 0 | ||
to_port = 0 | ||
type = "ingress" | ||
self = true | ||
} | ||
egress_all = { | ||
description = "Node all egress" | ||
protocol = "-1" | ||
from_port = 0 | ||
to_port = 0 | ||
type = "egress" | ||
cidr_blocks = ["0.0.0.0/0"] | ||
ipv6_cidr_blocks = ["::/0"] | ||
} | ||
} | ||
|
||
eks_managed_node_group_defaults = { | ||
iam_role_additional_policies = { | ||
# Not required, but used in the example to access the nodes to inspect mounted volumes | ||
AmazonSSMManagedInstanceCore = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore" | ||
} | ||
} | ||
eks_managed_node_groups = { | ||
# We recommend to have a MNG to place your critical workloads and add-ons | ||
# Then rely on Karpenter to scale your workloads | ||
# You can also make uses on nodeSelector and Taints/tolerations to spread workloads on MNG or Karpenter provisioners | ||
core_node_group = { | ||
name = "core-node-group" | ||
description = "EKS managed node group example launch template" | ||
|
||
subnet_ids = module.vpc.private_subnets | ||
|
||
min_size = 1 | ||
max_size = 9 | ||
desired_size = 2 | ||
|
||
force_update_version = true | ||
instance_types = ["m5.xlarge"] | ||
|
||
ebs_optimized = true | ||
block_device_mappings = { | ||
xvda = { | ||
device_name = "/dev/xvda" | ||
ebs = { | ||
volume_size = 100 | ||
volume_type = "gp3" | ||
} | ||
} | ||
} | ||
|
||
labels = { | ||
WorkerType = "ON_DEMAND" | ||
NodeGroupType = "doeks" | ||
} | ||
|
||
tags = { | ||
Name = "core-node-grp" | ||
} | ||
} | ||
} | ||
} | ||
|
||
module "eks_aws_auth" { | ||
source = "terraform-aws-modules/eks/aws//modules/aws-auth" | ||
version = "~> 20.0" | ||
|
||
manage_aws_auth_configmap = true | ||
|
||
aws_auth_roles = [ | ||
# We need to add in the Karpenter node IAM role for nodes launched by Karpenter | ||
{ | ||
rolearn = module.eks_blueprints_addons.karpenter.node_iam_role_arn | ||
username = "system:node:{{EC2PrivateDNSName}}" | ||
groups = [ | ||
"system:bootstrappers", | ||
"system:nodes", | ||
] | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.