Fix loadBalancerSourceRanges rendering in service template#333
Merged
Conversation
Signed-off-by: Adam Surgenor <adam@surgenor.me>
Signed-off-by: Adam Surgenor <adam@surgenor.me>
chart-testing requires a chart version bump when the chart changes; this covers the loadBalancerSourceRanges service-template fix. Signed-off-by: Adam Surgenor <adam@surgenor.me>
…ixture The 2.8.1 chart version bump requires the helm-docs-generated README version badge to be regenerated — this is what the pre-commit hook flagged. The loadBalancerSourceRanges CI fixture set service.type=LoadBalancer, which never receives an external IP in the kind cluster used by `ct install`, so `helm install --wait` timed out. Remove it: the rendering fix is a template-only change, validated by `ct lint` / `helm template`. A render regression guard belongs in helm-unittest, which this chart does not currently use. Signed-off-by: Adam Surgenor <adam@surgenor.me>
Contributor
Author
|
Pushed a fix-up:
|
ChrisJBurns
approved these changes
Jun 1, 2026
Contributor
|
@adsurg Much appreciate for the fix! |
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.
Closes #326.
What was wrong
charts/backstage/templates/service.yamlrenderedservice.loadBalancerSourceRangesby interpolating the slice directly:When given a list of CIDRs, Go's default slice stringification produced output like
loadBalancerSourceRanges: [192.168.0.0/16 10.0.0.0/8], which is not a valid value for the KubernetesloadBalancerSourceRangesfield — Kubernetes expects a YAML list.The fix
Render the value with
toYaml | nindent, matching the pattern already used foripFamiliesin the same file:Test coverage
Added
charts/backstage/ci/loadBalancerSourceRanges-values.yamlsochart-testingexercises the field with a representative pair of CIDRs andservice.type: LoadBalancer(the field only applies for LoadBalancer services).