Skip to content

Commit 450dc23

Browse files
committed
feat(helm): add agentgateway ingress support
Fixes: NVIDIA#2469 Signed-off-by: Daneyon Hansen <[email protected]>
1 parent e406c2b commit 450dc23

15 files changed

Lines changed: 471 additions & 39 deletions

File tree

‎.github/workflows/branch-e2e.yml‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,22 @@ jobs:
478478
external-postgres-secret: openshell-ha-pg
479479
test-name: kubernetes_ha_rebalancing
480480
kubernetes-features: e2e,e2e-host-gateway,e2e-kubernetes,e2e-kubernetes-ha
481-
use-envoy-gateway: true
481+
gateway-controller: envoy
482+
conformance-artifact-prefix: openshell-conformance
483+
484+
kubernetes-agentgateway-e2e:
485+
needs: [pr_metadata, build-binaries, build-images]
486+
if: needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_kubernetes_ha_e2e == 'true'
487+
permissions:
488+
actions: read
489+
contents: read
490+
packages: read
491+
uses: ./.github/workflows/e2e-kubernetes-test.yml
492+
with:
493+
image-tag: ${{ github.sha }}
494+
job-name: Kubernetes agentgateway E2E
495+
e2e-task: e2e:kubernetes:agentgateway
496+
gateway-controller: agentgateway
482497
conformance-artifact-prefix: openshell-conformance
483498

484499
kubernetes-credential-drivers-e2e:
@@ -537,7 +552,7 @@ jobs:
537552

538553
kubernetes-ha-e2e-result:
539554
name: Kubernetes HA E2E result
540-
needs: [pr_metadata, kubernetes-ha-e2e]
555+
needs: [pr_metadata, kubernetes-ha-e2e, kubernetes-agentgateway-e2e]
541556
if: always() && needs.pr_metadata.outputs.should_run == 'true' && needs.pr_metadata.outputs.run_kubernetes_ha_e2e == 'true'
542557
runs-on: ubuntu-latest
543558
steps:

‎.github/workflows/e2e-kubernetes-test.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ on:
5252
required: false
5353
type: string
5454
default: ""
55-
use-envoy-gateway:
56-
description: "Route the test through Envoy Gateway instead of a direct gateway Service port-forward"
55+
gateway-controller:
56+
description: "Gateway API controller to route through: none, envoy, or agentgateway"
5757
required: false
58-
type: boolean
59-
default: false
58+
type: string
59+
default: "none"
6060
mise-version:
6161
description: "mise version to install on the bare Kubernetes e2e runner"
6262
required: false
@@ -145,7 +145,7 @@ jobs:
145145
OPENSHELL_E2E_KUBE_EXTERNAL_POSTGRES_SECRET: ${{ inputs.external-postgres-secret }}
146146
OPENSHELL_E2E_KUBE_TEST: ${{ inputs.test-name }}
147147
OPENSHELL_E2E_KUBERNETES_FEATURES: ${{ inputs.kubernetes-features }}
148-
OPENSHELL_E2E_KUBE_USE_ENVOY: ${{ inputs.use-envoy-gateway && '1' || '0' }}
148+
OPENSHELL_E2E_KUBE_GATEWAY_CONTROLLER: ${{ inputs.gateway-controller }}
149149
IMAGE_TAG: ${{ inputs.image-tag }}
150150
OPENSHELL_REGISTRY: ghcr.io/nvidia/openshell
151151
E2E_TASK: ${{ inputs.e2e-task }}

‎deploy/helm/openshell/README.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ Prerelease and `dev` tags are intended for testing changes ahead of a release. P
186186
See [`values.yaml`](values.yaml) for source defaults. Selected overlays:
187187

