Skip to content

Automated cherry pick of #1153: e2e/deps: enhance test scenarios with NLB #1161: e2e/loadbalancer: implement hairpin connection cases #1215: refact: e2e tests documenting hooks and enhance logging/steps #1217: e2e/debug: increase data collection on e2e failures #1214: doc/service: describe supported target group attributes#1315

Merged
k8s-ci-robot merged 9 commits intokubernetes:release-1.33from
kmala:automated-cherry-pick-of-#1153-#1161-#1215-#1217-#1214-upstream-release-1.33
Jan 21, 2026

Conversation

@kmala
Copy link
Member

@kmala kmala commented Dec 9, 2025

Cherry pick of #1153 #1161 #1215 #1217 #1214 on release-1.33.

#1153: e2e/deps: enhance test scenarios with NLB
#1161: e2e/loadbalancer: implement hairpin connection cases
#1215: refact: e2e tests documenting hooks and enhance logging/steps
#1217: e2e/debug: increase data collection on e2e failures
#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.

This change enhance test scenarios by:
- supporting more distributions which does not allow pods to bind on
  privileged ports (default behavior of libjig, see issue
- refact tests to allow adding more cases
- introduce tests to NLB, including advanced tests to validate the node
  selector annotation. AWS SDK is added to satisfy this validatoin.
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.
This change enhance the logging and ginkgo steps of the loadbalancer
reachable e2e test cases.

The Hooks, created to allow test case customization, is renamed and documented.

Finally the configuration are encapsulated into a single structure to
enhance parallel tests.
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 the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Dec 9, 2025
@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. 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. labels Dec 9, 2025
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Dec 10, 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
@elmiko
Copy link
Contributor

elmiko commented Jan 21, 2026

/triage accepted
/approve

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 21, 2026
@kmala
Copy link
Member Author

kmala commented Jan 21, 2026

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: elmiko, kmala, 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 Jan 21, 2026
@k8s-ci-robot k8s-ci-robot merged commit 6c5a136 into kubernetes:release-1.33 Jan 21, 2026
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. 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. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants