From e8d76d2d9d607140524c0c6127f0510495424d9a Mon Sep 17 00:00:00 2001 From: Shelley Shen Date: Wed, 12 Aug 2026 23:59:09 -0700 Subject: [PATCH] feat(gateway-routes): add event-ledger HTTPRoute to gateway-routes chart Add an HTTPRoute for the event-ledger service to the nvcf-gateway-routes Helm chart, gated on nvcfGatewayRoutes.routes.eventLedger.enabled. - Add httproute-event-ledger.yaml with three GET-only match rules: PathPrefix /v3/ledger/namespace (namespace-scoped read endpoints), Exact /status (dependency status), and Exact /health (liveness). Write endpoints are intentionally excluded; they are reachable only via in-cluster Service DNS. - Add eventLedger route entry to values.yaml with hostname events., backend event-ledger.nvcf:8080, enabled by default. - Wire nvcfGatewayRoutes.routes.eventLedger.enabled in global.yaml.gotmpl to addons.eventLedger.enabled so the route is skipped when the addon is disabled. --- .../templates/httproute-event-ledger.yaml | 69 +++++++++++++++++++ deploy/helm/gateway-routes/chart/values.yaml | 11 +++ deploy/stacks/self-managed/global.yaml.gotmpl | 2 + 3 files changed, 82 insertions(+) create mode 100644 deploy/helm/gateway-routes/chart/templates/httproute-event-ledger.yaml diff --git a/deploy/helm/gateway-routes/chart/templates/httproute-event-ledger.yaml b/deploy/helm/gateway-routes/chart/templates/httproute-event-ledger.yaml new file mode 100644 index 000000000..01936b845 --- /dev/null +++ b/deploy/helm/gateway-routes/chart/templates/httproute-event-ledger.yaml @@ -0,0 +1,69 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +{{- if and .Values.nvcfGatewayRoutes.enabled .Values.nvcfGatewayRoutes.routes.eventLedger.enabled }} +--- +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ .Values.nvcfGatewayRoutes.routes.eventLedger.name }} + namespace: {{ .Values.nvcfGatewayRoutes.gateways.shared.namespace }} + labels: + {{- include "nvcf-gateway.labels" . | nindent 4 }} + app.kubernetes.io/component: event-ledger-route + annotations: + {{- toYaml .Values.nvcfGatewayRoutes.routes.eventLedger.routeAnnotations | nindent 4 }} +spec: + parentRefs: + - name: {{ .Values.nvcfGatewayRoutes.gateways.shared.name }} + namespace: {{ .Values.nvcfGatewayRoutes.gateways.shared.namespace }} + sectionName: {{ .Values.nvcfGatewayRoutes.gateways.shared.listenerName }} + hostnames: + {{- range .Values.nvcfGatewayRoutes.routes.eventLedger.hostnames }} + - {{ tpl . $ | quote }} + {{- end }} + rules: + # Namespace-scoped read endpoints (stats + events). Write endpoints are + # intentionally absent — they are reachable only via in-cluster Service DNS. + - matches: + - path: + type: PathPrefix + value: /v3/ledger/namespace + method: GET + backendRefs: + - name: {{ .Values.nvcfGatewayRoutes.routes.eventLedger.backend.name }} + namespace: {{ .Values.nvcfGatewayRoutes.routes.eventLedger.backend.namespace }} + port: {{ .Values.nvcfGatewayRoutes.routes.eventLedger.backend.port }} + # Authenticated dependency-status endpoint. + - matches: + - path: + type: Exact + value: /status + method: GET + backendRefs: + - name: {{ .Values.nvcfGatewayRoutes.routes.eventLedger.backend.name }} + namespace: {{ .Values.nvcfGatewayRoutes.routes.eventLedger.backend.namespace }} + port: {{ .Values.nvcfGatewayRoutes.routes.eventLedger.backend.port }} + # Unauthenticated liveness endpoint. + - matches: + - path: + type: Exact + value: /health + method: GET + backendRefs: + - name: {{ .Values.nvcfGatewayRoutes.routes.eventLedger.backend.name }} + namespace: {{ .Values.nvcfGatewayRoutes.routes.eventLedger.backend.namespace }} + port: {{ .Values.nvcfGatewayRoutes.routes.eventLedger.backend.port }} +{{- end }} diff --git a/deploy/helm/gateway-routes/chart/values.yaml b/deploy/helm/gateway-routes/chart/values.yaml index 462b53485..2486f14d1 100644 --- a/deploy/helm/gateway-routes/chart/values.yaml +++ b/deploy/helm/gateway-routes/chart/values.yaml @@ -254,6 +254,17 @@ nvcfGatewayRoutes: port: 8080 routeAnnotations: {} + eventLedger: + enabled: true + name: event-ledger + hostnames: + - "events.{{ .Values.nvcfGatewayRoutes.domain }}" + backend: + name: event-ledger + namespace: nvcf + port: 8080 + routeAnnotations: {} + # PodMonitors for Envoy Gateway proxy pods. podMonitors: enabled: false diff --git a/deploy/stacks/self-managed/global.yaml.gotmpl b/deploy/stacks/self-managed/global.yaml.gotmpl index f8c212ce0..7591792a1 100644 --- a/deploy/stacks/self-managed/global.yaml.gotmpl +++ b/deploy/stacks/self-managed/global.yaml.gotmpl @@ -1159,6 +1159,8 @@ nvcfGatewayRoutes: enabled: {{ dig "addons" "nvcfUi" "enabled" false .Values }} routeAnnotations: {{ dig "ingress" "gatewayApi" "routes" "nvcfUi" "routeAnnotations" dict .Values | toYaml | nindent 8 | trim }} + eventLedger: + enabled: {{ dig "addons" "eventLedger" "enabled" false .Values }} grpc: routeAnnotations: {{ dig "ingress" "gatewayApi" "routes" "grpc" "routeAnnotations" dict .Values | toYaml | nindent 8 | trim }}