orca-chart: Fix references to service.port - #121
Open
AlveElde wants to merge 2 commits into
Open
Conversation
The chart has no service.port value, the HTTP port lives at service.http.port. Three places referenced the missing key, so each rendered an empty string. CI never caught it because it only runs helm template, never helm test, and nothing in the unit suite rendered that template. Add coverage for the test hook's args along with the fix.
There was a problem hiding this comment.
Pull request overview
This PR fixes Helm chart references to a non-existent service.port value by consistently using service.http.port, and adds unit coverage to ensure the test hook renders the correct target port.
Changes:
- Updated the Helm test hook template to reference
service.http.portinstead ofservice.port. - Updated NOTES and README examples to document/use
service.http.port. - Added a new Bats unit test to assert the rendered test-hook args for default and overridden HTTP service ports.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| orca-chart/test/unit/test_connection.bats | Adds unit coverage for the test hook’s rendered args targeting the HTTP service port. |
| orca-chart/templates/tests/test-connection.yaml | Fixes the test-hook pod args to use service.http.port. |
| orca-chart/templates/NOTES.txt | Fixes NOTES output URL to use service.http.port. |
| orca-chart/README.md | Updates CLI/values examples to use the service.http.port key. |
Comments suppressed due to low confidence (2)
orca-chart/test/unit/test_connection.bats:20
- Same issue here:
$(( ... ))is arithmetic expansion and will not capture the command output. Switch to$( ... )so the rendered args can be asserted.
local actual=$((helm template \
--set 'service.http.port=8080' \
--namespace default \
--show-only templates/tests/test-connection.yaml \
.) | yqj '.spec.containers[0].args')
orca-chart/README.md:40
- In the
values.yamlexample, the list item underorca.varnish.httpis not indented beneathhttp:, making the YAML invalid for copy/paste.
port: 81
orca:
varnish:
http:
- port: 81
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The Services render service.http.port with `default 80`, but the test hook and the LoadBalancer notes read it raw. An override that drops the key would put them back to rendering an empty port while the Service still said 80, which is the failure this branch set out to 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.
The chart has no service.port value, the HTTP port lives at service.http.port. Three places referenced the missing key, so each rendered an empty string.
CI never caught it because it only runs helm template, never helm test, and nothing in the unit suite rendered that template. Add coverage for the test hook's args along with the fix.