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

Update default storage to be gp3 #10

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion modules/k8s-node-autoscaler/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ data "aws_security_group" "eks_node_security_group" {

data "kubernetes_storage_class" "existing" {
metadata {
name = "gp2"
name = "gp3"
}
}
2 changes: 1 addition & 1 deletion modules/k8s-node-autoscaler/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ resource "kubernetes_storage_class" "default" {
depends_on = [aws_eks_addon.ebs-csi-driver]

metadata {
name = "gp2-default"
name = "gp3-default"
annotations = {
"storageclass.kubernetes.io/is-default-class" = "true"
}
Expand Down
17 changes: 1 addition & 16 deletions modules/sage-aws-eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,14 @@ module "eks" {
cluster_endpoint_public_access = true

cluster_addons = {
# coredns = {
# most_recent = true
# }
kube-proxy = {
most_recent = true
}
vpc-cni = {
most_recent = true
}
# TODO When the cluster is created we need to set the gp2 storageclass as default:
# kubectl patch storageclass gp2 -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
# This way any PVC that is created will use gp2 as the default storage class
# aws-ebs-csi-driver = {
# most_recent = true
# }
}
# TODO: The AWS EBS CSI driver is not working right for some reason. PVC are made, but storage is not being allocated. Determine why

vpc_id = data.aws_vpc.selected.id
subnet_ids = data.aws_subnets.private.ids
# TODO
Expand Down Expand Up @@ -114,12 +105,6 @@ module "eks" {
}
}
}
# https://docs.aws.amazon.com/eks/latest/userguide/access-policies.html#access-policy-permissions
# TODO: Additional roles that need to be created:
# AmazonEKSAdminViewPolicy?
# AmazonEKSEditPolicy
# AmazonEKSViewPolicy

}
tags = var.tags
}
Expand Down