Skip to content

change process GVK for TLSRoute/BackendTLSPolicy#7523

Closed
zirain wants to merge 8 commits intoenvoyproxy:mainfrom
zirain:support-multiple-gvk
Closed

change process GVK for TLSRoute/BackendTLSPolicy#7523
zirain wants to merge 8 commits intoenvoyproxy:mainfrom
zirain:support-multiple-gvk

Conversation

@zirain
Copy link
Copy Markdown
Member

@zirain zirain commented Nov 15, 2025

fixes: #7522

related to: #7090

For TLSRoute, use v1alpha2.
For BackendTLSPolicy, use v1alpha3.

The goal is make EG v1.6+ work with Gateway API v1.3 this's important during the upgrade.

Fixes: #7709

@zirain zirain requested a review from a team as a code owner November 15, 2025 09:00
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 15, 2025

Codecov Report

❌ Patch coverage is 61.72840% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.77%. Comparing base (fba4f46) to head (1e08257).
⚠️ Report is 115 commits behind head on main.

Files with missing lines Patch % Lines
internal/provider/kubernetes/status.go 0.00% 10 Missing ⚠️
internal/provider/kubernetes/status_updater.go 18.18% 8 Missing and 1 partial ⚠️
internal/provider/kubernetes/indexers.go 30.00% 2 Missing and 5 partials ⚠️
internal/cmd/egctl/status.go 0.00% 2 Missing ⚠️
internal/provider/kubernetes/controller.go 88.23% 0 Missing and 2 partials ⚠️
internal/provider/kubernetes/predicates.go 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7523      +/-   ##
==========================================
- Coverage   72.82%   72.77%   -0.06%     
==========================================
  Files         235      235              
  Lines       35176    35185       +9     
==========================================
- Hits        25618    25605      -13     
- Misses       7744     7762      +18     
- Partials     1814     1818       +4     

☔ View full report in Codecov by Sentry.
📢 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.

Comment thread internal/provider/kubernetes/controller.go Outdated
@zirain zirain force-pushed the support-multiple-gvk branch from 3ec1a42 to 6ef897d Compare November 15, 2025 13:48
@zirain zirain changed the title watch multiple group versions change process GVK for TLSRoute/BackendTLSPolicy Nov 15, 2025
Comment thread internal/provider/kubernetes/status.go Outdated
@zirain zirain force-pushed the support-multiple-gvk branch from 2dceab3 to 05f0125 Compare November 16, 2025 12:50
@zhaohuabing
Copy link
Copy Markdown
Member

zhaohuabing commented Nov 17, 2025

Thanks @zirain for fixing this. Could this happen again next time when we upgrade Gateway API? Is there anything that we can do to prevent it in the future-and upgrade test?

@zirain zirain force-pushed the support-multiple-gvk branch from 05f0125 to 134bde6 Compare November 17, 2025 03:37
@zirain
Copy link
Copy Markdown
Member Author

zirain commented Nov 17, 2025

@zirain
Copy link
Copy Markdown
Member Author

zirain commented Nov 17, 2025

Thanks @zirain for fixing this. Could this happen again next time when we upgrade Gateway API? Is there anything that we can do to prevent it in the future-and upgrade test?

we should be careful with the verions that EG supported.

@zirain zirain force-pushed the support-multiple-gvk branch from 134bde6 to 853ad46 Compare November 20, 2025 02:08
Signed-off-by: zirain <zirain2009@gmail.com>
@zirain zirain force-pushed the support-multiple-gvk branch from 853ad46 to 2e8fe19 Compare November 20, 2025 02:54
@zirain
Copy link
Copy Markdown
Member Author

zirain commented Dec 4, 2025

we didn't need this ATM.

Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
@zhaohuabing zhaohuabing requested a review from a team December 29, 2025 09:40
@zhaohuabing
Copy link
Copy Markdown
Member

zhaohuabing commented Dec 29, 2025

Hi @zirain, this is needed for #7709. Hope you don’t mind—I reopened this PR and pushed a few commits to sync with main and fix the tests. Really appreciate all the work you’ve done on this PR. Thanks!

@zhaohuabing zhaohuabing marked this pull request as draft December 29, 2025 11:34
Signed-off-by: Huabing Zhao <zhaohuabing@gmail.com>
@zhaohuabing zhaohuabing marked this pull request as ready for review December 29, 2025 12:52
@zhaohuabing zhaohuabing requested a review from rudrakhp December 29, 2025 12:58
@arkodg
Copy link
Copy Markdown
Contributor

arkodg commented Jan 1, 2026

so this issue is because the user didnt update CRDs ? and this section is missing ?

spec:
  versions:
  - name: v1alpha1
    served: true
    storage: false
  - name: v1
    served: true
    storage: true

and should we enforce that v1.6 CRDs be applied before v1.7 upgrade ?

@zhaohuabing
Copy link
Copy Markdown
Member

zhaohuabing commented Jan 5, 2026

so this issue is because the user didnt update CRDs ? and this section is missing ?

The reason is that the user didn't update CRDs - BackendTLSPolicy in the cluster is v1alpha3, and EG v1.6 only watches v1. So the BackendTLSPolicies are not reconciled by EG.

we enforce that v1.6 CRDs be applied before v1.7 upgrade ?

I think it’s reasonable for EG to stay compatible with the previous Gateway API version to ensure a smooth upgrade, but we don’t necessarily need to keep compatibility with versions before that. We can make this explicit in the compatibility matrix and upgrade sections in the docs.

@lboynton
Copy link
Copy Markdown
Contributor

Could this be added in to 1.6.x soon? Currently we are unable to upgrade from 1.5.x to 1.6.x because we use BackendTLSPolicy resources, which stop working (see #7709) when upgrading. EGW 1.5.x is not forward compatible with GW API CRDs v1.4 and 1.6.x is not backward compatible with GW API CRDs v1.3, so there's no way to upgrade without some downtime.

@zhaohuabing
Copy link
Copy Markdown
Member

zhaohuabing commented Jan 29, 2026

Hi @lboynton will upgrading CRD first solve your case?

For the v1.3.0 experimental to v1.4.1 standard channel upgrade path, I don't think this PR will help, as it will only watch the old v1alpha3.

If we want EG to work with v1.4.1 standard channel, this PR shouldn't be merged.

  - deprecated: true
    deprecationWarning: The v1alpha3 version of BackendTLSPolicy has been deprecated
      and will be removed in a future release of the API. Please upgrade to v1.
    name: v1alpha3
    served: false
    storage: false
    subresources:
      status: {}

@lboynton
Copy link
Copy Markdown
Contributor

lboynton commented Jan 29, 2026

OK sorry, I don't think this is needed (at least for my case). I misunderstood the problem, it was actually a fix in envoy gateway v1.5.x I needed to make that version compatible with GW API CRDs v1.4.x before completing the upgrade to envoy gateway v1.6.x. See my comment on #7709.

@zhaohuabing
Copy link
Copy Markdown
Member

Discussed in today’s community meeting: the decision is to continue watching the v1 version of BackendTLSPolicy, so Envoy Gateway v1.6 can work with the Gateway API v1.4.1 standard channel.

For users upgrading from v1.5.x to v1.6.x, the recommended upgrade order is:
1. Upgrade the Gateway API CRDs first.
2. Then upgrade Envoy Gateway.

We should also add e2e tests for rollback scenarios—for example, verifying that EG v1.5.x works correctly with Gateway API v1.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backend and BackendTLSPolicy stops working after v1.5.6 Support both v1alpha3 and v1 Gateway API

5 participants