voyagermesh / voyager

🚀 Secure L7/L4 (HAProxy) Ingress Controller for Kubernetes
https://voyagermesh.com
Apache License 2.0
1.35k stars 134 forks source link

Voyager unable to update haproxy.cfg - must have at most 1048576 characters #1553

Open ronald opened 4 years ago

ronald commented 4 years ago

We're currently use appscode/voyager:v11.0.1.

When updating ConfigMap with haproxy.cfg Voyager Operator reports

Failed to process key default/ingress. Reason: ConfigMap "voyager-ingress" is invalid: []: Too long: must have at most 1048576 characters

I'll check if Custom Templates can help reduce haproxy.cfg size.

Is there any other workaround?

Thank you

ronald commented 4 years ago

We have 1.460 configured backends in ingress - 99% look like this:

  - host: example.com
    http:
      paths:
      - backend:
          headerRules:
          - X-Forwarded-Host %[req.hdr(Host)]
          - X-Forwarded-Port %[dst_port]
          - X-Forwarded-Proto https if { ssl_fc }
          serviceName: our-service
          servicePort: 80
        path: /

Voyager generated haproxy.cfg with 2.917 backends - 99 % like this:

backend our-service.default:80-3108123b8583519de78f980b53f3d5c9                                                                                                                                                    
        http-request set-header X-Forwarded-Host %[req.hdr(Host)]                                                                                                                                                  
        http-request set-header X-Forwarded-Port %[dst_port]                                                                                                                                                       
        http-request set-header X-Forwarded-Proto https if { ssl_fc }                                                                                                                                              
        server pod-our-service-deployment-7d8b65d887-kfrpw 10.12.22.52:80