Skip to content

Automated cherry pick of #1214: doc/service: describe supported target group attributes#1314

Merged
k8s-ci-robot merged 4 commits intokubernetes:release-1.34from
kmala:automated-cherry-pick-of-#1214-upstream-release-1.34
Dec 10, 2025
Merged

Automated cherry pick of #1214: doc/service: describe supported target group attributes#1314
k8s-ci-robot merged 4 commits intokubernetes:release-1.34from
kmala:automated-cherry-pick-of-#1214-upstream-release-1.34

Conversation

@kmala
Copy link
Member

@kmala kmala commented Dec 9, 2025

Cherry pick of #1214 on release-1.34.

#1214: doc/service: describe supported target group attributes

For details on the cherry pick process, see the cherry pick requests page.

A new annotation, `service.beta.kubernetes.io/aws-load-balancer-target-group-attributes`, has been introduced for Kubernetes Service resources of type LoadBalancer to allow configuration of Network Load Balancer (NLB) target group attributes. This enables users to resolve hairpinning issues by setting `preserve_client_ip.enabled=false` and to track source IP addresses with `proxy_protocol_v2.enabled=true`, when the backend supports it. Using this feature requires the `DescribeTargetGroupAttributes` and `ModifyTargetGroupAttributes` IAM permissions.

Document the new annotation for NLB to handle target group attributes,
with examples and restrictions.
Implementing the hairpin connection test cases, and exposing an issue on
NLB with internal scheme which fails when the client is trying
to access a service loadbalancer which is hosted in the same node.

The hairpin connection is caused by the client IP preservation attribute
is set to true (default), and the service does not provide an interface
to prevent the issue.

The e2e is expecting to pass to prevent permanent failures in CI, but it
is tracked by an issue kubernetes#1160.
Introduce pre-flight validations adding pre-flight checks for
EnsureLoadBalancer with tasks to validate Service object constraints
prior making calls to the provider.

This aims to prevent changes to the resources when invalid configuration
is provided.

Currently only NLB target group attributes validations is added as part of this change.

feat/tg-attr: support target group attrib annotation on NLB
Introduce the target group annotation[1] for all listeners on a Service
type-loadBalancer NLB.

[1] Annotation service.beta.kubernetes.io/aws-load-balancer-target-group-attributes

The annotation provides a interface for users to opt into non-default
configurations of a target group when creating or updating a Service.

This change also provides a fix for a critical hairpin bug impacting NLB
default configuration (using target type instance), which disables the
'preserve source ip configuration' attribute, leading to timeouts in
such scenario.
@k8s-ci-robot k8s-ci-robot added needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 9, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If cloud-provider-aws contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Dec 9, 2025
Copy link
Member

@yue9944882 yue9944882 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 10, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yue9944882

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 10, 2025
@k8s-ci-robot k8s-ci-robot merged commit 4e5afee into kubernetes:release-1.34 Dec 10, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants