apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-client
  annotations:
    kubernetes.io/ingress.class: "nginx"
    #cert-manager.io/cluster-issuer: "letsencrypt-staging"
    nginx.ingress.kubernetes.io/enable-cors: "true"
    nginx.ingress.kubernetes.io/cors-allow-methods: "HEAD, PUT, GET, POST, PATCH, OPTIONS, DELETE"
    nginx.ingress.kubernetes.io/cors-allow-origin: "*"
    nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
    nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,X-CSRFToken"
spec:
  rules:
    - host: front.unlusip.com
      http:
        paths:
          - path: "/"
            pathType: Prefix
            backend:
              service:
                name: sip-front-service
                port:
                  number: 80
    - host: api.unlusip.com
      http:
        paths:
          - path: "/"
            pathType: Prefix
            backend:
              service:
                name: sip-api-service
                port:
                  number: 80
    - host: db.unlusip.com
      http:
        paths:
          - path: "/"
            pathType: Prefix
            backend:
              service:
                name: sip-db-service
                port:
                  number: 5432