kubernetes-sigs / aws-load-balancer-controller

A Kubernetes controller for Elastic Load Balancers
https://kubernetes-sigs.github.io/aws-load-balancer-controller/
Apache License 2.0
3.89k stars 1.44k forks source link

[Feature Request] Need re-writing path #3793

Open kworkbee opened 1 month ago

kworkbee commented 1 month ago

As with the rewrite-target annotation of NGINX Ingress, I ask you to add annotation and related features to enable Path Rewrite.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-example
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
  rules:
    - http:
        paths:
        - path: /
          pathType: Prefix
          backend:
            service:
              name: service-one
              port:
                number: 80
        - path: /something(/|$)(.*)
          pathType: Prefix
          backend:
            service:
              name: service-two
              port:
                number: 80
M00nF1sh commented 1 month ago

@kworkbee ALB itself don't have request modification capability, as a result we cannot implement path-rewrite. ALB team is aware of this feature request and we can add support for it once they added support