When I add morethan 50 Paths in the Ingress file - getting below error from Google Cloud Platform.
"Error during sync: UpdateURLMap: googleapi: Error 413: Value for field 'resource.pathMatchers[0].pathRules' is too large: maximum size 50 element(s); actual size 51., fieldSizeTooLarge"
We are using Path based Ingress thru Traefik. This error coming from Google Cloud Platform.
Sample Ingress looklike:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
traefik.frontend.rule.type: PathPrefixStrip
name: traefik-ingress
namespace: default
spec:
rules:
- host: domain-name.com
http:
paths:
- backend:
serviceName: default-http-backend
servicePort: 8080
path: /
- backend:
serviceName: foo1-service
servicePort: 8080
path: /foo1/*
- backend:
serviceName: foo2-service
servicePort: 8080
path: /foo2/*
- backend:
serviceName: foo3-service
servicePort: 8080
path: /foo3/*
Looks like your ingress is using a layer 7 load balancer in GCP and the limit for path rules is 50. I couldn't find a standard limit for the path rules in an HTTP(s) load balancer in GCP in their docs. You can see it host and path rules for your LB:
I recommend:
This is hard limitation of the URLMap resource, which cannot be increased.
URL maps
Host rules per URL map - 50 - This limit cannot be increased.
Here's a feature request to increase this limit: https://issuetracker.google.com/issues/126946582