apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-host
  annotations:
    kubernetes.io/ingress.class: "nginx"
    cert-manager.io/cluster-issuer: letsencrypt-prod
    ingress.kubernetes.io/force-ssl-redirect: "true"
    nginx.ingress.kubernetes.io/upstream-hash-by: $remote_addr
    #nginx.ingress.kubernetes.io/affinity: "cookie"
    #nginx.ingress.kubernetes.io/session-cookie-name: "route"
    #nginx.ingress.kubernetes.io/session-cookie-expires: "172800"
    #nginx.ingress.kubernetes.io/session-cookie-max-age: "172800"

spec:
  tls:
    - hosts:
        - app.eot.ai
      secretName: ingress-host-tls
  rules:
    - host: "app.eot.ai"
      http:
        paths:
          - path: "/api"
            pathType: Prefix
            backend:
              service:
                name: wppconnect
                port:
                  number: 80

          - path: "/"
            pathType: Prefix
            backend:
              service:
                name: myapp
                port:
                  number: 80
