---
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
  name: redirect-https
  namespace: "{{ .Release.Namespace }}"
spec:
  redirectScheme:
    scheme: https
    permanent: true
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: traefik-dashboard
  namespace: "{{ .Release.Namespace }}"
spec:
  entryPoints:
    - websecure
  routes:
    - match: Host(`{{ .Values.traefik.url }}`)
      kind: Rule
      services:
        - name: api@internal
          kind: TraefikService
  tls:
    secretName: traefik-default-cert
