mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-22 06:19:47 +08:00
* feat(server): place supervisor sessions by consistent hash and hand them off on shutdown Signed-off-by: divesh <dgude@nvidia.com> * feat: route long-lived sandbox connections to the owning gateway replica Signed-off-by: divesh <dgude@nvidia.com> * feat(helm): add opt-in per-replica GRPCRoute routing Signed-off-by: divesh <dgude@nvidia.com> --------- Signed-off-by: divesh <dgude@nvidia.com>
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
{{- if .Values.grpcRoute.enabled }}
|
|
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
{{- $fullname := include "openshell.fullname" . }}
|
|
apiVersion: gateway.networking.k8s.io/v1
|
|
kind: GRPCRoute
|
|
metadata:
|
|
name: {{ $fullname }}
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "openshell.labels" . | nindent 4 }}
|
|
spec:
|
|
parentRefs:
|
|
- name: {{ default $fullname .Values.grpcRoute.gateway.name }}
|
|
namespace: {{ default .Release.Namespace .Values.grpcRoute.gateway.namespace }}
|
|
{{- if .Values.grpcRoute.hostnames }}
|
|
hostnames:
|
|
{{- toYaml .Values.grpcRoute.hostnames | nindent 4 }}
|
|
{{- end }}
|
|
rules:
|
|
{{- if (dig "replicaRouting" "enabled" false .Values.grpcRoute) }}
|
|
{{- range $i := until (int (include "openshell.maxReplicas" $)) }}
|
|
- matches:
|
|
- headers:
|
|
- type: Exact
|
|
name: x-openshell-replica
|
|
value: {{ printf "%s-%d" $fullname $i }}
|
|
backendRefs:
|
|
- name: {{ printf "%s-replica-%d" $fullname $i }}
|
|
port: {{ $.Values.service.port }}
|
|
{{- end }}
|
|
{{- end }}
|
|
- backendRefs:
|
|
- name: {{ $fullname }}
|
|
port: {{ .Values.service.port }}
|
|
{{- end }}
|