Skip to content

fix: route status condition order - #10183

Merged
zhaohuabing merged 2 commits into
envoyproxy:mainfrom
kkk777-7:fix-route-status-condition-order
Oct 15, 2026
Merged

zhaohuabing merged 2 commits into
envoyproxy:mainfrom
kkk777-7:fix-route-status-condition-order

Conversation

@kkk777-7

@kkk777-7 kkk777-7 commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

What this PR does / why we need it:

TypedErrorCollector returned condition types in map iteration order, so when a route parent had errors of more than one condition type (e.g. ResolvedRefs and BackendsAvailable), the order of those conditions changed between translations.

The status comparisons on the way to the API server are order-sensitive (reflect.DeepEqual in the watchable map, cmp.Equal in isStatusEqual), so a reordered status was treated as changed. This caused unnecessary status writes, resourceVersion bumps and lastTransitionTime refreshes for affected routes, and made golden tests flaky (found while working on #10180).

This PR sorts the condition types: the Gateway API defined types come first in their spec order (Accepted, ResolvedRefs, PartiallyInvalid), followed by the others in lexical order.

Which issue(s) this PR fixes:

Fixes #10182


PR Checklist

  • Authorship & ownership: Coding agents / AI assistants are welcome, but I have reviewed every change, understand how and why it works, can explain and maintain it, and take full responsibility for this PR. I have not submitted generated output I do not understand.
  • DCO: All commits are signed off (git commit -s). See DCO: Sign your work.
  • API agreed first: If this PR contains API changes (changes under /api), the API was discussed and agreed before the implementation. The API change can be in a separate PR, or in the same PR, but the API must be agreed before implementation. N/A if this PR does not contain API changes.
  • Required checks pass: make generate gen-check, make lint, and the unit-test/coverage build pass. (Flaky e2e failures are not considered breakages, but gen-check, lint, and coverage MUST pass.)
  • Tests added/updated: New/changed code is covered by appropriate tests. N/A if this PR does not contain code changes.
  • Docs: User-facing changes update the docs, either in this PR or a follow-up PR. N/A if this PR does not contain user-facing changes.
  • Release notes: For any non-trivial change, added a release-note fragment under release-notes/current/<section>/<pr-number>-<slug>.md (see release-notes/current/README.md for sections and naming). N/A if this PR does not contain non-trivial changes.
  • Generated files committed: Ran make gen-check and committed the result if API/helm charts/modules changed.
  • Scope & compatibility: The PR is reasonably scoped (no unrelated changes) and preserves backward compatibility, or any breaking change is called out above and documented in release-notes/current/breaking_changes/.
  • Codex review: Requested a Codex review and addressed all of its comments.
  • Copilot review: Requested a Copilot review and addressed all of its comments.

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
@kkk777-7
kkk777-7 requested a review from a team as a code owner October 4, 2026 15:16
@netlify

netlify Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit ef325f6
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6ac26dc30d890600082d76e0
😎 Deploy Preview https://deploy-preview-10183--cerulean-figolla-1f9435.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.48%. Comparing base (5f4f6c4) to head (ef325f6).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10183      +/-   ##
==========================================
- Coverage   81.48%   81.48%   -0.01%     
==========================================
  Files         266      266              
  Lines       41390    41398       +8     
==========================================
+ Hits        33728    33733       +5     
- Misses       7661     7664       +3     
  Partials        1        1              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@kkk777-7

Copy link
Copy Markdown
Member Author

@codex

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T02:45:25.858674Z ef325f6 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: ef325f6614

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@zhaohuabing zhaohuabing left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks!

@zhaohuabing
zhaohuabing merged commit 9c86486 into envoyproxy:main Oct 15, 2026
44 checks passed
HusseinKabbout pushed a commit to HusseinKabbout/gateway that referenced this pull request Oct 15, 2026
* fix(status): report route status conditions in a deterministic order

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* add release note

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

---------

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
kkk777-7 added a commit to kkk777-7/gateway that referenced this pull request Oct 24, 2026
* fix(status): report route status conditions in a deterministic order

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* add release note

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

---------

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
kkk777-7 added a commit that referenced this pull request Oct 24, 2026
* fix(infrastructure): mount writable /tmp on the shutdown-manager (#10120)

* fix(infrastructure): mount writable /tmp on the shutdown-manager

The shutdown-manager signals drain completion by creating
/tmp/shutdown-ready. Since the fix for #4881, the controller replicates
the user-provided Envoy container securityContext onto the
shutdown-manager. When that securityContext sets
readOnlyRootFilesystem: true, the shutdown-manager can no longer create
the file, the Envoy preStop hook never gets a 200, the kubelet logs
FailedPreStopHook, and both containers are SIGKILLed after the full
grace period, making every proxy pod deletion take the full
terminationGracePeriodSeconds instead of the drain duration.

Mount a dedicated writable emptyDir at /tmp on the shutdown-manager
(same approach as the writable wasm-cache emptyDir added for the
control plane in #9069). The user's securityContext replication is
preserved (custom runAsUser, capabilities, readOnlyRootFilesystem: true
all keep working), so hardened deployments no longer break graceful
shutdown.

Fixes #10119

Signed-off-by: Clement Phu <clement.phu@hotmail.fr>

* fix(shutdown-manager): clear stale shutdown ready marker at startup

An emptyDir volume persists across container restarts within the same
pod, so a /tmp/shutdown-ready marker created by a previous drain could
short-circuit the next drain sequence. Remove the marker when the
shutdown manager starts.

Signed-off-by: Clement Phu <clement.phu@hotmail.fr>

* fix(infrastructure): combine volume appends to satisfy gocritic

Address the appendCombine lint failure reported by CI.

Signed-off-by: Clement Phu <clement.phu@hotmail.fr>

---------

Signed-off-by: Clement Phu <clement.phu@hotmail.fr>

* fix(message): release discarded coalesced updates (#10144)

* [envoy-gateway] Release discarded coalesced snapshots [ci changed_files]

Signed-off-by: Cooper Gamble <cooper@openai.com>

* [envoy-gateway] Note coalesced update retention fix [ci changed_files]

Signed-off-by: Cooper Gamble <cooper@openai.com>

---------

Signed-off-by: Cooper Gamble <cooper@openai.com>

* fix(translator): use own route config name for TLS listeners sharing port with HTTP (#10171)

* fix(translator): use own route config name for TLS listeners sharing a port with HTTP

When an HTTP listener shares a container port with HTTPS listeners and is translated first, HTTPS virtual hosts ended up in its RouteConfiguration while their own filter chains referenced route configs that never existed. Default filter chain lookup only applies to plain HTTP listeners.

Fixes #10170

Signed-off-by: stillya <st.ilya.101@gmail.com>

* docs: add release note for #10171

Signed-off-by: stillya <st.ilya.101@gmail.com>

---------

Signed-off-by: stillya <st.ilya.101@gmail.com>

* fix: handle EndpointSlices labelled with both a Service and a ServiceImport (#10192)

* fix: handle EndpointSlices labelled with both a Service and a ServiceImport

Fixes #10191

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Signed-off-by: Seiji Chew <seiji@exa.ai>

* release-notes: use PR number for MCS EndpointSlice fix

Signed-off-by: Seiji Chew <seiji@exa.ai>

---------

Signed-off-by: Seiji Chew <seiji@exa.ai>
Co-authored-by: Seiji Chew <seiji@exa.ai>

* fix(translator): stop seeding api_key_auth from the first keyed route (#10190)

* fix(translator): stop seeding api_key_auth from the first keyed route

The listener-level api_key_auth filter is emitted disabled and switched on per
route through typed_per_filter_config, but it was built from the first route on
the listener that uses API key authentication.

That publishes one route's credentials in the listener, so adding or rotating a
key on that route rewrites the listener. Envoy then replaces the filter chain
and drains the superseded one, terminating long-lived requests on every route of
the listener. The same change on any other route is a route-only update that
costs nothing, so which route pays is an artifact of ordering.

Build the listener-level filter from an empty config instead. The per route
configs are unchanged.

Signed-off-by: John Lybeck <john.lybeck@amd.com>

* docs: add release note for the api_key_auth listener fix

Signed-off-by: John Lybeck <john.lybeck@amd.com>

* docs: reword the api_key_auth release note per review

Signed-off-by: John Lybeck <john.lybeck@amd.com>

---------

Signed-off-by: John Lybeck <john.lybeck@amd.com>

* chore: bump golang.org/x/net to v0.60.0 (#10254)

Fixes CVE-2026-97032, CVE-2026-78659, CVE-2026-78660, CVE-2026-78663 and
CVE-2026-78669.

Signed-off-by: Hariharan Subramanian <hsubramanian@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c55c776d-397b-4a82-a279-d91e0e21e10d

* fix: route status condition order (#10183)

* fix(status): report route status conditions in a deterministic order

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* add release note

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

---------

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* fix(provider): index HTTPRouteFilters referenced only from backendRef filters (#10246)

* fix(provider): index HTTPRouteFilters referenced only from backendRef filters

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* renumber release note

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

---------

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* fix: record a BackendTrafficPolicy on a TCP or UDP route once (#10289)

A policy with mergeType is applied once per listener of each parentRef,
and a parentRef with a sectionName can name a listener another parentRef
already covers. The feature fields are only set when nil, but the policy
metadata was appended on every pass, so a TCP, TLS or UDP route attached
to the same Gateway twice carried the policy twice. The append now skips
a policy the route already records.

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>

* fix(status): match route parent status by parentRef and controllerName (#10327)

* fix(status): match route parent status by parentRef and controllerName

mergeRouteParentStatus matched old and new RouteParentStatus entries by
parentRef only. When another controller had written its own entry for
the same parentRef, that entry was replaced by our status, so the route
ended up with two entries of ours. The other controller then re-added
its entry, and every following merge added one more duplicate until
status.parents reached its maxItems of 32 and all further status writes
to the route were rejected.

Match entries by parentRef and controllerName, and append each new
entry only once so existing duplicates are collapsed on the next update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Freem <freemanovec@protonmail.com>

* Add release note for route parent status fix

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Freem <freemanovec@protonmail.com>

---------

Signed-off-by: Freem <freemanovec@protonmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix: report merged route policy status on the parentRef ancestor (#10315)

* fix: report merged route policy status on the parentRef ancestor

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* remove todo comments and dead code

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

---------

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Co-authored-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>

* fix: make namespace watch cache ByObject entries deterministic (#10302)

* fix: make namespace watch cache ByObject entries deterministic

ByObject is keyed by object pointer, so the WatchesNamespaces() block added
a second entry for types already registered (Secret, ConfigMap, Service,
EndpointSlice, ServiceAccount, Deployment) and the cache kept one at random.
Replace the existing entry for the type instead, and grant EndpointSlice
read in the controller namespace for Gateway Namespace Mode with watch
namespaces.

Fixes #10271

Signed-off-by: Manish Tiwari <69393822+manish-9245@users.noreply.github.com>

* test: regenerate helm golden for gateway-namespace-config-watch

Signed-off-by: Manish Tiwari <69393822+manish-9245@users.noreply.github.com>

---------

Signed-off-by: Manish Tiwari <69393822+manish-9245@users.noreply.github.com>

* fix(helm): grant controller namespace Secret/EndpointSlice read with watch.namespaces (#10377)

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* fix: not exist field

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* fix: generate testdata

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

---------

Signed-off-by: Clement Phu <clement.phu@hotmail.fr>
Signed-off-by: Cooper Gamble <cooper@openai.com>
Signed-off-by: stillya <st.ilya.101@gmail.com>
Signed-off-by: Seiji Chew <seiji@exa.ai>
Signed-off-by: John Lybeck <john.lybeck@amd.com>
Signed-off-by: Hariharan Subramanian <hsubramanian@microsoft.com>
Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>
Signed-off-by: Freem <freemanovec@protonmail.com>
Signed-off-by: Manish Tiwari <69393822+manish-9245@users.noreply.github.com>
Co-authored-by: Clement Phu <34369901+cleman95@users.noreply.github.com>
Co-authored-by: cooper-oai <cooper@openai.com>
Co-authored-by: Starchenko Ilya <st.ilya.101@gmail.com>
Co-authored-by: Seiji Chew <67301797+schew2381@users.noreply.github.com>
Co-authored-by: Seiji Chew <seiji@exa.ai>
Co-authored-by: Lybeck <john.lybeck@amd.com>
Co-authored-by: Hariharan Subramanian <105889062+hsubramanianaks@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Co-authored-by: Freem <freemanovec@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Manish <69393822+manish-9245@users.noreply.github.com>
Copilot-Session: c55c776d-397b-4a82-a279-d91e0e21e10d
zirain pushed a commit to zirain/gateway that referenced this pull request Oct 25, 2026
* fix(status): report route status conditions in a deterministic order

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* add release note

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

---------

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
zirain added a commit that referenced this pull request Oct 25, 2026
* fix(infrastructure): mount writable /tmp on the shutdown-manager (#10120)

* fix(infrastructure): mount writable /tmp on the shutdown-manager

The shutdown-manager signals drain completion by creating
/tmp/shutdown-ready. Since the fix for #4881, the controller replicates
the user-provided Envoy container securityContext onto the
shutdown-manager. When that securityContext sets
readOnlyRootFilesystem: true, the shutdown-manager can no longer create
the file, the Envoy preStop hook never gets a 200, the kubelet logs
FailedPreStopHook, and both containers are SIGKILLed after the full
grace period, making every proxy pod deletion take the full
terminationGracePeriodSeconds instead of the drain duration.

Mount a dedicated writable emptyDir at /tmp on the shutdown-manager
(same approach as the writable wasm-cache emptyDir added for the
control plane in #9069). The user's securityContext replication is
preserved (custom runAsUser, capabilities, readOnlyRootFilesystem: true
all keep working), so hardened deployments no longer break graceful
shutdown.

Fixes #10119

Signed-off-by: Clement Phu <clement.phu@hotmail.fr>

* fix(shutdown-manager): clear stale shutdown ready marker at startup

An emptyDir volume persists across container restarts within the same
pod, so a /tmp/shutdown-ready marker created by a previous drain could
short-circuit the next drain sequence. Remove the marker when the
shutdown manager starts.

Signed-off-by: Clement Phu <clement.phu@hotmail.fr>

* fix(infrastructure): combine volume appends to satisfy gocritic

Address the appendCombine lint failure reported by CI.

Signed-off-by: Clement Phu <clement.phu@hotmail.fr>

---------

Signed-off-by: Clement Phu <clement.phu@hotmail.fr>
Signed-off-by: zirain <zirain2009@gmail.com>

* fix(message): release discarded coalesced updates (#10144)

* [envoy-gateway] Release discarded coalesced snapshots [ci changed_files]

Signed-off-by: Cooper Gamble <cooper@openai.com>

* [envoy-gateway] Note coalesced update retention fix [ci changed_files]

Signed-off-by: Cooper Gamble <cooper@openai.com>

---------

Signed-off-by: Cooper Gamble <cooper@openai.com>
Signed-off-by: zirain <zirain2009@gmail.com>

* fix(translator): use own route config name for TLS listeners sharing port with HTTP (#10171)

* fix(translator): use own route config name for TLS listeners sharing a port with HTTP

When an HTTP listener shares a container port with HTTPS listeners and is translated first, HTTPS virtual hosts ended up in its RouteConfiguration while their own filter chains referenced route configs that never existed. Default filter chain lookup only applies to plain HTTP listeners.

Fixes #10170

Signed-off-by: stillya <st.ilya.101@gmail.com>

* docs: add release note for #10171

Signed-off-by: stillya <st.ilya.101@gmail.com>

---------

Signed-off-by: stillya <st.ilya.101@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>

* fix: handle EndpointSlices labelled with both a Service and a ServiceImport (#10192)

* fix: handle EndpointSlices labelled with both a Service and a ServiceImport

Fixes #10191

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Signed-off-by: Seiji Chew <seiji@exa.ai>

* release-notes: use PR number for MCS EndpointSlice fix

Signed-off-by: Seiji Chew <seiji@exa.ai>

---------

Signed-off-by: Seiji Chew <seiji@exa.ai>
Co-authored-by: Seiji Chew <seiji@exa.ai>
Signed-off-by: zirain <zirain2009@gmail.com>

* fix(translator): stop seeding api_key_auth from the first keyed route (#10190)

* fix(translator): stop seeding api_key_auth from the first keyed route

The listener-level api_key_auth filter is emitted disabled and switched on per
route through typed_per_filter_config, but it was built from the first route on
the listener that uses API key authentication.

That publishes one route's credentials in the listener, so adding or rotating a
key on that route rewrites the listener. Envoy then replaces the filter chain
and drains the superseded one, terminating long-lived requests on every route of
the listener. The same change on any other route is a route-only update that
costs nothing, so which route pays is an artifact of ordering.

Build the listener-level filter from an empty config instead. The per route
configs are unchanged.

Signed-off-by: John Lybeck <john.lybeck@amd.com>

* docs: add release note for the api_key_auth listener fix

Signed-off-by: John Lybeck <john.lybeck@amd.com>

* docs: reword the api_key_auth release note per review

Signed-off-by: John Lybeck <john.lybeck@amd.com>

---------

Signed-off-by: John Lybeck <john.lybeck@amd.com>
Signed-off-by: zirain <zirain2009@gmail.com>

* chore: bump golang.org/x/net to v0.60.0 (#10254)

Fixes CVE-2026-97032, CVE-2026-78659, CVE-2026-78660, CVE-2026-78663 and
CVE-2026-78669.

Signed-off-by: Hariharan Subramanian <hsubramanian@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c55c776d-397b-4a82-a279-d91e0e21e10d
Signed-off-by: zirain <zirain2009@gmail.com>

* fix: route status condition order (#10183)

* fix(status): report route status conditions in a deterministic order

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* add release note

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

---------

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>

* fix(provider): index HTTPRouteFilters referenced only from backendRef filters (#10246)

* fix(provider): index HTTPRouteFilters referenced only from backendRef filters

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

* renumber release note

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>

---------

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>

* fix: record a BackendTrafficPolicy on a TCP or UDP route once (#10289)

A policy with mergeType is applied once per listener of each parentRef,
and a parentRef with a sectionName can name a listener another parentRef
already covers. The feature fields are only set when nil, but the policy
metadata was appended on every pass, so a TCP, TLS or UDP route attached
to the same Gateway twice carried the policy twice. The append now skips
a policy the route already records.

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>
Signed-off-by: zirain <zirain2009@gmail.com>

* fix(status): match route parent status by parentRef and controllerName (#10327)

* fix(status): match route parent status by parentRef and controllerName

mergeRouteParentStatus matched old and new RouteParentStatus entries by
parentRef only. When another controller had written its own entry for
the same parentRef, that entry was replaced by our status, so the route
ended up with two entries of ours. The other controller then re-added
its entry, and every following merge added one more duplicate until
status.parents reached its maxItems of 32 and all further status writes
to the route were rejected.

Match entries by parentRef and controllerName, and append each new
entry only once so existing duplicates are collapsed on the next update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Freem <freemanovec@protonmail.com>

* Add release note for route parent status fix

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Freem <freemanovec@protonmail.com>

---------

Signed-off-by: Freem <freemanovec@protonmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zirain <zirain2009@gmail.com>

* fix: make namespace watch cache ByObject entries deterministic (#10302)

* fix: make namespace watch cache ByObject entries deterministic

ByObject is keyed by object pointer, so the WatchesNamespaces() block added
a second entry for types already registered (Secret, ConfigMap, Service,
EndpointSlice, ServiceAccount, Deployment) and the cache kept one at random.
Replace the existing entry for the type instead, and grant EndpointSlice
read in the controller namespace for Gateway Namespace Mode with watch
namespaces.

Fixes #10271

Signed-off-by: Manish Tiwari <69393822+manish-9245@users.noreply.github.com>

* test: regenerate helm golden for gateway-namespace-config-watch

Signed-off-by: Manish Tiwari <69393822+manish-9245@users.noreply.github.com>

---------

Signed-off-by: Manish Tiwari <69393822+manish-9245@users.noreply.github.com>
Signed-off-by: zirain <zirain2009@gmail.com>

* fix(helm): grant controller namespace Secret/EndpointSlice read with watch.namespaces (#10377)

Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>

* fix lint

Signed-off-by: zirain <zirain2009@gmail.com>

* fix gen

Signed-off-by: zirain <zirain2009@gmail.com>

* fix: deterministic parentRef order (#10393)

Signed-off-by: zirain <zirain2009@gmail.com>

---------

Signed-off-by: Clement Phu <clement.phu@hotmail.fr>
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: Cooper Gamble <cooper@openai.com>
Signed-off-by: stillya <st.ilya.101@gmail.com>
Signed-off-by: Seiji Chew <seiji@exa.ai>
Signed-off-by: John Lybeck <john.lybeck@amd.com>
Signed-off-by: Hariharan Subramanian <hsubramanian@microsoft.com>
Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>
Signed-off-by: Freem <freemanovec@protonmail.com>
Signed-off-by: Manish Tiwari <69393822+manish-9245@users.noreply.github.com>
Co-authored-by: Clement Phu <34369901+cleman95@users.noreply.github.com>
Co-authored-by: cooper-oai <cooper@openai.com>
Co-authored-by: Starchenko Ilya <st.ilya.101@gmail.com>
Co-authored-by: Seiji Chew <67301797+schew2381@users.noreply.github.com>
Co-authored-by: Seiji Chew <seiji@exa.ai>
Co-authored-by: Lybeck <john.lybeck@amd.com>
Co-authored-by: Hariharan Subramanian <105889062+hsubramanianaks@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Kota Kimura <86363983+kkk777-7@users.noreply.github.com>
Co-authored-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Co-authored-by: Freem <freemanovec@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Manish <69393822+manish-9245@users.noreply.github.com>
Copilot-Session: c55c776d-397b-4a82-a279-d91e0e21e10d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Route status conditions are emitted in non-deterministic order, causing unnecessary status updates

3 participants