apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
    cert-manager.io/cluster-issuer: "mansong-letsencrypt-staging"
    nginx.ingress.kubernetes.io/enable-cors: "true"
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
    nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
    nginx.ingress.kubernetes.io/service-upstream : "true"
    nginx.ingress.kubernetes.io/configuration-snippet: |
        add_header Access-Control-Allow-Origin *;
        add_header Access-Control-Allow-Methods "GET, PUT, POST, OPTIONS";
        add_header Access-Control-Allow-Headers "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization";
  name: mansong-ingress-resource
  namespace: staging
spec:
  tls:
  - hosts:
    - mansong.ff-demo.co.uk
    secretName: mansong-staging-cert
  rules:
  - host: mansong.ff-demo.co.uk
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: gesturerecognition-svc
            port:
              number: 80
      - path: /gesture-recognition
        pathType: Prefix
        backend:
          service:
            name: gesturerecognition-svc
            port:
              number: 80
