---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
    traefik.ingress.kubernetes.io/router.middlewares: kube-system-redirect-https@kubernetescrd
  labels:
    app: tobru-ch
  name: ghost
spec:
  rules:
    - host: tobru.ch
      http:
        paths:
          - path: /.well-known/webfinger
            pathType: Prefix
            backend:
              service:
                name: ghost
                port:
                  number: 8080
          - path: /.well-known/nodeinfo
            pathType: Prefix
            backend:
              service:
                name: ghost
                port:
                  number: 8080
          - path: /.well-known/host-meta
            pathType: Prefix
            backend:
              service:
                name: ghost
                port:
                  number: 8080
          - path: /
            pathType: Prefix
            backend:
              service:
                name: ghost
                port:
                  number: 2368
    - host: www.tobru.ch
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: ghost
                port:
                  number: 2368
    - host: tobrunet.ch
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: ghost
                port:
                  number: 2368
    - host: www.tobrunet.ch
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: ghost
                port:
                  number: 2368
  tls:
    - hosts:
        - tobru.ch
        - www.tobru.ch
        - tobrunet.ch
        - www.tobrunet.ch
      secretName: ghost-ingress-cert
