aws / aws-application-networking-k8s

A Kubernetes controller for Amazon VPC Lattice

Home Page:https://www.gateway-api-controller.eks.aws.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configurable target group port

johnstaf144 opened this issue · comments

commented

Currently, all VPC Lattice target groups are created with the target group port as 80 which is not configurable.

Reference:

Could we change this so that we can configure the target group port, possibly using the TargetGroupPolicy. It could look something like:

kind: TargetGroupPolicy
metadata:
    name: test-policy
spec:
    targetRef:
        group: ""
        kind: Service
        name: my-parking-service
    port: 8080 # new attribute proposal

and if port is not supplied it can use the current default of 80 for backwards compatibility. If this proposal is accepted I'm happy to attempt a PR for the change.

Many thanks

Hi @johnstaf144, thanks for opening this issue.

The port used at target group creation is basically just a placeholder, it isn't actually used for routing traffic. When we register the targets, we specify the port that is actually used. This logic exists in model_build_targets.go.

Was there another reason behind needing to specify this port value?