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
49 changes: 49 additions & 0 deletions charts/zigbee2mqtt/templates/httproute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{{- if .Values.httproute.enabled -}}
{{- $servicePort := .Values.service.port -}}
{{- $fullName := include "zigbee2mqtt.fullname" . }}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ $fullName }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "zigbee2mqtt.labels" . | nindent 4 }}
{{- with .Values.httproute.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.httproute.annotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ tpl $value $ | quote }}
{{- end }}
{{- end }}
spec:
{{- with .Values.httproute.parentRefs }}
parentRefs:
{{- range . }}
- group: {{ .group | default "gateway.networking.k8s.io" }}
kind: {{ .kind | default "Gateway" }}
name: {{ .name }}
{{- with .namespace }}
namespace: {{ . }}
{{- end }}
{{- with .sectionName }}
sectionName: {{ . }}
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.httproute.hostnames }}
hostnames:
{{- range . }}
- {{ . | quote }}
{{- end }}
{{- end }}
rules:
- matches:
- path:
type: {{ .Values.httproute.pathType | default "PathPrefix" }}
value: {{ .Values.httproute.path | default "/" }}
backendRefs:
- name: {{ $fullName }}
port: {{ $servicePort }}
{{- end }}
25 changes: 25 additions & 0 deletions charts/zigbee2mqtt/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,31 @@ ingress:
hosts:
- yourdomain.com

httproute:
# -- Setting that allows Zigbee2mqtt to generate HTTPRoute records for the Zigbee2mqtt UI service using Gateway API.
enabled: false
# -- Gateway references for HTTPRoute. Specify which Gateway(s) should handle this route.
parentRefs: []
## Example:
# - name: gateway-name
# namespace: gateway-namespace
# # Optional fields with defaults:
# # group: gateway.networking.k8s.io # default
# # kind: Gateway # default
# # sectionName: https # optional, targets a specific listener
# -- List of hostnames for the HTTPRoute. Multiple hostnames are supported.
hostnames: []
## Example:
# - zigbee2mqtt.example.com
# - zigbee2mqtt.example.org
# -- Default path for HTTPRoute. You can access the Zigbee2mqtt UI by following the full path.
path: /
# -- Path match type for HTTPRoute. (Options: "Exact", "PathPrefix")
pathType: PathPrefix
# -- Annotations for the HTTPRoute resource in the form of key-value pairs.
annotations: {}
## Example:

# -- Extra Resources. Define some extra resources to be created, such as ExternalResource or Secrets, etc.
extraResources: []
# - apiVersion: v1
Expand Down