Fix httpRoute port property to render as integer instead of string#488
Draft
Fix httpRoute port property to render as integer instead of string#488
Conversation
Co-authored-by: aslafy-z <8191198+aslafy-z@users.noreply.github.com>
Co-authored-by: aslafy-z <8191198+aslafy-z@users.noreply.github.com>
Collaborator
|
@copilot continue |
…vice port Co-authored-by: aslafy-z <8191198+aslafy-z@users.noreply.github.com>
…TPRoute fields Co-authored-by: aslafy-z <8191198+aslafy-z@users.noreply.github.com>
Contributor
Author
Done! The httpRoute port issue is now fixed. The port will render as an integer (not a string) and dynamically picks up the value from Changes made:
|
Copilot
AI
changed the title
[WIP] Fix httpRoute problem in the port property
Fix httpRoute port property to render as integer instead of string
Feb 7, 2026
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.
Fix httpRoute port property to be integer instead of string
Fixes an issue where the httpRoute port property was being rendered as a string (
"8080") instead of an integer (8080), causing Gateway API validation errors when deploying with Terraform's helm_release.Changes Made
application.httpRoute.rules) in_helpers.tplthat:| intfilterapplication.tplvalues.renderservice.portsconfiguration invalues.yamlusing template expressionSolution
The helper function takes the rules from values.yaml, renders any template expressions using
application.tplvalues.render, then parses the YAML and iterates through each rule. When outputting backendRefs, it explicitly casts the port field to integer:port: {{ .port | int }}. This ensures that even if the port comes from a template expression (which returns a string), it's converted to an integer in the final rendered output.The port value now dynamically picks up the first service port (
{{ (first $.Values.service.ports).port }}) while rendering as an integer type.Testing
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.