Skip to content

Commit

Permalink
Delete ENIs leaked by the IPAM controller
Browse files Browse the repository at this point in the history
  • Loading branch information
cartermckinnon committed Jan 3, 2025
1 parent 2e50339 commit 2879c38
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kubetest2/internal/deployers/eksapi/infra.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ const (
const (
// the VPC CNI will always add this tag to ENI's that it creates
vpcCNIENITagKey = "node.k8s.amazonaws.com/createdAt"

// the IPAM controller will add this tag to the ENI's that it creates
ipamControllerENITagKey = "eks:kubernetes-cni-node-name"
)

// eksEndpointURLTag is the key for an optional tag on the infrastructure CloudFormation stack,
Expand Down Expand Up @@ -345,7 +348,7 @@ func (m *InfrastructureManager) getVPCCNINetworkInterfaceIds(vpcId string) ([]st
},
{
Name: aws.String("tag-key"),
Values: []string{vpcCNIENITagKey},
Values: []string{vpcCNIENITagKey, ipamControllerENITagKey},
},
},
})
Expand Down

0 comments on commit 2879c38

Please sign in to comment.