Repository navigation
Conversation
Add service.annotations, service.loadBalancerClass and service.loadBalancerSourceRanges to the gateway Service, each rendered only when set. The load balancer fields require service.type=LoadBalancer. Add service.servicePort, the port the gateway Service exposes. It defaults to service.port and targets the gateway's grpc container port, so a LoadBalancer can listen on 443 while the gateway keeps listening on 8080. The derived Kubernetes grpc_endpoint and the GRPCRoute backend follow the Service port; the gateway's bind address, container port, peer and replica Services keep service.port. With the new values unset, the chart renders the same manifests as before. Closes NVIDIA#5500 Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
The CLI rewrites printed sandbox service URLs to the registered endpoint's port, so describe how to open them remotely instead of saying they don't open. Say the built-in certificate hook writes its Secrets only at first install, that a LoadBalancer also publishes the plaintext metrics port, that changing service.servicePort strands existing sandboxes, and that loadBalancerClass can't change once set. Align the debugging skill's source-range note with the docs. Test that per-replica GRPCRoute backends keep service.port while the main backend and the shared supervisor's gateway endpoint follow service.servicePort, and that the metrics port stays on the Service. Refs NVIDIA#5500 Signed-off-by: Carlos Villela <cvillela@nvidia.com>
This branch has not been deployed
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.
Summary
The chart's gateway Service accepts
service.typebut nothing a cloud load balancer usually needs. This adds Service annotations,loadBalancerClassandloadBalancerSourceRanges, and a Service port separate from the gateway's listening port, so a LoadBalancer can listen on 443 while the gateway keeps listening on 8080. With the new values unset, the chart renders the same manifests as before.Related Issue
Closes #5500
Changes
service.annotations(map): rendered on the gateway Service only when non-empty.service.loadBalancerClass(string) andservice.loadBalancerSourceRanges(list): rendered only when set. Each requiresservice.type=LoadBalancer; the chart fails rendering otherwise, rather than silently dropping a source restriction.service.servicePort(int, default null): the port the gateway Service exposes. Null exposesservice.port. The Service keepstargetPort: grpc, the gateway'sservice.portcontainer port.grpc_endpoint(sandboxes dial the Service's DNS name) and the GRPCRoute's backend for the gateway Service.service.port:bind_address, the container port,OPENSHELL_PEER_ENDPOINT, and the peer and per-replica Services and their GRPCRoute replica backends, which address pods directly. The OpenShift Route targets the namedgrpcport and is unaffected. Certificate SANs carry no port.service.metricsPortwhile metrics are enabled, since the Service exposes both.docs/kubernetes/ingress.mdx, the regenerated chart README, and a note in thedebug-openshell-clusterskill. The section covers:loadBalancerClasscan't change once set.metrics.enabled: false.servicePortstrands existing sandboxes.Some history behind the port split: NemoClaw first published its managed gateway on a load balancer's port by moving the gateway's listening port to it, then reverted that. The gateway API's service URLs carry its listen port (
service_routing::endpoint_urlusesbind_address.port()), and a gateway without privileges can't listen on 443. This PR doesn't move the listening port. It adds a Service-only port, sobind_address, the health and metrics listeners, and the API's service URLs stay as they are. The CLI already rewrites printed service URLs to the registered endpoint's port (service_url_for_gateway), and routing ignores the Host port. The docs say the API reportsservice.port, the CLI rewrites it, and that opening service URLs remotely needs a wildcard SAN for the service domain plus wildcard DNS pointing at the load balancer.NemoClaw (NVIDIA/NemoClaw#14421) would use these values to publish its managed gateway as a LoadBalancer through the chart instead of declaring a second Service outside it.
Release Notes
The Helm chart's gateway Service accepts
service.annotations,service.loadBalancerClassandservice.loadBalancerSourceRanges, andservice.servicePortpublishes the Service on a port other than the gateway's listening port, such as a LoadBalancer on 443.Testing
helm lintandhelm templatewith defaults and everyci/values-*.yaml, plus the workspace chart (thehelm:lintsteps): pass.helm-docs --dry-runmatches both READMEs (helm:docs:check): pass.helm unittestfor both charts: 489 and 7 tests pass.test-split-ownership.sh,test-gateway-resource-coherence.shandtest-supervisor-pool-scaling.sh: pass.ci/values-*.yamlfile, the defaults, GRPCRoute, replica routing, NodePort withnodePort, LoadBalancer, andservice.port=9443onmainand on this branch. All 33 renders are identical apart from the randomly generated key-encryption key.markdownlint-cli2on the changed docs, the SPDX header check,check_docs_nav.pyandfern check: pass.fern checkshows the same 3 warnings asmain.tests/gateway_service_test.yamlcovers the unchanged default Service, annotations, the LoadBalancer class and source ranges, the port split for LoadBalancer (Service port, target, container port,bind_address,grpc_endpoint, peer Service, GRPCRoute) and for NodePort with a fixednodePort, and the validation failures. It also checks that the metrics port stays on the Service, and that with replica routing the per-replica GRPCRoute backends keep 8080 while the main backend uses 443.tests/supervisor_test.yamlchecks that the shared supervisor's--gateway-endpointfollowsservicePort. Changing the expected values makes these tests fail.Not verified:
test-gateway-config-parser.shdidn't run because it builds the gateway with cargo. Thegateway.tomlit validates renders byte-identical tomainfor its fixture.OPENSHELL_ENDPOINTwhen they're created, so after aservice.servicePortchange on a live release, existing sandboxes can't reach the gateway until they're recreated. The shared supervisor Deployment rolls out, because its--gateway-endpointargument changes. I haven't verified either on a cluster. The same holds forservice.porttoday. The docs say to set it before creating sandboxes.Checklist