apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: gerrit-ingress
  namespace: gerrit
  annotations:
    nginx.ingress.kubernetes.io/use-regex: true
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/affinity: cookie
    nginx.ingress.kubernetes.io/session-cookie-name: Gerrit_Session
    nginx.ingress.kubernetes.io/session-cookie-path: /
    nginx.ingress.kubernetes.io/session-cookie-max-age: 60
    nginx.ingress.kubernetes.io/session-cookie-expires: 60
spec:
  rules:
  - host: example.com
    http:
      paths:
      - pathType: Prefix
        path: "/"
        backend:
          service:
            name: replica
            port:
              name: http
