eksctl
eksctl copied to clipboard
[Bug] propagateASGTags with duplicate key for taints and labels
What were you trying to accomplish?
My unmanaged node groups are pretty verbose with tags, labels, and taints. I read about the propagateASGTags
option and thought that I could remove a lot of tags from my configuration which duplicate the labels and taints.
What happened?
When trying to create a node group I got the error duplicate key found for taints and labels with taint key=value: type=project, and label: type=project
How to reproduce it?
Snippet from desired node group config:
labels:
type: project
taints:
type: 'project:NoSchedule'
propagateASGTags: true
tags:
type: project
Logs
The only relevant line from the logs is
duplicate key found for taints and labels with taint key=value: type=project, and label: type=project
Anything else we need to know?
I looked at the PR which introduced the propagateASGTags
option and couldn't understand why this check for duplicate keys was introduced and why it's an error.
https://github.com/weaveworks/eksctl/blob/52044ab13b8fc88d903ce5f5f38070ba3ecb15be/pkg/cfn/builder/nodegroup.go#L306
The keys of the result tags are unique because they have different prefixes so they should work as expected, right?
Versions
$ eksctl info
eksctl version: 0.105.0-dev+aa76f1d4.2022-07-08T14:38:11Z
kubectl version: v1.24.3
OS: darwin