-
Notifications
You must be signed in to change notification settings - Fork 763
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
adding eni owner tag if cluster name is present #3228
Conversation
pkg/awsutils/awsutils_test.go
Outdated
@@ -1316,6 +1316,7 @@ func TestEC2InstanceMetadataCache_buildENITags(t *testing.T) { | |||
want: map[string]string{ | |||
"node.k8s.amazonaws.com/instance_id": "i-xxxxx", | |||
"cluster.k8s.amazonaws.com/name": "awesome-cluster", | |||
"eks:eni:owner": "amazon-vpc-cni", |
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.
Can we use the variable defined in awsutils? We can then ensure we have tests on the same sources.
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.
lgtm
pkg/awsutils/awsutils_test.go
Outdated
@@ -1882,6 +1887,7 @@ func TestEC2InstanceMetadataCache_TagENI(t *testing.T) { | |||
currentTags: map[string]string{ | |||
"node.k8s.amazonaws.com/instance_id": "i-xxxx", | |||
"cluster.k8s.amazonaws.com/name": "awesome-cluster", | |||
"eks:eni:owner": "amazon-vpc-cni", |
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.
nit: This lucky one got slipped away :) . This can be followed up. Thanks
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.
lgtm
What type of PR is this?
Feature.
Now vpc-cni will add following tag when creating ENI which will help VPC-RC to help filter out ENI's created by vpc-cni and garbage clean them. Ref PR aws/amazon-vpc-resource-controller-k8s#505
Note:- With the current state of VPC-RC PR and VPC-CNI tag addition, there will be cleanup of eni's from both components. To resolve that customer has to disable cleanup of eni in VPC-CNI with env variable
DISABLE_LEAKED_ENI_CLEANUP
Which issue does this PR fix?:
What does this PR do / Why do we need it?:
Testing done on this change:
Will this PR introduce any new dependencies?:
Will this break upgrades or downgrades? Has updating a running cluster been tested?:
Does this change require updates to the CNI daemonset config files to work?:
Does this PR introduce any user-facing change?:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.