Configurable target group port
johnstaf144 opened this issue · comments
Currently, all VPC Lattice target groups are created with the target group port as 80
which is not configurable.
Reference:
- https://github.com/aws/aws-application-networking-k8s/blob/main/pkg/gateway/model_build_targetgroup.go#L176
- https://github.com/aws/aws-application-networking-k8s/blob/main/pkg/gateway/model_build_targetgroup.go#L350
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?