-
Notifications
You must be signed in to change notification settings - Fork 748
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
Knob to disable/enable leaked eni cleanup #1641
Conversation
@@ -411,7 +416,7 @@ func New(useCustomNetworking, disableENIProvisioning, v4Enabled, v6Enabled bool) | |||
} | |||
|
|||
// Clean up leaked ENIs in the background | |||
if !disableENIProvisioning { | |||
if !disableENIProvisioning && !disableLeakedENICollection { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about it..Why don't we disable this for v6 completely since v6 support in PD mode will not be creating any additional ENIs? We only have/need Primary ENI in v6 PD mode..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we can. Only catch is if they moved from v4 to v6 cluster and there are leaked ENIs. Maybe should be fine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, v6 cluster will have to be a brand new cluster and more importantly the proposed IPv6 IAM policy for an IPv6 cluster will not have permissions to delete
an ENI, so it is not going to be of any use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Say in future if we support custom networking with v6 then we might still need this logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, we might but we can probably remove the v6 check at that point along with v6 specific checks we placed around custom nw code. Problem I see with this right now is the ipamd
logs might be filled with 403s(Unauthorized
) every hr when the aws-node
pod attempts to delete a leaked ENI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah makes sense to disable it for now until we have actual support for custom networking
@@ -54,6 +54,11 @@ const ( | |||
eniClusterTagKey = "cluster.k8s.amazonaws.com/name" | |||
additionalEniTagsEnvVar = "ADDITIONAL_ENI_TAGS" | |||
reservedTagKeyPrefix = "k8s.amazonaws.com" | |||
clusterNameTagKeyFormat = "kubernetes.io/cluster/%s" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already add a cluster name
tag -
amazon-vpc-cni-k8s/pkg/awsutils/awsutils.go
Line 837 in 88c1223
tags[eniClusterTagKey] = cache.clusterName |
This pull request is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days |
/not stale |
This pull request is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days |
/not stale |
This pull request is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days |
This pull request is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days |
/not stale. This will be needed once we move cleanup logic to VPC RC. |
This pull request is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days |
/not stale |
@M00nF1sh - As part of this PR, I will remove the tagging and have just the disable logic. Once we have the final design we can add the tagging.. |
Discarding in favor of #2370 |
What type of PR is this?
Enhancement
Which issue does this PR fix:
N/A
What does this PR do / Why do we need it:
This adds 2 additional tags for ENIs allocated by aws-node -
Also added a knob to disable leaked ENI collection.
If an issue # is not available please add repro steps and logs from IPAMD/CNI showing the issue:
n/a
Testing done on this change:
Yes
UTs
Automation added to e2e:
Will add as a follow up PR
Will this break upgrades or downgrades. Has updating a running cluster been tested?:
No
Does this change require updates to the CNI daemonset config files to work?:
No
Does this PR introduce any user-facing change?:
2 additional tags will be created on ENIs allocated by aws-node
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.