apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: nautilus-server
  annotations:
    kubernetes.io/ingress.class: "nginx"
    cert-manager.io/cluster-issuer: "letsencrypt-prod"
    nginx.ingress.kubernetes.io/configuration-snippet: |
      real_ip_header CF-Connecting-IP;
    nginx.ingress.kubernetes.io/add-base-url: "true"
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    nginx.ingress.kubernetes.io/websocket-services: "nautilus-server"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "1800"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "1800"
    nginx.ingress.kubernetes.io/upstream-hash-by: $remote_addr
    nginx.ingress.kubernetes.io/affinity: "cookie"
    nginx.ingress.kubernetes.io/session-cookie-name: "nautilus_socket"
    nginx.ingress.kubernetes.io/session-cookie-expires: "172800"
    nginx.ingress.kubernetes.io/session-cookie-max-age: "172800"
    nginx.ingress.kubernetes.io/server-snippet: |-
      location /callback {
          deny all;
          return 404;
      }
    nginx.ingress.kubernetes.io/limit-rpm: "50"
    nginx.ingress.kubernetes.io/limit-whitelist: "62.204.108.5"
spec:
  tls:
    - hosts:
        - nautilusapi.perish.co
      secretName: nautilusapi-perish-co-server-secret
  rules:
    - host: nautilusapi.perish.co
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: nautilus-server
                port:
                  number: 5076