---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: plex-docker
  namespace: networking
  annotations:
    external-dns/is-public: 'true'
    external-dns.alpha.kubernetes.io/target: ipv4.${SECRET_DOMAIN}
    hajimari.io/appName: plex
    hajimari.io/enable: 'true'
    hajimari.io/icon: monitor-star
    traefik.ingress.kubernetes.io/router.entrypoints: websecure
    traefik.ingress.kubernetes.io/router.middlewares: networking-cloudflare@kubernetescrd
spec:
  ingressClassName: traefik
  tls:
    - hosts:
        - plex.${SECRET_DOMAIN}
  rules:
    - host: plex.${SECRET_DOMAIN}
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: plex-docker
                port:
                  number: 32400
