Skip to content

Commit

Permalink
Add support for Gateway API (HTTPRoute) to Helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
evankanderson committed Feb 4, 2025
1 parent fdc94f0 commit d5395ea
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deployment/helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0

{{ if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand Down Expand Up @@ -118,3 +118,4 @@ spec:
name: minder-http
port:
name: http
{{ end }}
51 changes: 51 additions & 0 deletions deployment/helm/templates/routes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# SPDX-FileCopyrightText: Copyright 2023 The Minder Authors
# SPDX-License-Identifier: Apache-2.0
{{ if .Values.routes.enabled }}
apiVersion: gateway.networking.k8s.io/v1
kind: GRPCRoute
metadata:
name: {{- .Values.routes.name }}
labels:
{{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
spec:
parentRefs:
{{- if .Values.routes.parentRefs }}
{{- toYaml .Values.routes.parentRefs | nindent 4 }}
{{- end }}
hostnames:
- "{{ .Values.hostname }}"
rules:
- backendRefs:
- group: ""
kind: Service
name: minder-grpc
port: !!int "{{ .Values.service.grpcPort }}"
weight: 1
# If no matches are specified, the implementation MUST match every gRPC request.
matches: []
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{- .Values.routes.name }}
labels:
{{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
spec:
parentRefs:
{{- if .Values.routes.parentRefs }}
{{- toYaml .Values.routes.parentRefs | nindent 4 }}
{{- end }}
hostnames:
- "{{ .Values.hostname }}"
rules:
- backendRefs:
- group: ""
kind: Service
name: minder-http
port: !!int "{{ .Values.service.httpPort }}"
weight: 1
matches:
- path:
type: PathPrefix
value: /
{{ end }}
11 changes: 11 additions & 0 deletions deployment/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@ serviceAccounts:
ingress:
# -- (object, optional) annotations to use for the ingress
annotations: {}
# -- (bool) Whether to create Ingress objects or not
enabled: true

# Gateway API (HTTPRoute) settings
routes:
# -- (bool) Whether to create HTTPRoute or not
enabled: true
# -- (string) The name of the HTTPRoute to create
name: minder
# -- (object, required) parentRefs to use for the routes
parentRefs: []

hpaSettings:
# -- (int) Minimum number of replicas for the HPA
Expand Down

0 comments on commit d5395ea

Please sign in to comment.