apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: gnis
  #namespace: ingress-nginx
  namespace: gnis
  annotations:
    #kubernetes.io/ingress.class: nginx
    #kubernetes.io/tls-acme: 'true'
    nginx.ingress.kubernetes.io/enable-cors: "true"
    nginx.ingress.kubernetes.io/cors-allow-methods: "GET, POST, OPTIONS"
    nginx.ingress.kubernetes.io/cors-allow-origin: '$http_origin'
    nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
    nginx.ingress.kubernetes.io/rewrite-target: /
    cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
  ingressClassName: nginx
  tls:
  - hosts:
      - stage.gnis-ld.org
    secretName: ingress-nginx-tls-cert
  rules:
  - host: stage.gnis-ld.org
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: gnis
            port:
              number: 80