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

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

Open
1 task
neoakris opened this issue Aug 17, 2024 · 2 comments

Comments

@neoakris
Copy link

neoakris commented Aug 17, 2024

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
Copy link
Author

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 neoakris changed the title Feature Request & upstream bug?: Update CoreDNS and the CoreDNS Addon's Default's that eks blueprints uses Feature Request: Update CoreDNS and the CoreDNS Addon's Default's that eks blueprints uses Aug 19, 2024
Copy link

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 github-actions bot added the stale label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant