From 57b23b4fe8013a1e481934260934c35f4277123b Mon Sep 17 00:00:00 2001
From: Andri Joos <andri@joos.io>
Date: Mon, 27 Jan 2025 21:30:32 +0100
Subject: [PATCH] add traefik ingressroute template

---
 common/templates/traefik/_ingressroute.tpl | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 common/templates/traefik/_ingressroute.tpl

diff --git a/common/templates/traefik/_ingressroute.tpl b/common/templates/traefik/_ingressroute.tpl
new file mode 100644
index 0000000..c5773fc
--- /dev/null
+++ b/common/templates/traefik/_ingressroute.tpl
@@ -0,0 +1,20 @@
+# https://github.com/traefik/traefik/blob/master/docs/content/routing/providers/kubernetes-crd.md#kind-ingressroute
+{{- define "common.traefik.ingressroute" }}
+apiVersion:  {{ .Values.apiVersion | default "traefik.io/v1alpha1" }}
+kind: IngressRoute
+metadata:
+  name: {{ .Values.name | default "ingress-route" }}
+spec:
+  {{- with .Values.entryPoints }}
+  entryPoints:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
+  {{- with .Values.routes }}
+  routes:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
+  {{- with .Values.tls }}
+  tls:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
+{{- end }}
-- 
GitLab