-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat: Support TargetGroupBinding on targets outside the cluster's VPC #3479
Conversation
Welcome @ikosenn! |
Hi @ikosenn. 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. |
Hey @ikosenn how can we get this over the line? |
@johngmyers whenever you have a minute kindly take a look at this PR. Follow up from #3085 (comment) |
Hey @johngmyers / @M00nF1sh any chance we could get this looked at? |
@oliviassss kindly assist in reviewing this PR. |
@@ -41,7 +41,7 @@ func Test_targetGroupBindingMutator_MutateCreate(t *testing.T) { | |||
wantErr error | |||
}{ | |||
{ | |||
name: "targetGroupBinding with TargetType and ipAddressType already set", | |||
name: "targetGroupBinding with TargetType and ipAddressType and vpcId already set", |
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 have a separate unit test where the vpcId
is not set?
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.
comment addressed
|
||
!!!tip "" | ||
If the VpcId is not explicitly specified, a mutating webhook will automatically call AWS API to find the VpcId for your TargetGroup and set it to correct value. | ||
|
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 you please also add a sample yaml file here?
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.
comment addressed
vpcId := m.vpcID | ||
// Target group is in a different VPC from the cluster's VPC | ||
if tgVpcId != "" && tgVpcId != m.vpcID { | ||
vpcId = tgVpcId |
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.
Probably better to call out via the logger that the specified VPC in TGB is different from cluster vpc.
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.
comment addressed
abdb293
to
7c60930
Compare
/ok-to-test |
/retest |
7c60930
to
dd7d259
Compare
@ikosenn, please check the error here, looks introduced by this PR Maybe try to only run this failed test suite in your local to debug
|
I figured out why the tests were timing out. Working on a fix. Thanks for the tip. I had to wait for 2hrs for all e2e tests to run before it got to the problematic one. This will definitely save me sometime. Thanks. |
85c80f2
to
00dcc1a
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ikosenn, M00nF1sh 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 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3479 +/- ##
==========================================
+ Coverage 17.83% 17.92% +0.09%
==========================================
Files 175 175
Lines 29046 29085 +39
==========================================
+ Hits 5180 5214 +34
- Misses 23527 23533 +6
+ Partials 339 338 -1 ☔ View full report in Codecov by Sentry. |
ded9c87
to
752da0c
Compare
New changes are detected. LGTM label has been removed. |
Hey @oliviassss and @M00nF1sh. I pushed some tests to improve coverage in the latest commit. |
@oliviassss Thanks for the tip. I had already rebased. Looks like I need to update some packages. Was missing |
Hi @oliviassss and @M00nF1sh. Should I go ahead and update the packages that failed the vulnerability checks? Looks like minor/patch version upgrades |
@ikosenn, I think we need to upgrade controller-runtime, but it has some breaking changes that will break the LBC codes. I'll investigate later, please check my comment here: #3598 (comment) |
Hey @ikosenn , I am getting the same reconcile error on my setup when I am trying your feature for testing? It happens for the existing tgbs in ingresses. Any idea? |
@shraddhabang I think I have a hunch. It must be because of the fix I did for the e2e to pass I had to add VpcId to the |
@ikosenn Hey, Do you have any update on the fix? |
@shraddhabang working on it right now. Was struggling to get a solution that I liked but I have one now. Going to run upgrade tests on the three components (TG, ingress, service) to ensure backwards compatibility isn’t broken. Should have this up for review by Monday morning. |
Issue
fixes #3084
Description
This PR adds VPC ID to the TargetGroupBinding Spec so as to allow registration in target groups that are created with in a VPC that is different from that which the controller is running in.
Checklist
README.md
, or thedocs
directory)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