188188
- [`ci/values-gateway.yaml`](ci/values-gateway.yaml) - gateway-only configuration
189+
- [`ci/values-gateway-agentgateway.yaml`](ci/values-gateway-agentgateway.yaml) - attach to a shared agentgateway Gateway
189190
- [`ci/values-cert-manager.yaml`](ci/values-cert-manager.yaml) - cert-manager integration
190191
- [`ci/values-keycloak.yaml`](ci/values-keycloak.yaml) - Keycloak OIDC integration
191192
- [`ci/values-high-availability.yaml`](ci/values-high-availability.yaml) - CI overlay for multi-replica external PostgreSQL testing
@@ -366,14 +367,15 @@ discovery endpoint or its TLS CA.
366367
| grpcRoute.backendTLSPolicy.enabled | bool | `false` | Create a BackendTLSPolicy resource for end-to-end TLS between the Gateway proxy and the OpenShell gateway pod. The traffic flow is: client → HTTPS → Gateway (terminate) → TLS (re-encrypt) → gateway pod. Requires server.disableTls=false and server.tls.enableMtls=false. The certgen hook auto-creates the backend CA ConfigMap. |
367368
| grpcRoute.backendTLSPolicy.hostname | string | `""` | Hostname the Gateway proxy validates against the backend's TLS certificate SAN. Defaults to the service FQDN (`<fullname>.<namespace>.svc.cluster.local`) when empty, which matches the SAN included by both cert-manager and the pkiInitJob. |
368369
| grpcRoute.enabled | bool | `false` | Create a Gateway API GRPCRoute for the gateway service. |
369-
| grpcRoute.gateway.className | string | `"eg"` | GatewayClass to reference. Envoy Gateway installs one named "eg". |
370+
| grpcRoute.gateway.className | string | `"eg"` | GatewayClass to reference when gateway.create is true. Envoy Gateway uses "eg"; agentgateway uses "agentgateway". |
370371
| grpcRoute.gateway.create | bool | `false` | When true, a Gateway resource is created in the release namespace. Set to false and provide name/namespace to attach to a pre-existing Gateway. |
371372
| grpcRoute.gateway.listener.allowedRoutes | string | `"Same"` | "Same" restricts attached routes to the release namespace; "All" allows any namespace. |
372373
| grpcRoute.gateway.listener.port | int | `80` | Listener port for the generated Gateway resource. Use 443 with protocol HTTPS. |
373-
| grpcRoute.gateway.listener.protocol | string | `"HTTP"` | Listener protocol for the generated Gateway resource: HTTP or HTTPS. HTTPS terminates TLS at the Envoy Gateway listener; pair it with server.disableTls=true so Envoy forwards plaintext to the gateway pod, and use OIDC for client identity (the gateway never sees the client cert). |
374+
| grpcRoute.gateway.listener.protocol | string | `"HTTP"` | Listener protocol for the generated Gateway resource: HTTP or HTTPS. HTTPS terminates TLS at the Gateway listener; pair it with server.disableTls=true so the controller forwards plaintext to the gateway pod, and use OIDC for client identity (the gateway never sees the client cert). |
374375
| grpcRoute.gateway.listener.tls.certificateRefs | list | `[]` | certificateRefs for the HTTPS listener. Required when protocol is HTTPS. Each entry needs a `name` pointing at a kubernetes.io/tls Secret in the Gateway's namespace. May reference a cert-manager-issued Secret or the existing openshell-server-tls Secret (its SANs must include the external hostname). |
375376
| grpcRoute.gateway.name | string | `""` | Name of the Gateway resource. Defaults to the chart fullname. |
376377
| grpcRoute.gateway.namespace | string | `""` | Namespace of the Gateway referenced by the GRPCRoute parentRef. Defaults to the release namespace. |
378+
| grpcRoute.gateway.sectionName | string | `""` | Listener name to select on the referenced Gateway. Leave empty to let the controller select a compatible listener. |
377379
| grpcRoute.hostnames | list | `[]` | Hostnames the GRPCRoute matches on. Leave empty to match all hosts. |
378380
| grpcRoute.replicaRouting.enabled | bool | `false` | Route requests carrying an `x-openshell-replica` header straight to that gateway replica. The CLI sets the header on long-lived sandbox connections (SSH, port forwards, exec) using the owner the gateway reports, so they skip the relay through a peer replica. Renders one Service per replica. Requires workload.kind=statefulset, workload.allowMultiReplicaStatefulSet=true, and at most 15 replicas. |
379381
| imagePullSecrets | list | `[]` | Image pull secrets attached to gateway and helper pods. |

‎deploy/helm/openshell/README.md.gotmpl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ Prerelease and `dev` tags are intended for testing changes ahead of a release. P
187187
See [`values.yaml`](values.yaml) for source defaults. Selected overlays:
188188

189189
- [`ci/values-gateway.yaml`](ci/values-gateway.yaml) - gateway-only configuration
190+
- [`ci/values-gateway-agentgateway.yaml`](ci/values-gateway-agentgateway.yaml) - attach to a shared agentgateway Gateway
190191
- [`ci/values-cert-manager.yaml`](ci/values-cert-manager.yaml) - cert-manager integration
191192
- [`ci/values-keycloak.yaml`](ci/values-keycloak.yaml) - Keycloak OIDC integration
192193
- [`ci/values-high-availability.yaml`](ci/values-high-availability.yaml) - CI overlay for multi-replica external PostgreSQL testing
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Attach OpenShell's GRPCRoute to the shared agentgateway Gateway installed by
5+
# tasks/scripts/agentgateway-k8s-setup.sh. Keeping the proxy Gateway in a
6+
# separate namespace avoids a name collision with OpenShell's Service.
7+
grpcRoute:
8+
enabled: true
9+
gateway:
10+
create: false
11+
name: openshell-ingress
12+
namespace: agentgateway-system
13+
sectionName: grpc

