Skip to content

Commit

Permalink
SC GP2 is default for AWS (#390)
Browse files Browse the repository at this point in the history
Addresses recent redis failures...
  • Loading branch information
smarunich authored Sep 24, 2024
1 parent b137d4d commit e367a14
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion modules/aws/k8s/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,21 @@ module "eks-cluster-autoscaler" {
irsa_role_name_prefix = var.cluster_name
}

resource "kubernetes_annotations" "default-storageclass" {
api_version = "storage.k8s.io/v1"
kind = "StorageClass"
force = "true"

metadata {
name = "gp2"
}
annotations = {
"storageclass.kubernetes.io/is-default-class" = "true"
}
}

resource "local_file" "gen_kubeconfig_sh" {
content = "eksctl utils write-kubeconfig --cluster ${var.cluster_name} --region ${data.aws_availability_zones.available.id} --kubeconfig ${var.cluster_name}-kubeconfig"
filename = "${var.output_path}/generate-${var.cluster_name}-kubeconfig.sh"
file_permission = "0755"
}
}

0 comments on commit e367a14

Please sign in to comment.