You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/07/18 21:57:10 UTC

(superset) branch master updated: feat(helm): add Gateway API HTTPRoute support (#41073)

This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new cd045886d08 feat(helm): add Gateway API HTTPRoute support (#41073)
cd045886d08 is described below

commit cd045886d0898422bcd4f7c71d23ea16711ea995
Author: Younsung Lee <cy...@kakao.com>
AuthorDate: Sun Jul 19 06:57:02 2026 +0900

    feat(helm): add Gateway API HTTPRoute support (#41073)
    
    Signed-off-by: younsl <cy...@kakao.com>
---
 helm/superset/README.md                |  7 +++
 helm/superset/templates/httproute.yaml | 83 ++++++++++++++++++++++++++++++++++
 helm/superset/values.yaml              | 34 ++++++++++++++
 3 files changed, 124 insertions(+)

diff --git a/helm/superset/README.md b/helm/superset/README.md
index 0e6878f1df0..afc0cb54c6f 100644
--- a/helm/superset/README.md
+++ b/helm/superset/README.md
@@ -125,6 +125,13 @@ Alternatively, perform a fresh install. This is a one-time migration; subsequent
 | fullnameOverride | string | `nil` | Provide a name to override the full names of resources |
 | globalPodAnnotations | object | `{}` | Global pod annotations to be added to all pods Use this to set annotations that apply to all Superset components Component-specific podAnnotations will be merged with these global annotations |
 | hostAliases | list | `[]` | Custom hostAliases for all superset pods # https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/ |
+| httproute | object | see `values.yaml` | Gateway API HTTPRoute for exposing Superset via a Gateway. Requires the Gateway API CRDs (gateway.networking.k8s.io/v1) installed in the cluster. |
+| httproute.annotations | object | `{}` | Annotations to add to the HTTPRoute |
+| httproute.apiVersion | string | `"gateway.networking.k8s.io/v1"` | HTTPRoute apiVersion. Override to gateway.networking.k8s.io/v1beta1 for older Gateway API installations that have not promoted HTTPRoute to v1. |
+| httproute.hostnames | list | `[]` | Hostnames that match against the HTTP Host header (templated) |
+| httproute.labels | object | `{}` | Additional labels to add to the HTTPRoute |
+| httproute.parentRefs | list | `[]` | Gateways this HTTPRoute attaches to |
+| httproute.rules | list | `[{"matches":[{"path":{"type":"PathPrefix","value":"/"}}]}]` | Routing rules. Each rule is backed by the Superset service. Set `weight` per rule to leave room for traffic splitting (defaults to 1). When `supersetWebsockets.enabled` is true, an extra rule routing `supersetWebsockets.ingress.path` to the `-ws` service is appended automatically, mirroring the ingress behavior. |
 | image.pullPolicy | string | `"IfNotPresent"` |  |
 | image.repository | string | `"apachesuperset.docker.scarf.sh/apache/superset"` |  |
 | image.tag | string | `nil` |  |
diff --git a/helm/superset/templates/httproute.yaml b/helm/superset/templates/httproute.yaml
new file mode 100644
index 00000000000..38cb5099ce5
--- /dev/null
+++ b/helm/superset/templates/httproute.yaml
@@ -0,0 +1,83 @@
+{{/*
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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
+
+    http://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 .Values.httproute.enabled -}}
+{{- $fullName := include "superset.fullname" . -}}
+apiVersion: {{ .Values.httproute.apiVersion | default "gateway.networking.k8s.io/v1" }}
+kind: HTTPRoute
+metadata:
+  name: {{ $fullName }}
+  namespace: {{ .Release.Namespace }}
+  labels:
+    app: {{ template "superset.name" . }}
+    chart: {{ template "superset.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
+    {{- with .Values.httproute.labels }}
+      {{- toYaml . | nindent 4 }}
+    {{- end }}
+  {{- with .Values.httproute.annotations }}
+  annotations: {{- toYaml . | nindent 4 }}
+  {{- end }}
+spec:
+  {{- with .Values.httproute.parentRefs }}
+  parentRefs:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
+  {{- with .Values.httproute.hostnames }}
+  hostnames:
+    {{- tpl (toYaml .) $ | nindent 4 }}
+  {{- end }}
+  rules:
+    {{- range .Values.httproute.rules }}
+    - backendRefs:
+        - group: ''
+          kind: Service
+          name: {{ $fullName }}
+          port: {{ $.Values.service.port }}
+          weight: {{ .weight | default 1 }}
+      {{- with .filters }}
+      filters:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      {{- with .matches }}
+      matches:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+      {{- with .timeouts }}
+      timeouts:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
+    {{- end }}
+    {{- if .Values.supersetWebsockets.enabled }}
+    - backendRefs:
+        - group: ''
+          kind: Service
+          name: {{ $fullName }}-ws
+          port: {{ .Values.supersetWebsockets.service.port }}
+          weight: 1
+      matches:
+        - path:
+            type: PathPrefix
+            value: {{ .Values.supersetWebsockets.ingress.path }}
+    {{- end }}
+{{- end }}
diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml
index ad40dde2b09..f7d853c7d5a 100644
--- a/helm/superset/values.yaml
+++ b/helm/superset/values.yaml
@@ -246,6 +246,40 @@ ingress:
   #    hosts:
   #      - chart-example.local
 
+# -- Gateway API HTTPRoute for exposing Superset via a Gateway.
+# Requires the Gateway API CRDs (gateway.networking.k8s.io/v1) installed in the cluster.
+# @default -- see `values.yaml`
+httproute:
+  enabled: false
+  # -- HTTPRoute apiVersion. Override to gateway.networking.k8s.io/v1beta1 for
+  # older Gateway API installations that have not promoted HTTPRoute to v1.
+  apiVersion: gateway.networking.k8s.io/v1
+  # -- Additional labels to add to the HTTPRoute
+  labels: {}
+  # -- Annotations to add to the HTTPRoute
+  annotations: {}
+  # -- Gateways this HTTPRoute attaches to
+  parentRefs: []
+    # - name: my-gateway
+    #   namespace: gateway-system
+    #   sectionName: https
+  # -- Hostnames that match against the HTTP Host header (templated)
+  hostnames: []
+    # - chart-example.local
+  # -- Routing rules. Each rule is backed by the Superset service. Set `weight`
+  # per rule to leave room for traffic splitting (defaults to 1). When
+  # `supersetWebsockets.enabled` is true, an extra rule routing
+  # `supersetWebsockets.ingress.path` to the `-ws` service is appended
+  # automatically, mirroring the ingress behavior.
+  rules:
+    - matches:
+        - path:
+            type: PathPrefix
+            value: /
+    # weight: 1
+    # filters: []
+    # timeouts: {}
+
 resources: {}
   # We usually recommend not to specify default resources and to leave this as a conscious
   # choice for the user. This also increases chances charts run on environments with little