cdk-eks-blueprints icon indicating copy to clipboard operation
cdk-eks-blueprints copied to clipboard

Feature Request: Update CoreDNS and the CoreDNS Addon's Default's that eks blueprints uses

Open neoakris opened this issue 1 year ago • 1 comments

Describe the feature

Problem Statement: AWS's EKS Upstream has poor default values for CoreDNS
Feature Request: Have future version of EKS Blueprints default to better defaults, specifically:

  • have a hard requirement to spread replicas of coredns across nodes
  • have CoreDNS autoscaling on by default

Use Case

EKS Blueprints is supposed to implement best practices by default. Best practice is

  1. hard requirement to spread coredns replicas across nodes, vs a soft preference.
  2. coredns autoscaling enabled by default.

Just because EKS upstream has poor default values doesn't mean this project should.

Proposed Solution

Have a future version of EKS Blueprints use the following default values for CoreDNS Note: "auto" would have to map to a supported version of the addon. (like "v1.11.1-eksbuild.11")

new blueprints.addons.CoreDnsAddOn( "v1.11.1-eksbuild.11", {
    configurationValues: {
            "autoScaling": {
              "enabled": true,
              "minReplicas": 2,
              "maxReplicas": 100
            },
            "affinity": {
              "nodeAffinity": {
                "requiredDuringSchedulingIgnoredDuringExecution": {
                  "nodeSelectorTerms": [
                    {
                      "matchExpressions": [
                        {
                          "key": "kubernetes.io/os",
                          "operator": "In",
                          "values": [
                            "linux"
                          ]
                        },
                        {
                          "key": "kubernetes.io/arch",
                          "operator": "In",
                          "values": [
                            "amd64",
                            "arm64"
                          ]
                        }
                      ]
                    }
                  ]
                }
              },
              "podAntiAffinity": {
                "requiredDuringSchedulingIgnoredDuringExecution": [
                  {
                    "labelSelector": {
                      "matchExpressions": [
                        {
                          "key": "k8s-app",
                          "operator": "In",
                          "values": [
                            "kube-dns"
                          ]
                        }
                      ]
                    },
                    "topologyKey": "kubernetes.io/hostname"
                  }
                ]
              }
            }
    } //end CoreDNS configurationValues override
  }) //end CoreDNS AddOn

Other Information

aws eks describe-addon-configuration --addon-name coredns --addon-version v1.11.1-eksbuild.8 --query configurationSchema --output text | jq .
^-- shows autoscaling is not available on the older version
(the above shows a shema, with autoscaling missing)

aws eks describe-addon-configuration --addon-name coredns --addon-version v1.11.1-eksbuild.11 --query configurationSchema --output text | jq .
^-- shows autoscaling is available in the newer version aws eks describe-addon-configuration --addon-name coredns --addon-version v1.11.1-eksbuild.11 --query configurationSchema --output text | jq . | grep auto

        "autoScaling": {
          "description": "autoScaling configurations",

Useful Note about cdk-eks-blueprints v1.15.1:

  • "auto" currently results in DEBUG Core add-on coredns has autoselected version v1.11.1-eksbuild.8 (which doesn't support the above config)
  • "v1.11.1-eksbuild.11" results in DEBUG Core add-on coredns is at version v1.11.1-eksbuild.11 (which does support the above config)

Acknowledgements

  • [ ] I may be able to implement this feature request

CDK version used

2.133.0

EKS Blueprints Version

1.15.1

Node.js Version

v20.15.0

Environment details (OS name and version, etc.)

Mac OS Sonoma 14.5

neoakris avatar Aug 17 '24 00:08 neoakris

ugh ok, nvm I'll edit this, there's no upstream bug. I just typo'd the auto scaling part "autoscaling" --> "autoScaling", that said the feature request is still valid.

neoakris avatar Aug 19 '24 14:08 neoakris

This issue has been automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

github-actions[bot] avatar Nov 18 '24 00:11 github-actions[bot]

Issue closed due to inactivity.

github-actions[bot] avatar Jan 17 '25 00:01 github-actions[bot]