There is a limit of 5 conditions per rule in ALB listener. When I create an ingress resource on EKS cluster, ALB ingress controller creates a rule in the load balancer listener which has 2 conditions:
- HTTP Host Header is blabla.mycompany.com
- Path Pattern is /*
I need to be able to add 4 additional conditions for my application, but then it would exceed the 5 condition limit.
If I go to the AWS console and edit load balancer rules manually, I can remove the condition#2 and everything still works, so I don't actually need condition#2 to be there.
How can I define an ingress resource so ALB ingress controller only adds the "Host Header" rule and leaves the 4 remaining condition slots empty?
Below is my current ingress definition. I've tried a few different things with pathType but it still generates the path condition:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
alb.ingress.kubernetes.io/certificate-arn: mycertificatearn
alb.ingress.kubernetes.io/conditions.my-service: '[{"field":"source-ip",...'
alb.ingress.kubernetes.io/group.name: my-alb-group
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80},{"HTTPS":443}]'
alb.ingress.kubernetes.io/load-balancer-attributes: idle_timeout.timeout_seconds=150
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/ssl-policy: ELBSecurityPolicy-2016-08
alb.ingress.kubernetes.io/ssl-redirect: "443"
alb.ingress.kubernetes.io/target-type: ip
kubernetes.io/ingress.class: alb
name: my-ingress
namespace: my-namespace
spec:
rules:
- host: blabla.mycompany.com
http:
paths:
- backend:
service:
name: my-service
port:
number: 80
pathType: ImplementationSpecific
Here is an example, that yoy looking for: https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/guide/ingress/annotations/ - it's limit: 5 condition in a rule.