-
Notifications
You must be signed in to change notification settings - Fork 742
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
Enhance subnet selection #2714
Enhance subnet selection #2714
Conversation
test/integration/eni-subnet-selection/eni_subnet_selection_test.go
Outdated
Show resolved
Hide resolved
test/integration/eni-subnet-selection/eni_subnet_selection_test.go
Outdated
Show resolved
Hide resolved
d63b57f
to
7fe0020
Compare
1eb45d1
to
b4ef564
Compare
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.
Changes look good overall, just nits. Will do one more pass on the test code next
test/integration/eni-subnet-selection/eni_subnet_selection_test.go
Outdated
Show resolved
Hide resolved
c2a240e
to
b8d8cac
Compare
b8d8cac
to
1328acf
Compare
8f5e160
to
7917117
Compare
f1d888d
to
868c847
Compare
868c847
to
3551e7e
Compare
5bc3fdd
to
ef5d3c3
Compare
ef5d3c3
to
55aabfb
Compare
} else { | ||
if cache.useSubnetDiscovery { | ||
subnetResult, vpcErr := cache.getVpcSubnets() | ||
if vpcErr != nil { |
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.
Maybe as a fast follow up lets restructure the code..
- Get subnet -> Either primary ENI, ENIConfig or pick a subnet
- Get SG -> Either primary ENI SG or ENIConfig SG
- Modify the "input" with the new subnet ID and SG ID
- Call tryCreateNetworkInterface
6cb6e9b
to
29fabc8
Compare
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
29fabc8
to
cd263e8
Compare
[]string{createdSubnet}, | ||
[]*ec2.Tag{ | ||
{ | ||
Key: aws.String("kubernetes.io/role/cn"), |
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.
kubernetes.io/role/cni
instead of cn
?
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.
I think, it is alright. The tagging and un-tagging was consistent in this test.
What type of PR is this?
feature
Which issue does this PR fix:
N/A
What does this PR do / Why do we need it:
IP exhaustion in IPv4 is a prevalent issue. This PR helps with this by creating ENIs using all subnets in the VPC with the correct tags.
If an issue # is not available please add repro steps and logs from IPAMD/CNI showing the issue:
Testing done on this change:
Integration
Upgrade/Downgrade
aws-node
podPerformance Test
Will this PR introduce any new dependencies?:
Yes
Will this break upgrades or downgrades? Has updating a running cluster been tested?:
No, Yes
Does this change require updates to the CNI daemonset config files to work?:
No
Does this PR introduce any user-facing change?:
Yes
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.