Skip to content

Commit

Permalink
Update default storage to be gp3 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanFauble authored Jun 12, 2024
1 parent 2da8e1c commit 28a6d2b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
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

0 comments on commit 28a6d2b

Please sign in to comment.