Skip to content

Commit 822d4dc

Browse files
authored
Merge pull request #1351 from spack/improve-coredns
Enable auto-scaling for CoreDNS pods
2 parents 61c4b29 + b7c1472 commit 822d4dc

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

  • terraform/modules/spack_aws_k8s

terraform/modules/spack_aws_k8s/eks.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,25 @@ module "eks" {
4848
coredns = {
4949
# https://docs.aws.amazon.com/eks/latest/userguide/managing-coredns.html#coredns-versions
5050
addon_version = "v1.12.4-eksbuild.1"
51+
# Based on this example of CoreDNS configuration
52+
# https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/docs/faq.md#what-configuration-values-are-available-for-an-add-on
53+
configuration_values = jsonencode({
54+
autoScaling = {
55+
enabled = true
56+
minReplicas = 2
57+
maxReplicas = 10
58+
},
59+
resources = {
60+
requests = {
61+
cpu = "200m"
62+
memory = "128Mi"
63+
},
64+
limits = {
65+
cpu = "400m"
66+
memory = "256Mi"
67+
}
68+
},
69+
})
5170
}
5271
eks-pod-identity-agent = {
5372
addon_version = "v1.3.9-eksbuild.3"

0 commit comments

Comments
 (0)