apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: sharingio
  namespace: sharingio-pair
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
    kubernetes.io/ingress.class: nginx
    cert-manager.io/cluster-issuer: "sharingio-letsencrypt"
    nginx.ingress.kubernetes.io/configuration-snippet: |
      rewrite ^/(.*) https://pair.sharing.io/$1 permanent;
spec:
  tls:
    - hosts:
        - sharing.io
      secretName: sharingio-letsencrypt
  rules:
    - host: sharing.io
      http:
        paths:
          - path: /
            pathType: ImplementationSpecific
            backend:
              service:
                name: sharingio-pair-client
                port:
                  number: 5000
