I find this choice weird for taints on NodeGroups ...
# typescript
q
I find this choice weird for taints on NodeGroups in Typescript.
Copy code
/**
     * Custom k8s node taints to be attached to each worker node.  Adds the given taints to the `--register-with-taints`
     * kubelet argument.
     */
    taints?: {
        [key: string]: Taint;
    };
For example, when defining a NodeGroup:
Copy code
.
.
.
taints: {
                "workload": {value: "gpu", effect: "NoSchedule"},
        },
.
.
.
The unfortunate thing with this structure is, it makes it impossible to define two effects for the same taint key:
Copy code
.
.
.
taints: {
                "workload": {value: "gpu", effect: "NoSchedule"},
                "workload": {value: "gpu", effect: "NoExecute"},
        },
.
.
.
The above is not valid JavaScript (Typescript) because an object cannot have two keys with the same value. In my opinion, the taints should’ve been an array of
Taint
objects, where the
Taint
also contains a `key`:
Copy code
.
.
.
taints: [
                {key: "workload", value: "gpu", effect: "NoSchedule"},
                {key: "workload", value: "gpu", effect: "NoExecute"},
        ],
.
.
.
Am I missing anything? Is there a workaround to have the intended taints with the current structure? What is the best place to open this as an issue and potentially contribute a fix?
q
NodeGroups of what? EKS? GKE? AKS?
q
EKS