-
Notifications
You must be signed in to change notification settings - Fork 578
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
🐛 ec2: instances: fix assigning public IP #4892
🐛 ec2: instances: fix assigning public IP #4892
Conversation
Hi @r4f4. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
/hold |
@r4f4: GitHub didn't allow me to request PR reviews from the following users: mtulio, patrickdillon. Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs. 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. |
/ok-to-test |
/cc @vincepri |
@r4f4 something needs fixing in API generation and units. |
Sure, I also need to add unit tests. |
@damdo I don't know how to fix the fuzzy test. Would you mind giving some pointers? |
@r4f4 The Fuzzy testing in this instance refers to the Conversion across API types conversion. Try and add
after this:
|
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
@r4f4 squash commits? |
In the scenario where the user brings their own VPC, if no subnet ID is set in the machine spec and PublicIP is true, CAPA will choose one from the available public subnets. However, if the subnet doesn't have MapPublicIPOnLaunch == true, the instance will not be assigned a public IP. As a result, the instance will have no internet access, contrary to the user's expectation. This change guarantees an instance will be assigned a public IP even if the subnet doesn't do it on instance launch. Instead, we set the option in the instance's network interface.
The tests check that a NetworkInterface is defined with `AssociatePublicIpAddress` in the `RunInstances` input.
6bbfda0
to
46abb5b
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
@vincepri @richardcase @dlipovetsky @Ankitasw this one needs an |
/test ? |
@richardcase: The following commands are available to trigger required jobs:
The following commands are available to trigger optional jobs:
Use
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. |
/test pull-cluster-api-provider-aws-e2e |
Until the e2e pass: /hold |
But from my side: /approve When the e2e passes feel free to unhold. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: richardcase The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cherry-pick release-2.4 |
@richardcase: once the present PR merges, I will cherry-pick it on top of release-2.4 in a new PR and assign it to you. 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. |
It timed out |
Are we good to remove the hold? |
/unhold |
@richardcase: new pull request created: #4908 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:
In the scenario where the user brings their own VPC, if no subnet ID is set in the machine spec and PublicIP is true, CAPA will choose one from the available public subnets. However, if the subnet doesn't have MapPublicIPOnLaunch == true, the instance will not be assigned a public IP. As a result, the instance will have no internet access, contrary to the user's expectation.
This change guarantees an instance will be assigned a public IP even if the subnet doesn't do it on instance launch. Instead, we set the option in the instance's network interface.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #4888
Special notes for your reviewer:
I still need to fix and add unit tests. I want to get feedback on the approach first.
Checklist:
Release note: