apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: sitecore-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
    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"
spec:
  rules:
  - host: $(cd-hostname)
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: cd
            port: 
              number: 80
  - host: $(cm-hostname)
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: cm
            port: 
              number: 80
  - host: $(id-hostname)
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: id
            port: 
              number: 80
  tls:
  - secretName: global-cd-tls
    hosts:
    - $(cd-hostname)
  - secretName: global-cm-tls
    hosts:
    - $(cm-hostname)
  - secretName: global-id-tls
    hosts:
    - $(id-hostname)