Skip to content

orca-chart: Fix references to service.port - #121

Open
AlveElde wants to merge 2 commits into
mainfrom
orca-service-port
Open

orca-chart: Fix references to service.port#121
AlveElde wants to merge 2 commits into
mainfrom
orca-service-port

Conversation

@AlveElde

Copy link
Copy Markdown
Member

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.

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.port instead of service.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.yaml example, the list item under orca.varnish.http is not indented beneath http:, 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.

Comment thread orca-chart/test/unit/test_connection.bats
Comment thread orca-chart/templates/NOTES.txt Outdated
Comment thread orca-chart/templates/tests/test-connection.yaml Outdated
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.
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.

2 participants