Skip to content

fix: React to changed ServiceEntry VIPs for ingress-use-waypoint#14391

Merged
davidjumani merged 1 commit into
kgateway-dev:mainfrom
ymesika:14390-serviceentry-status-vip
Jul 13, 2026
Merged

fix: React to changed ServiceEntry VIPs for ingress-use-waypoint#14391
davidjumani merged 1 commit into
kgateway-dev:mainfrom
ymesika:14390-serviceentry-status-vip

Conversation

@ymesika

@ymesika ymesika commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Description

When an ingress-use-waypoint HTTPRoute targets a ServiceEntry via a Hostname backendRef, and that ServiceEntry relies on Istio IP auto-allocation (no spec.addresses), the ingress returned 503s for newly created ServiceEntries.

Istio writes the auto-allocated VIP to ServiceEntry.status.addresses, which does not bump the object's generation. BackendObjectIR.Equals compares the source object by generation (labels/annotations), so the status-only VIP update was treated as no change: the backend built before the VIP was allocated kept an empty static cluster and was never reprogrammed. Any metadata edit to the ServiceEntry (e.g. adding an annotation) worked around it by forcing a re-evaluation.

The ServiceEntry backend now carries its resolved addresses (which include status.addresses) in BackendObjectIR.ObjIr, so a change to those addresses flips backend equality and the static cluster is reprogrammed with the allocated VIP.

Fixes #14390

Change Type

/kind fix

Changelog

Fix 503s for ingress-use-waypoint routes to auto-allocated ServiceEntries.

Additional Notes

Copilot AI review requested due to automatic review settings July 13, 2026 11:26
@gateway-bot gateway-bot added kind/fix Categorizes issue or PR as related to a bug. release-note labels Jul 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a stale-backend bug in kgateway’s Istio ServiceEntry integration for the ingress-use-waypoint path: when Istio auto-allocates a VIP by writing only to ServiceEntry.status.addresses (without bumping generation), kgateway now detects that change and reprograms the static cluster, preventing persistent 503s.

Changes:

  • Include resolved ServiceEntry addresses (including status.addresses) in BackendObjectIR.ObjIr so backend equality changes when the VIP is allocated.
  • Add unit tests validating that status-only VIP updates flip backend equality while no-op updates remain stable.
  • Add an e2e ingress test case and supporting YAML to exercise the auto-allocated VIP scenario end-to-end.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
test/e2e/features/waypoint/testdata/httproute-ingress-serviceentry.yaml New e2e test manifest covering ServiceEntry VIP auto-allocation + ingress Hostname backend routing.
test/e2e/features/waypoint/cases_ingress.go Adds an e2e test that waits for ServiceEntry.status.addresses VIP assignment and verifies ingress traffic succeeds via waypoint.
pkg/kgateway/extensions2/plugins/serviceentry/backends.go Makes backend equality sensitive to resolved ServiceEntry addresses so status-only VIP changes trigger backend re-emit/reprogram.
pkg/kgateway/extensions2/plugins/serviceentry/backends_test.go Unit tests ensuring backend equality reacts to status VIP allocation and remains stable otherwise.

@davidjumani
davidjumani added this pull request to the merge queue Jul 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 13, 2026
@ymesika
ymesika added this pull request to the merge queue Jul 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 13, 2026
@davidjumani
davidjumani added this pull request to the merge queue Jul 13, 2026
Merged via the queue into kgateway-dev:main with commit 809ce2e Jul 13, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/fix Categorizes issue or PR as related to a bug. release-note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ingress-use-waypoint results in 503s for newly aded ServiceEntries

4 participants