Skip to content

Conversation

@lukasmetzner
Copy link
Contributor

@lukasmetzner lukasmetzner commented Sep 24, 2025

This PR adds a new annotation. This allows users to control which subnetwork a Load Balancer should be attached to. The value must be in the CIDR notation.

@lukasmetzner lukasmetzner requested a review from a team as a code owner September 24, 2025 09:55
@lukasmetzner lukasmetzner changed the title feat(load-balancer): attach load balancer to subnetwork via annotation feat(load-balancer): attach load balancer to subnetwork Sep 24, 2025
@codecov
Copy link

codecov bot commented Sep 24, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.52%. Comparing base (267284b) to head (399db11).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
internal/hcops/load_balancer.go 75.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1031      +/-   ##
==========================================
+ Coverage   66.94%   67.52%   +0.58%     
==========================================
  Files          23       23              
  Lines        3237     3249      +12     
==========================================
+ Hits         2167     2194      +27     
+ Misses        901      885      -16     
- Partials      169      170       +1     
Flag Coverage Δ
e2e 45.41% <75.00%> (+13.59%) ⬆️
unit 63.80% <33.33%> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lukasmetzner lukasmetzner changed the title feat(load-balancer): attach load balancer to subnetwork feat(load-balancer): attach load balancer to specific subnetwork Sep 24, 2025
This PR adds a new annotation `load-balancer.hetzner.cloud/network-ip-range`. With this annotation a user can control to which subnetwork a Load Balancer should be attached to. The value must be in the CIDR notation.
@lukasmetzner lukasmetzner force-pushed the feat-load-balancer-attach-to-subnet branch from c8565b8 to 0091276 Compare September 26, 2025 08:35
@lukasmetzner
Copy link
Contributor Author

I have added a small section to our Private Networks Load Balancers guide.

@lukasmetzner lukasmetzner merged commit 583621f into main Oct 1, 2025
9 checks passed
@lukasmetzner lukasmetzner deleted the feat-load-balancer-attach-to-subnet branch October 1, 2025 13:46
lukasmetzner pushed a commit that referenced this pull request Dec 15, 2025
…ation (#1052)

This PR introduces additional environment variables for load balancer
configuration. These variables are designed to be set globally as
defaults and can be overridden using annotations.

The main motivation is to improve support for GatewayAPI, as the
`Gateway` annotation limit of 8 is restrictive and many settings are
commonly needed across all load balancers from the same or even differen
GatewayAPI providers. Additionally, this change allows
environment-specific presets such as the new [subnet IP
range](#1031)
to be set globally. This removes the need to configure these settings in
each service or use templating/patching to use the same service manifest
for different environments.

New environment vars:
- `HCLOUD_LOAD_BALANCERS_ALGORITHM_TYPE`
- `HCLOUD_LOAD_BALANCERS_DISABLE_PUBLIC_NETWORK`
- `HCLOUD_LOAD_BALANCERS_HEALTH_CHECK_INTERVAL`
- `HCLOUD_LOAD_BALANCERS_HEALTH_CHECK_RETRIES`
- `HCLOUD_LOAD_BALANCERS_HEALTH_CHECK_TIMEOUT`
- `HCLOUD_LOAD_BALANCERS_PRIVATE_SUBNET_IP_RANGE`
- `HCLOUD_LOAD_BALANCERS_TYPE`
- `HCLOUD_LOAD_BALANCERS_USES_PROXYPROTOCOL`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants