Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions charts/fider/templates/httproute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{{- if .Values.httpRoute.enabled -}}
{{- $fullName := include "fider.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ $fullName }}
labels:
{{- include "fider.labels" . | nindent 4 }}
{{- with .Values.httpRoute.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
parentRefs:
{{- toYaml .Values.httpRoute.parentRefs | nindent 4 }}
{{- with .Values.httpRoute.hostnames }}
hostnames:
{{- range . }}
- {{ . | quote }}
{{- end }}
{{- end }}
rules:
{{- if .Values.httpRoute.rules }}
{{- range .Values.httpRoute.rules }}
- {{- if .matches }}
matches:
{{- toYaml .matches | nindent 8 }}
{{- end }}
{{- if .filters }}
filters:
{{- toYaml .filters | nindent 8 }}
{{- end }}
{{- $timeouts := .timeouts | default $.Values.httpRoute.timeouts }}
{{- with $timeouts }}
timeouts:
{{- toYaml . | nindent 8 }}
{{- end }}
backendRefs:
{{- if .backendRefs }}
{{- toYaml .backendRefs | nindent 8 }}
{{- else }}
- name: {{ $fullName }}
port: {{ $svcPort }}
{{- end }}
{{- end }}
{{- else }}
- matches:
- path:
type: PathPrefix
value: /
{{- with .Values.httpRoute.timeouts }}
timeouts:
{{- toYaml . | nindent 8 }}
{{- end }}
backendRefs:
- name: {{ $fullName }}
port: {{ $svcPort }}
{{- end }}
{{- end }}
32 changes: 32 additions & 0 deletions charts/fider/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,38 @@ ingress:
# hosts:
# - fider.local

# -- Gateway API HTTPRoute configuration. Use this as an alternative to `ingress` when running a Gateway API implementation (e.g. Envoy Gateway, Istio, Cilium, Contour).
httpRoute:
# -- If `true`, an HTTPRoute (gateway.networking.k8s.io/v1) is created
enabled: false
# -- Annotations for the HTTPRoute
annotations: {}
# -- Parent Gateways the HTTPRoute attaches to. At least one entry is required when `enabled` is true.
parentRefs: []
# - name: my-gateway
# namespace: gateway-system
# sectionName: https
# -- Hostnames the HTTPRoute matches against. Leave empty to inherit hostnames from the parent Gateway listener.
hostnames: []
# - fider.local
# -- Default timeouts applied to each generated rule. Individual entries in `rules` can override this by setting their own `timeouts` block. See https://gateway-api.sigs.k8s.io/api-types/httproute/#timeouts
timeouts: {}
# request: 30s
# backendRequest: 10s
# -- HTTPRoute rules. When empty, a single rule is generated that forwards all traffic ("/") to the Fider service.
rules: []
# - matches:
# - path:
# type: PathPrefix
# value: /
# filters: []
# timeouts:
# request: 30s
# backendRequest: 10s
# backendRefs:
# - name: my-custom-backend
# port: 3000

# -- Kubernetes resources
resources: {}
# limits:
Expand Down