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

Add aws-ebs-csi-driver add-on #38

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions eks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ module "main" {
tags = var.tags // The tags placed on the EKS cluster.
vpc_id = data.aws_vpc.vpc.id // The ID of the VPC in which to create the cluster.

cluster_addons = {
aws-ebs-csi-driver = {
most_recent = true
}
}

self_managed_node_groups = { // The set of self-managed node groups.
for key, g in var.self_managed_node_groups :
key => {
Expand All @@ -119,10 +125,15 @@ module "main" {
desired_size = g.min_nodes // Set the desired size of the worker group to the minimum.
key_name = aws_key_pair.ssh_access.key_name // The name of the SSH key to use for the nodes.
bootstrap_extra_args = g.platform == "bottlerocket" ? g.kubelet_extra_args : "--kubelet-extra-args '${g.kubelet_extra_args}'" // The set of extra arguments to the bootstrap script. Used to pass extra flags to the kubelet, and namely to set labels and taints. For bottlerocket this needs to be a TOML(https://bottlerocket.dev/en/os/1.19.x/api/settings/kubernetes/) since it doesn't use kubelet to pass the args.
iam_role_additional_policies = { // The set of additional policies to add to the worker group IAM role.
for index, arn in var.worker_node_additional_policies :
arn => arn
}
iam_role_additional_policies = merge( // The set of additional policies to add to the worker group IAM role.
{
for index, arn in var.worker_node_additional_policies :
arn => arn
},
{
AmazonEBSCSIDriverPolicy = "arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy"
}
)
max_size = g.max_nodes // The maximum size of the worker group.
min_size = g.min_nodes // The minimum size of the worker group.
name = "${var.name}-${g.name}" // Prefix the worker group name with the name of the EKS cluster.
Expand Down
Loading