feat(helm): allow to specify nodePort of UI Service#1528
Open
leomichalski wants to merge 2 commits intokagent-dev:mainfrom
Open
feat(helm): allow to specify nodePort of UI Service#1528leomichalski wants to merge 2 commits intokagent-dev:mainfrom
leomichalski wants to merge 2 commits intokagent-dev:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Helm chart support for explicitly setting a Kubernetes nodePort on the UI Service when the service type is NodePort, enabling users to avoid auto-assigned ports and post-render manifest edits.
Changes:
- Added
ui.service.ports.nodePorttohelm/kagent/values.yaml. - Updated the UI Service template to render
nodePortwhenui.service.typeisNodePort.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| helm/kagent/values.yaml | Introduces a nodePort value entry for the UI service port configuration. |
| helm/kagent/templates/ui-service.yaml | Conditionally renders spec.ports[].nodePort for the UI Service when type is NodePort. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: leomichalski <leonardomichalskim@gmail.com>
2c7a94f to
0e23aeb
Compare
…s null Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Leonardo <leonardomichalskim@gmail.com>
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.
Problem
Currently, when exposing the UI Service using the
NodePortservice type, there is no way to explicitly define thenodePortvalue in the Helm chart. Users are forced to either accept a dynamically assigned port from the Kubernetes control plane or modify the manifests post-rendering.Solution
This PR adds the ability to specify a
nodePortfor the UI Service.nodePortfield to the UI service configuration block invalues.yaml.Testing
To verify this change:
Scenario: default
Command:
helm install kagent ./helm/kagent/ --namespace kagent-dev --dry-run | grep "targetPort: 8080" -A 5 -B 5Output
Scenario: specify nodePort of NodePort Service
Command:
helm install kagent ./helm/kagent/ --namespace kagent-dev --dry-run --set ui.service.ports.nodePort=30100 --set ui.service.type="NodePort" | grep "targetPort: 8080" -A 5 -B 5Output
Scenario: specify nodePort of ClusterIP Service
Command:
helm install kagent ./helm/kagent/ --namespace kagent-dev --dry-run --set ui.service.ports.nodePort=30100 | grep "targetPort: 8080" -A 5 -B 5Output