aws / karpenter-provider-aws

Karpenter is a Kubernetes Node Autoscaler built for flexibility, performance, and simplicity.
https://karpenter.sh
Apache License 2.0
6.6k stars 919 forks source link

ENI are not tagged correctly #6912

Closed pmorelli92 closed 1 week ago

pmorelli92 commented 1 week ago

Description

Observed Behavior:

When a new EC2 is created it might have several ENI assigned. I observed that only one of those ENI will have the custom tags that I added meanwhile the others will not.

EC2 attached ENI:

Screenshot 2024-09-02 at 11 24 39

ENI number one tags:

Screenshot 2024-09-02 at 11 24 28

ENI number two tags:

Screenshot 2024-09-02 at 11 24 52

Expected Behavior:

All the ENI are tagged with the custom tagging.

Reproduction Steps (Please include YAML):

Given the aws-node created by the vpc-cni plugin having ADDITIONAL_ENI_TAGS

      containers:
      - env:
        - name: ADDITIONAL_ENI_TAGS
          value: assetuuid=3cdf0543-11d4-49ec-be1f-75fa50ab4cf9,environment=Non production

Given the EC2 Node Class having the tags:

      tags:
        assetuuid: 3cdf0543-11d4-49ec-be1f-75fa50ab4cf9
        environment: Non production
        karpenter.sh/discovery: dev-0908

Any time a new EC2 machine is created, not all the attached ENI will have the required tags.

Versions:

Client Version: v1.31.0
Kustomize Version: v5.4.2
Server Version: v1.30.3-eks-2f46c53
engedaam commented 1 week ago

Seems like the aws-node environment variables might not be in the correct formate, no? https://github.com/aws/amazon-vpc-cni-k8s?tab=readme-ov-file#additional_eni_tags-v160

pmorelli92 commented 1 week ago

I am an idiot 🤦🏻