apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: joomla-http
  namespace: joomla
spec:
  entryPoints:
    - web
  routes:
    - match: Host(`joomla-riscv.allarddcs.nl`)
      kind: Rule
      services:
        - name: joomla
          port: 80
      middlewares:
        - name: redirect-to-https
          namespace: joomla
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: joomla-tls
  namespace: joomla
spec:
  entryPoints:
    - websecure
  routes:
    - match: Host(`joomla-riscv.allarddcs.nl`)
      kind: Rule
      services:
        - name: joomla
          port: 80
  tls:
    certResolver: letsencrypt
---
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
  name: redirect-to-https
  namespace: joomla
spec:
  redirectScheme:
    scheme: https
    permanent: true


