aws-ia / terraform-aws-eks-blueprints-addons

Terraform module which provisions addons on Amazon EKS clusters
https://aws-ia.github.io/terraform-aws-eks-blueprints-addons/main/
Apache License 2.0
272 stars 127 forks source link

Node Selector to EKS Addons #157

Closed mballoni closed 1 year ago

mballoni commented 1 year ago

I'd like to include a node selector for both CoreDNS and EBS CSI Driver AddOns

I've searched by the source code, issues and google but I'm stuck on how to achieve it.

So far the closest I've got is using the configuration:

  self_managed_aws_ebs_csi_driver_helm_config = {
    set = {
      name = "controller.nodeSelector.intent",
      value = "critical"
    }
  }

Even when enabling the self managed ebs csi driver the helm config seems to be ignored.

ps: I'd like the same for CoreDNS

Is the self managed the only way around this issue? I just wanna set a node selector value :(

bryantbiggs commented 1 year ago

in this project, we no longer provide a self-managed form of EBS CSI or CoreDNS; only the EKS add-ons are supported here. For the node selector, that will be down to the individual addon - if it is a supported property in the custom configuration than you can pass that into the addon. For example, on CoreDNS v1.8.7-eksbuild.2 this property can be set via custom configuration values

{
  "$ref": "#/definitions/Coredns",
  "$schema": "http://json-schema.org/draft-06/schema#",
  "definitions": {
    "Coredns": {
      "additionalProperties": false,
      "properties": {
        "computeType": {
          "type": "string"
        },
        "corefile": {
          "description": "Entire corefile contents to use with installation",
          "type": "string"
        },
        "nodeSelector": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        "replicaCount": {
          "type": "integer"
        },
        "resources": {
          "$ref": "#/definitions/Resources"
        }
      },
      "title": "Coredns",
      "type": "object"
    },
    "Limits": {
      "additionalProperties": false,
      "properties": {
        "cpu": {
          "type": "string"
        },
        "memory": {
          "type": "string"
        }
      },
      "title": "Limits",
      "type": "object"
    },
    "Resources": {
      "additionalProperties": false,
      "properties": {
        "limits": {
          "$ref": "#/definitions/Limits"
        },
        "requests": {
          "$ref": "#/definitions/Limits"
        }
      },
      "title": "Resources",
      "type": "object"
    }
  }
}