apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: $APP
  namespace: default
  annotations:
    kubernetes.io/ingress.class: nginx
    cert-manager.io/issuer: "letsencrypt-production"
    nginx.ingress.kubernetes.io/enable-cors: "true"
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    nginx.ingress.kubernetes.io/cors-allow-headers: "x-provider-locale,x-provider-url,x-provider-key,authorization,x-clinq-organization,x-clinq-user,x-clinq-key,x-clinq-apiurl"
    nginx.ingress.kubernetes.io/cors-exposed-headers: "x-provider-locale,x-provider-url,x-provider-key,authorization,x-clinq-organization,x-clinq-user,x-clinq-key,x-clinq-apiurl"
spec:
  tls:
    - hosts:
        - $DOMAIN
      secretName: $APP-tls
  rules:
    - host: $DOMAIN
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: $APP
                port:
                  name: http
