Repository navigation
fix(load-balancer): trim spaces in comma separated annotations - #1411
Merged
lukasmetzner merged 2 commits intoNov 5, 2026
Merged
Conversation
Comma separated annotations were split without trimming, so "example.com, www.example.com" requested a managed certificate for " www.example.com", "2??, 3??" sent " 3??" as health check status code and "3, cert-2" looked up a certificate named " cert-2". Trim the whitespace around each item of the list.
lukasmetzner
had a problem deploying
to
e2e-robot
November 5, 2026 07:26 — with
GitHub Actions
Failure
Member
|
Hey @lbarrosby, thank you for the contribution. I made a little refactor use our sliceutil package. The e2e are expected to fail here, due to permissions. I will run them for you and if everything is looking good, I will merge it. |
Contributor
Author
|
Late note for the record, per the org contributing guide: this was written with the help of Claude Code, and I reviewed and tested it before opening. |
lukasmetzner
pushed a commit
that referenced
this pull request
Nov 6, 2026
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The list annotations (
http-managed-certificate-domains,http-status-codes,http-certificates) are split on,without trimming. Writing them with a space after the comma, which is easy to do in YAML, gives:example.com, www.example.com: managed certificate requested for" www.example.com"2??, 3??: health check status code" 3??"3, cert-2: certificate looked up by the name" cert-2"and the Load Balancer reconcile fails with an API error that does not point at the space.
This trims the whitespace around each item in
annotation.Stringsandannotation.Certificates. Values without spaces are parsed as before.Tests: added a "spaces around items" case to
TestStringsandTestCertificates; both fail on main and pass with the change.go test ./internal/annotation/ ./internal/lbspec/and golangci-lint are clean.