-
Notifications
You must be signed in to change notification settings - Fork 301
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 IPv6 addresses to node addresses list #639
Conversation
This issue is currently awaiting triage. If cloud-provider-aws contributors determine this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Welcome @james-callahan! |
Hi @james-callahan. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I see this PR goes against v2, which has sort of been abandoned. This feature is already available in v1. |
I've been using v2 happily for some time now. In any case, this PR should fix a missing piece of functionality from v2. |
@@ -226,6 +226,20 @@ func nodeAddressesForInstance(instance *ec2.Instance) ([]v1.NodeAddress, error) | |||
}) | |||
} | |||
} | |||
|
|||
for _, privateIP := range networkInterface.Ipv6Addresses { |
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.
The behavior in the v1 provider is a bit different, we only utilize the first entry in this slice: https://github.com/kubernetes/cloud-provider-aws/blob/master/pkg/providers/v1/aws.go#L1574
I don't have the context as to why that was done.
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'm happy to swap to that behaviour instead if that'll get the PR landed.
I don't have the context as to why that was done.
My guess is that because the first IP cannot be modified (I vaguely recall this from somewhere?); but the others can at runtime by modifying the ENI(s); and the author of v1 was trying to keep it as a static list?
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.
This is kind of related to: #656
The VPC CNI will allocate and utilize additional ENI's for pod IP's. The pod IP's are filtered out from the Node's addresses when the provided-node-ip
annotation is present: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/cloud-provider/node/helpers/address.go#L115-L120
But ideally we wouldn't add Pod IP's to the Node's addresses in the first place. I think we should only be adding the first address on the first ENI
@tzneal WDYT?
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 was wondering if we should just use the PrivateDnsName/PrivateIpAddress from the describe-instances output and ignore ENIs. Anything we can do will break someone, maybe a flag to control what we do?
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.
Hm yeah I think you're right; that's what we end up with in practice on EKS anyway. But I'm not sure how this would impact other CNI's, cluster addons, etc; so making it configurable is a safe bet.
@olemarkus is there something I can do to help get this merged? |
Sorry, I'm not approving PRs against v2. I only maintain v1. |
Going to close this in light of #677. /close |
@cartermckinnon: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Add IPv6 addresses to node addresses list in the v2 provider
Which issue(s) this PR fixes:
Fixes #638
Special notes for your reviewer:
I'm not sure if this should be considered a bugfix or a feature.
Does this PR introduce a user-facing change?: