eksctl icon indicating copy to clipboard operation
eksctl copied to clipboard

[Bug] propagateASGTags with duplicate key for taints and labels

Open tenevdev opened this issue 1 year ago • 1 comments

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

tenevdev avatar Sep 01 '22 10:09 tenevdev

Hello tenevdev :wave: Thank you for opening an issue in eksctl project. The team will review the issue and aim to respond within 1-3 business days. Meanwhile, please read about the Contribution and Code of Conduct guidelines here. You can find out more information about eksctl on our website

github-actions[bot] avatar Sep 01 '22 10:09 github-actions[bot]