‎deploy/helm/openshell/templates/grpcroute.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ spec:
1313
parentRefs:
1414
- name: {{ default $fullname .Values.grpcRoute.gateway.name }}
1515
namespace: {{ default .Release.Namespace .Values.grpcRoute.gateway.namespace }}
16+
{{- with .Values.grpcRoute.gateway.sectionName }}
17+
sectionName: {{ . }}
18+
{{- end }}
1619
{{- if .Values.grpcRoute.hostnames }}
1720
hostnames:
1821
{{- toYaml .Values.grpcRoute.hostnames | nindent 4 }}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
suite: Gateway API resources
5+
templates:
6+
- templates/gateway.yaml
7+
- templates/grpcroute.yaml
8+
release:
9+
name: openshell
10+
namespace: openshell
11+
12+
tests:
13+
- it: attaches a GRPCRoute to a named listener on a shared agentgateway Gateway
14+
template: templates/grpcroute.yaml
15+
set:
16+
grpcRoute.enabled: true
17+
grpcRoute.gateway.create: false
18+
grpcRoute.gateway.name: openshell-ingress
19+
grpcRoute.gateway.namespace: agentgateway-system
20+
grpcRoute.gateway.sectionName: grpc
21+
asserts:
22+
- equal:
23+
path: spec.parentRefs[0]
24+
value:
25+
name: openshell-ingress
26+
namespace: agentgateway-system
27+
sectionName: grpc
28+
29+
- it: omits the listener name when sectionName is empty
30+
template: templates/grpcroute.yaml
31+
set:
32+
grpcRoute.enabled: true
33+
asserts:
34+
- notExists:
35+
path: spec.parentRefs[0].sectionName
36+
37+
- it: creates a dedicated Gateway for agentgateway
38+
template: templates/gateway.yaml
39+
set:
40+
grpcRoute.enabled: true
41+
grpcRoute.gateway.create: true
42+
grpcRoute.gateway.className: agentgateway
43+
grpcRoute.gateway.name: openshell-ingress
44+
asserts:
45+
- equal:
46+
path: metadata.name
47+
value: openshell-ingress
48+
- equal:
49+
path: spec.gatewayClassName
50+
value: agentgateway
51+
- equal:
52+
path: spec.listeners[0].protocol
53+
value: HTTP
54+
55+
- it: keeps Envoy Gateway as the default class for chart-created Gateways
56+
template: templates/gateway.yaml
57+
set:
58+
grpcRoute.enabled: true
59+
grpcRoute.gateway.create: true
60+
asserts:
61+
- equal:
62+
path: spec.gatewayClassName
63+
value: eg

‎deploy/helm/openshell/values.yaml‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -673,11 +673,8 @@ certManager:
673673
serverIpAddresses:
674674
- 127.0.0.1
675675

676-
# Kubernetes Gateway API - HTTPRoute and Gateway resources.
677-
# Requires a Gateway API controller in the cluster. Install Envoy Gateway via
678-
# the skaffold.yaml releases or independently:
679-
# helm install eg oci://docker.io/envoyproxy/gateway-helm \
680-
# --version v1.4.1 -n envoy-gateway-system --create-namespace
676+
# Kubernetes Gateway API - GRPCRoute and Gateway resources.
677+
# Requires a Gateway API controller such as Envoy Gateway or agentgateway.
681678
grpcRoute:
682679
# -- Create a Gateway API GRPCRoute for the gateway service.
683680
enabled: false
@@ -687,20 +684,24 @@ grpcRoute:
687684
# -- When true, a Gateway resource is created in the release namespace.
688685
# Set to false and provide name/namespace to attach to a pre-existing Gateway.
689686
create: false
690-
# -- GatewayClass to reference. Envoy Gateway installs one named "eg".
687+
# -- GatewayClass to reference when gateway.create is true. Envoy Gateway
688+
# uses "eg"; agentgateway uses "agentgateway".
691689
className: "eg"
692690
# -- Name of the Gateway resource. Defaults to the chart fullname.
693691
name: ""
694692
# -- Namespace of the Gateway referenced by the GRPCRoute parentRef.
695693
# Defaults to the release namespace.
696694
namespace: ""
695+
# -- Listener name to select on the referenced Gateway. Leave empty to let
696+
# the controller select a compatible listener.
697+
sectionName: ""
697698
# Listener settings (only used when gateway.create is true).
698699
listener:
699700
# -- Listener port for the generated Gateway resource. Use 443 with protocol HTTPS.
700701
port: 80
701702
# -- Listener protocol for the generated Gateway resource: HTTP or HTTPS.
702-
# HTTPS terminates TLS at the Envoy Gateway listener; pair it with
703-
# server.disableTls=true so Envoy forwards plaintext to the gateway pod,
703+
# HTTPS terminates TLS at the Gateway listener; pair it with
704+
# server.disableTls=true so the controller forwards plaintext to the gateway pod,
704705
# and use OIDC for client identity (the gateway never sees the client cert).
705706
protocol: HTTP
706707
# -- "Same" restricts attached routes to the release namespace; "All" allows any namespace.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Shared agentgateway data-plane Gateway for OpenShell GRPCRoutes.
5+
apiVersion: gateway.networking.k8s.io/v1
6+
kind: Gateway
7+
metadata:
8+
name: openshell-ingress
9+
namespace: agentgateway-system
10+
spec:
11+
gatewayClassName: agentgateway
12+
listeners:
13+
- name: grpc
14+
protocol: HTTP
15+
port: 80
16+
allowedRoutes:
17+
namespaces:
18+
from: All

0 commit comments

Comments
 (0)