mirror of
https://github.com/outbackdingo/homelab-v.git
synced 2026-08-25 07:10:14 +00:00
Basically following an example in the [Traefik Helm Chart documentation](https://github.com/traefik/traefik-helm-chart/blob/master/EXAMPLES.md#provide-default-certificate-with-cert-manager-and-cloudflare-dns)
33 lines
856 B
YAML
33 lines
856 B
YAML
{{- if include "ingressRoute.create" . }}
|
|
apiVersion: traefik.io/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: {{ .Values.name }}
|
|
namespace: {{ .Values.namespace }}
|
|
labels:
|
|
{{- include "common.labels" . | nindent 4 }}
|
|
spec:
|
|
entryPoints:
|
|
- websecure
|
|
routes:
|
|
{{- if include "service.create" . }}
|
|
- match: Host(`{{ .Values.name }}.stonegarden.dev`)
|
|
kind: Rule
|
|
services:
|
|
- name: {{ .Values.name }}
|
|
port: 80
|
|
{{- if .Values.auth.enabled }}
|
|
middlewares:
|
|
- name: traefik-forward-auth
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if include "auth.create" . }}
|
|
- match: Host(`{{ include "auth.host" . }}`)
|
|
kind: Rule
|
|
services:
|
|
- name: traefik-forward-auth
|
|
port: {{ .Values.auth.port }}
|
|
middlewares:
|
|
- name: traefik-forward-auth
|
|
{{- end }}
|
|
{{- end }} |