Skip to content
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(load-balancer): emit warning if unsupported port protocol is configured #828

Merged

Conversation

lukasmetzner
Copy link
Contributor

@lukasmetzner lukasmetzner commented Dec 17, 2024

If an unsupported port protocol is configured a warning event and log message is emitted.

This PR adds a check to ensure that only supported network protocols are configured. Notably UDP is not supported by the Hetzner Cloud load balancer.

Dispatching an event is not necessary here, as this automatically happens when returning an error in the `EnsureLoadBalancer` call.
@lukasmetzner lukasmetzner requested a review from a team as a code owner December 17, 2024 14:07
@lukasmetzner lukasmetzner linked an issue Dec 17, 2024 that may be closed by this pull request
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.68%. Comparing base (64ee634) to head (2224539).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #828      +/-   ##
==========================================
+ Coverage   70.56%   70.68%   +0.12%     
==========================================
  Files          31       31              
  Lines        3285     3299      +14     
==========================================
+ Hits         2318     2332      +14     
  Misses        793      793              
  Partials      174      174              

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

@jooola
Copy link
Member

jooola commented Dec 19, 2024

If I understand this, we only trigger a warning event, and we don't fail?

Copy link
Member

@jooola jooola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please update the PR title and description to reflect the new changes?

Ah and the unit tests :)

@lukasmetzner
Copy link
Contributor Author

lukasmetzner commented Dec 20, 2024

Could you please update the PR title and description to reflect the new changes?

Yes. I still need to update the unit test

@lukasmetzner lukasmetzner changed the title feat(load-balancer): check port definition for supported protocol feat(load-balancer): emit warning if unsupported port protocol is configured Dec 20, 2024
@lukasmetzner lukasmetzner merged commit 8876bfa into main Dec 20, 2024
10 checks passed
@lukasmetzner lukasmetzner deleted the 799-validate-protocol-support-for-ports-on-load-balancers branch December 20, 2024 09:59
lukasmetzner pushed a commit that referenced this pull request Jan 10, 2025
<!-- section-start changelog -->
This release includes an extension of our current metrics to also
include the internals of `k8s.io/cloud-provider` with respect to the
work queue depth and requests to the Kubernetes API.

Besides having all data available, this will also help us with debugging
[#661](#661).

### Features

- **metrics**: add metrics from cloud-provider library (#824)
- **load-balancer**: emit warning if unsupported port protocol is
configured (#828)
- allow arbitrary length API tokens (#752)

<!-- section-end changelog -->

---

<details>
<summary><h4>PR by <a
href="https://github.com/apricote/releaser-pleaser">releaser-pleaser</a>
🤖</h4></summary>

If you want to modify the proposed release, add you overrides here. You
can learn more about the options in the docs.

## Release Notes

### Prefix / Start

This will be added to the start of the release notes.

```rp-prefix
This release includes an extension of our current metrics to also include the internals of `k8s.io/cloud-provider` with respect to the work queue depth and requests to the Kubernetes API.

Besides having all data available, this will also help us with debugging [#661](#661).
```

### Suffix / End

This will be added to the end of the release notes.

```rp-suffix
```

</details>

Co-authored-by: releaser-pleaser <>
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.

Validate Protocol Support for Ports on Load Balancers
3 participants