2021-09-03 08:43:21 -04:00
|
|
|
{{/* Define the ingressRoute */}}
|
|
|
|
{{- define "traefik.ingressRoute" -}}
|
2022-02-15 17:10:36 -05:00
|
|
|
{{ if .Values.ingressRoute.dashboard.enabled }}
|
2023-03-04 07:42:14 -05:00
|
|
|
|
2023-11-25 18:10:37 -05:00
|
|
|
{{- $ingressRouteLabels := .Values.ingressRoute.dashboard.labels }}
|
|
|
|
{{- $ingressRouteAnnotations := .Values.ingressRoute.dashboard.annotations }}
|
2023-03-04 07:42:14 -05:00
|
|
|
|
2021-09-04 18:27:30 -04:00
|
|
|
---
|
2023-06-09 10:12:13 -04:00
|
|
|
apiVersion: traefik.io/v1alpha1
|
2021-09-03 08:43:21 -04:00
|
|
|
kind: IngressRoute
|
|
|
|
metadata:
|
2023-03-04 07:42:14 -05: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 08:43:21 -04:00
|
|
|
annotations:
|
2023-03-04 07:42:14 -05:00
|
|
|
{{- . | nindent 4 }}
|
2021-09-07 03:43:55 -04:00
|
|
|
{{- end }}
|
2023-03-04 07:42:14 -05:00
|
|
|
|
2021-09-03 08:43:21 -04:00
|
|
|
spec:
|
|
|
|
entryPoints:
|
2021-09-03 12:59:18 -04:00
|
|
|
- main
|
2021-09-03 08:43:21 -04:00
|
|
|
routes:
|
|
|
|
- match: PathPrefix(`/dashboard`) || PathPrefix(`/api`)
|
|
|
|
kind: Rule
|
|
|
|
services:
|
|
|
|
- name: api@internal
|
|
|
|
kind: TraefikService
|
2022-02-15 17:10:36 -05:00
|
|
|
{{ end }}
|
2023-11-25 18:10:37 -05:00
|
|
|
{{- end }}
|