apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: monkey-ingress
  namespace: monkey
  annotations:
    kubernetes.io/ingress.class: "nginx"
    cert-manager.io/cluster-issuer: "letsencrypt-prod"
    nginx.ingress.kubernetes.io/add-base-url: "true"
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    nginx.ingress.kubernetes.io/websocket-services: "go-monkey-service"
    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: "monkey_socket"
    nginx.ingress.kubernetes.io/session-cookie-expires: "172800"
    nginx.ingress.kubernetes.io/session-cookie-max-age: "172800"
spec:
  tls:
    - hosts:
        - monkey.banano.cc
      secretName: monkey-banano-cc-server-secret
  rules:
    - host: monkey.banano.cc
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: nuxt-monkey-service
                port:
                  number: 3000
          - path: /api
            pathType: Prefix
            backend:
              service:
                name: go-monkey-service
                port:
                  number: 5555
