Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metrics for leaked ENI cleanup routine #328

Merged
merged 2 commits into from
Nov 2, 2023

Conversation

sushrk
Copy link
Contributor

@sushrk sushrk commented Nov 2, 2023

Issue #, if available:
N/A

Description of changes:
Adding new metrics for number of leaked ENIs created by VPC-RC and VPC-CNI, and cleaned up by the controller.
Also updated the golang build image in Makefile for local builds.

Testing:

Manually created an ENI with tags:

kubernetes.io/cluster/vpcrc-release: owned
eks:eni:owner: eks-vpc-resource-controller

Restarted controller, waiting for 30 mins and verified the ENI is deleted.

Metrics output:

# HELP vpc_cni_created_leaked_eni_cleanup_count The number of leaked ENIs created by VPC-CNI that is cleaned up by the controller
# TYPE vpc_cni_created_leaked_eni_cleanup_count counter
vpc_cni_created_leaked_eni_cleanup_count 0
# HELP vpc_rc_created_leaked_eni_cleanup_count The number of leaked ENIs created by VPC-RC that is cleaned up by the controller
# TYPE vpc_rc_created_leaked_eni_cleanup_count counter
vpc_rc_created_leaked_eni_cleanup_count 1

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@sushrk sushrk requested a review from a team as a code owner November 2, 2023 21:53
Copy link
Contributor

@haouc haouc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just a nit.

pkg/aws/ec2/api/eni_cleanup.go Outdated Show resolved Hide resolved
Copy link
Contributor

@haouc haouc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@sushrk sushrk merged commit 1e82e2a into aws:master Nov 2, 2023
2 checks passed
sushrk added a commit to sushrk/amazon-vpc-resource-controller-k8s that referenced this pull request Nov 2, 2023
Add metrics for leaked ENI cleanup routine
haouc pushed a commit that referenced this pull request Nov 2, 2023
Add metrics for leaked ENI cleanup routine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants