apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: mvp-ingress
  annotations:
    nginx.ingress.kubernetes.io/proxy-buffer-size: "32k"
    nginx.ingress.kubernetes.io/affinity: "cookie"
    nginx.ingress.kubernetes.io/rewrite-target: /
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "600"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
    nginx.ingress.kubernetes.io/proxy-body-size: "512m"
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/server-snippet: |-
      add_header X-Robots-Tag "noindex, nofollow";
    cert-manager.io/cluster-issuer: letsencrypt
    certmanager.k8s.io/acme-challenge-type: http01
spec:
  rules:
  - host: $(STAGING_CD_HOST)
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
         service:
            name: cd
            port:
              number: 80
  - host: $(STAGING_ID_HOST)
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
         service:
            name: id
            port:
              number: 80
  - host: $(STAGING_HOST)
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
         service:
            name: mvp-rendering
            port:
              number: 80
  - host: $(STAGING_CM_HOST)
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
         service:
            name: cm
            port:
              number: 80
  - host: $(STAGING_SUGCON_EU_HOST)
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
         service:
            name: sugcon-eu-rendering
            port:
              number: 80
  tls:
  - secretName: sitecoredemo-tls
    hosts:
    - $(STAGING_HOST)
    - $(STAGING_ID_HOST)
    - $(STAGING_CD_HOST)
    - $(STAGING_CM_HOST)
    - $(STAGING_SUGCON_EU_HOST)