Open sknmi opened 1 month ago
We don't have the ability to disable it for specific ports. We add it as feature. Any community contributes are welcome
TargetGroupBinding feature also doesn't work, since alb-controller removes all manually added listeners from NLB :/
@wweiwei-li What would be the ideal way to implement this? Would a target group override annotation for the service port name be reasonable? for example below this would disable proxy_protocol_v2
for port 443.
apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.kubernetes.io/aws-load-balancer-target-group-overrides-https: "proxy_protocol_v2.enabled=false"
service.beta.kubernetes.io/aws-load-balancer-target-group-attributes: "proxy_protocol_v2.enabled=true"
Another possibility is to use the existing annotation but create a field in the attributes that can map overrides to port names.
apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.kubernetes.io/aws-load-balancer-target-group-attributes: "overrides.http.proxy_protocol_v2.enabled=false,overrides.http.proxy_protocol_v2.enabled=true"
spec:
ports:
- name: http
port: 80
targetPort: 8080
protocol: TCP
- name: https
port: 443
targetPort: 8443
protocol: TCP
I may have some time to work on this feature
I'm using nginx-ingress and want to expose gitlab-shell service on TCP port 22.
So for 443/80 ports I need proxy protocol and it works as expected, but for port 22 I don't need it. If I disabled it in target group by hands aws-load-balancer-controler sets proxy protocol for that tcp 22 port back after some time.
I know it is also possible to set something like this fornginx-ingress:
But none of them works.
Describe the solution you'd like Ability to disable proxy-protocol for specific ports.
Describe alternatives you've considered Using https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.9/guide/targetgroupbinding/targetgroupbinding/ this maybe.