-
Notifications
You must be signed in to change notification settings - Fork 94
project: UDP NodeBalancers #751
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
base: main
Are you sure you want to change the base?
Conversation
* WIP * Finish up * Add integration tests * Add NB unit test * Add config unit test * Replace TODO * Render fixtures * Re-render unrelated fixture
098dd6e
to
dcab891
Compare
6dd6a44
to
e0668d8
Compare
b8a79cc
to
3c8e57c
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 tests are passing
@@ -160,6 +168,7 @@ func (i NodeBalancerConfig) GetCreateOptions() NodeBalancerConfigCreateOptions { | |||
CheckPath: i.CheckPath, | |||
CheckBody: i.CheckBody, | |||
CheckPassive: copyBool(&i.CheckPassive), | |||
UDPCheckPort: &i.UDPCheckPort, |
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.
We should set it only if protocol is UDP. This field is not optional in NodeBalancerConfig
, so if you don't set it there (ex for TCP protocol), it gets default 0. If then someone does GetCreateOptions()
for that NodeBalancerConfig
, returned NodeBalancerConfigCreateOptions
has UDPCheckPort assigned value 0 and that will make calls to fail as udp_check_port has to be within 1 to 65535.
@@ -181,6 +190,7 @@ func (i NodeBalancerConfig) GetUpdateOptions() NodeBalancerConfigUpdateOptions { | |||
CheckBody: i.CheckBody, | |||
CheckPassive: copyBool(&i.CheckPassive), | |||
CheckTimeout: i.CheckTimeout, | |||
UDPCheckPort: copyInt(&i.UDPCheckPort), |
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.
Same here, set only for UDP protocol
@@ -202,6 +212,7 @@ func (i NodeBalancerConfig) GetRebuildOptions() NodeBalancerConfigRebuildOptions | |||
CheckPath: i.CheckPath, | |||
CheckBody: i.CheckBody, | |||
CheckPassive: copyBool(&i.CheckPassive), | |||
UDPCheckPort: copyInt(&i.UDPCheckPort), |
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.
Same here, set only for UDP protocol
📝 Description
This pull request merges the NodeBalancer UDP project into this project's main branch to be included in the next release.
✔️ How to Test
The following test steps assume you have pulled down this PR locally and are using an account with access to UDP NodeBalancers.
Unit Tests
make test-unit
Integration Tests
make fixtures TEST_ARGS="-run TestNodeBalancer"