Skip to content

Commit d85d288

Browse files
committed
feat: add support for ingress multiplath
1 parent e0dab33 commit d85d288

File tree

2 files changed

+24
-29
lines changed

2 files changed

+24
-29
lines changed

charts/zigbee2mqtt/templates/ingress.yaml

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,20 @@ spec:
2626
{{- tpl (toYaml .) $ | nindent 4 }}
2727
{{- end }}
2828
rules:
29-
{{- if .Values.ingress.hosts }}
3029
{{- range .Values.ingress.hosts }}
31-
- host: {{ tpl . $ | quote }}
30+
- host: {{ .host | quote }}
3231
http:
3332
paths:
34-
- path: {{ $ingressPath }}
35-
pathType: {{ $ingressPathType }}
33+
{{- range .paths }}
34+
- path: {{ .path }}
35+
{{- if .pathType }}
36+
pathType: {{ .pathType }}
37+
{{- end }}
3638
backend:
3739
service:
3840
name: {{ $fullName }}
3941
port:
4042
number: {{ $servicePort }}
43+
{{- end }}
4144
{{- end }}
42-
{{- else }}
43-
- http:
44-
paths:
45-
- backend:
46-
service:
47-
name: {{ $fullName }}
48-
port:
49-
number: {{ $servicePort }}
50-
{{- with $ingressPath }}
51-
path: {{ . }}
52-
{{- end }}
53-
pathType: {{ $ingressPathType }}
54-
55-
{{- end -}}
5645
{{- end }}

charts/zigbee2mqtt/values.yaml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -178,24 +178,30 @@ zigbee2mqtt:
178178
# In case you are having issues try `200`.
179179
# For more information see https://github.com/Koenkk/zigbee2mqtt/issues/4884
180180
adapter_delay: 0
181+
# -- Ingress configuration. Zigbee2mqtt does use webssockets, which is not part of the Ingress standart settings.
182+
# most of the popular ingresses supports them through annotations. Please check https://www.zigbee2mqtt.io/guide/installation/08_kubernetes.html
183+
# for examples.
181184
ingress:
182185
# -- When enabled a new Ingress will be created
183186
enabled: false
184-
# The ingress class name for the ingress
187+
# -- The ingress class name for the ingress
185188
ingressClassName: contour
186-
# Additional labels for the ingres
189+
# -- Additional labels for the ingres
187190
labels: {}
188-
# URL in which the ingress will be accepting requests for zigbee2mqtt
189-
path: /
190-
# Ingress implementation specific (potentially) for most use cases Prefix should be ok
191+
# -- Ingress implementation specific (potentially) for most use cases Prefix should be ok
191192
pathType: Prefix
192193
# Additional annotations for the ingress. ExternalDNS, and CertManager are tipically integrated here
193-
annotations: {}
194-
# configuration for tls service (ig any)
194+
annotations: { }
195+
# -- list of hosts that should be allowed for the zigbee2mqtt service
196+
hosts:
197+
- host: chart-example.local
198+
paths:
199+
- path: /
200+
pathType: ImplementationSpecific
201+
- path: /api
202+
pathType: ImplementationSpecific
203+
# -- configuration for tls service (ig any)
195204
tls:
196205
- secretName: some-tls-secret
197206
hosts:
198-
- yourdomain.com
199-
# list of hosts that should be allowed for the zigbee2mqtt service
200-
hosts:
201-
- yourdomain.com
207+
- yourdomain.com

0 commit comments

Comments
 (0)