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
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ name: openspeedtest
sources:
- https://github.com/openspeedtest/Helm-chart
type: application
version: 0.1.2
version: 0.2.0
29 changes: 29 additions & 0 deletions templates/httproute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{- if .Values.gateway.enabled -}}
{{- $fullName := include "openspeedtest.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ $fullName }}
labels:
{{- include "openspeedtest.labels" . | nindent 4 }}
{{- with .Values.gateway.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
parentRefs:
{{- toYaml .Values.gateway.parentRefs | nindent 4 }}
{{- with .Values.gateway.hostnames }}
hostnames:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- backendRefs:
- name: {{ $fullName }}
port: {{ $svcPort }}
{{- with .Values.gateway.matches }}
matches:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
21 changes: 21 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,27 @@ ingress:
# hosts:
# - chart-example.local

gateway:
# Render a gateway.networking.k8s.io/v1 HTTPRoute that attaches to an
# existing Gateway and points at this chart's Service. Disabled by default.
enabled: false
annotations: {}
# parentRefs binds the HTTPRoute to an existing Gateway. At least one is
# required when enabled. `namespace` and `sectionName` are optional.
parentRefs: []
# - name: my-gateway
# namespace: gateway
# sectionName: https
# hostnames restricts the route to specific hosts. When empty, the route
# matches every hostname the parent Gateway accepts.
hostnames: []
# - chart-example.local
# matches is optional; when empty the rule applies to all paths.
matches:
- path:
type: PathPrefix
value: /

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
Expand Down