2021-09-03 12:43:21 +00:00
|
|
|
{{/* Define the ingressRoute */}}
|
|
|
|
{{- define "traefik.ingressRoute" -}}
|
2022-02-15 22:10:36 +00:00
|
|
|
{{ if .Values.ingressRoute.dashboard.enabled }}
|
2023-03-04 12:42:14 +00:00
|
|
|
|
2023-11-25 23:10:37 +00:00
|
|
|
{{- $ingressRouteLabels := .Values.ingressRoute.dashboard.labels }}
|
|
|
|
{{- $ingressRouteAnnotations := .Values.ingressRoute.dashboard.annotations }}
|
2023-03-04 12:42:14 +00:00
|
|
|
|
2021-09-04 22:27:30 +00:00
|
|
|
---
|
2023-06-09 14:12:13 +00:00
|
|
|
apiVersion: traefik.io/v1alpha1
|
2021-09-03 12:43:21 +00:00
|
|
|
kind: IngressRoute
|
|
|
|
metadata:
|
2023-03-04 12:42:14 +00:00
|
|
|
name: {{ include "tc.v1.common.lib.chart.names.fullname" . }}-dashboard
|
|
|
|
{{- $labels := (mustMerge ($ingressRouteLabels | default dict) (include "tc.v1.common.lib.metadata.allLabels" $ | fromYaml)) -}}
|
|
|
|
{{- with (include "tc.v1.common.lib.metadata.render" (dict "rootCtx" $ "labels" $labels) | trim) }}
|
|
|
|
labels:
|
|
|
|
{{- . | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- $annotations := (mustMerge ($ingressRouteAnnotations | default dict) (include "tc.v1.common.lib.metadata.allAnnotations" $ | fromYaml)) -}}
|
|
|
|
{{- with (include "tc.v1.common.lib.metadata.render" (dict "rootCtx" $ "annotations" $annotations) | trim) }}
|
2021-09-03 12:43:21 +00:00
|
|
|
annotations:
|
2023-03-04 12:42:14 +00:00
|
|
|
{{- . | nindent 4 }}
|
2021-09-07 07:43:55 +00:00
|
|
|
{{- end }}
|
2023-03-04 12:42:14 +00:00
|
|
|
|
2021-09-03 12:43:21 +00:00
|
|
|
spec:
|
|
|
|
entryPoints:
|
2021-09-03 16:59:18 +00:00
|
|
|
- main
|
2021-09-03 12:43:21 +00:00
|
|
|
routes:
|
|
|
|
- match: PathPrefix(`/dashboard`) || PathPrefix(`/api`)
|
|
|
|
kind: Rule
|
|
|
|
services:
|
|
|
|
- name: api@internal
|
|
|
|
kind: TraefikService
|
2022-02-15 22:10:36 +00:00
|
|
|
{{ end }}
|
2023-11-25 23:10:37 +00:00
|
|
|
{{- end }}
|