-
Notifications
You must be signed in to change notification settings - Fork 116
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: add ability to use node ip as LB target #590
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ const ( | |
hcloudLoadBalancersNetworkZone = "HCLOUD_LOAD_BALANCERS_NETWORK_ZONE" | ||
hcloudLoadBalancersDisablePrivateIngress = "HCLOUD_LOAD_BALANCERS_DISABLE_PRIVATE_INGRESS" | ||
hcloudLoadBalancersUsePrivateIP = "HCLOUD_LOAD_BALANCERS_USE_PRIVATE_IP" | ||
hcloudLoadBalancersUseNodeIP = "HCLOUD_LOAD_BALANCERS_USE_NODE_IP" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure about the naming or the option, this seems to target robot server only right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't recall but I think it does yes. But we can make it work with cloud servers too, is this the way? Update: there's an option which uses private IP and I believe it is used in conjunction with cloud servers. Do we need this option for the cloud servers in that case? |
||
hcloudLoadBalancersDisableIPv6 = "HCLOUD_LOAD_BALANCERS_DISABLE_IPV6" | ||
|
||
hcloudMetricsEnabled = "HCLOUD_METRICS_ENABLED" | ||
|
@@ -74,6 +75,7 @@ type LoadBalancerConfiguration struct { | |
NetworkZone string | ||
DisablePrivateIngress bool | ||
UsePrivateIP bool | ||
UseNodeIP bool | ||
DisableIPv6 bool | ||
} | ||
|
||
|
@@ -157,6 +159,10 @@ func Read() (HCCMConfiguration, error) { | |
if err != nil { | ||
errs = append(errs, err) | ||
} | ||
cfg.LoadBalancer.UseNodeIP, err = getEnvBool(hcloudLoadBalancersUseNodeIP, false) | ||
if err != nil { | ||
errs = append(errs, err) | ||
} | ||
cfg.LoadBalancer.DisableIPv6, err = getEnvBool(hcloudLoadBalancersDisableIPv6, false) | ||
if err != nil { | ||
errs = append(errs, err) | ||
|
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 seems unrelated to this PR, but might be a good addition.
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.
Do you want this to be a separate PR or just a separate commit?