Skip to content

Commit 55400ac

Browse files
atulmguptaCopilot
andcommitted
fix: IngressRoute not created β€” match reference chart pattern
- API version: traefik.io/v1alpha1 β†’ traefik.containo.us/v1alpha1 (Traefik v2) - Added namespace on services (required by Traefik) - Name: fullname-ingressroute (matches reference vitasync chart) - Template structure matches working HomeOpsHub/vitasync pattern Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 084b77b commit 55400ac

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

β€Žhelm/teslasync/templates/ingressRoute.yamlβ€Ž

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{{- if .Values.ingressRoute.enabled }}
2-
apiVersion: traefik.io/v1alpha1
2+
apiVersion: traefik.containo.us/v1alpha1
33
kind: IngressRoute
44
metadata:
5-
name: {{ include "teslasync.fullname" . }}
5+
name: {{ include "teslasync.fullname" . }}-ingressroute
66
namespace: {{ .Values.ingressRoute.namespace | default .Release.Namespace }}
77
labels:
88
{{- include "teslasync.labels" . | nindent 4 }}
9-
{{- with .Values.ingressRoute.annotations }}
9+
{{- if .Values.ingressRoute.annotations }}
1010
annotations:
11-
{{- toYaml . | nindent 4 }}
11+
{{ toYaml .Values.ingressRoute.annotations | indent 4 }}
1212
{{- end }}
1313
spec:
1414
entryPoints:
15-
{{- toYaml .Values.ingressRoute.entryPoints | nindent 4 }}
15+
{{ toYaml .Values.ingressRoute.entryPoints | indent 4 }}
1616
routes:
1717
{{- range .Values.ingressRoute.routes }}
1818
- match: {{ .match }}
@@ -21,14 +21,13 @@ spec:
2121
middlewares:
2222
{{- range .middlewares }}
2323
- name: {{ .name }}
24-
{{- if .namespace }}
25-
namespace: {{ .namespace }}
26-
{{- end }}
24+
namespace: {{ .namespace | default $.Values.ingressRoute.namespace }}
2725
{{- end }}
2826
{{- end }}
2927
services:
3028
{{- range .services }}
3129
- name: {{ .name | default (printf "%s-%s" (include "teslasync.fullname" $) (eq (.port | int) 80 | ternary "web" "api")) }}
30+
namespace: {{ .namespace | default $.Values.ingressRoute.namespace | default $.Release.Namespace }}
3231
port: {{ .port }}
3332
{{- end }}
3433
{{- end }}
@@ -44,12 +43,10 @@ spec:
4443
domains:
4544
{{- range .Values.ingressRoute.tls.domains }}
4645
- main: {{ .main }}
47-
{{- if .sans }}
4846
sans:
4947
{{- range .sans }}
5048
- {{ . }}
5149
{{- end }}
52-
{{- end }}
5350
{{- end }}
5451
{{- end }}
5552
{{- end }}

0 commit comments

Comments
Β (0)