Skip to content

Conversation

@daum3ns
Copy link

@daum3ns daum3ns commented Oct 24, 2025

This change enables the file-based (standalone) provider to understand and load custom resources that are defined by an extension server.

  • the LoadResourcesFromYAMLBytes now accepts a server config pointer. When a resource kind is unknown, the loader checks the configured ExtensionManager and, if the GVK matches a declared policy resource, stores the object as an ExtensionServerPolicy
    • Updated callers to pass the new parameter
  • the newOfflineGatewayAPIClient function now accepts extensionServerPoliciesGVKs, which are then registered in the scheme. this allows the offline reconciler to manipulate custom resources
  • added testcases for decoder, offline_controller and config_loader,
    • the config reload test starts Envoy Gateway in standalone mode, hot-reloads a configuration that adds an ExtensionManager with policy resources, and verifies the new GVKs are recognized

Fixes #7141

Release Notes: Yes/No

Notes:
I found out that we most probably have the same problem with ExtensionManagers backendResources and resources field (at least the config_loader test can easily be extended to show that the registration in the scheme is missing).

I think it could be fixed in a similar way (although not sure whether the translator needs to be adapted as well). See the commented code snippets...

However, I'm very new to envoy-gateway so I'm still raising this PR to get a first, much appreciated feedback whether it makes sense to continue in this direction..

@daum3ns daum3ns requested a review from a team as a code owner October 24, 2025 14:23
@arkodg arkodg requested a review from shawnh2 October 24, 2025 14:25
@arkodg arkodg added this to the v1.6.0 Milestone milestone Oct 24, 2025
…nt scheme

Teach the offline controller to recognise custom extension-server
policy GVKs supplied by an extension so they can be decoded and later
processed by the translator.

- newOfflineGatewayAPIClient now accepts extServerPoliciesGVKs
- each GVK is registered as Unstructured/UnstructuredList in the
  fake client's scheme
- call-site updated to pass the collected policy GVKs

Signed-off-by: daum3ns <[email protected]>
Add policy resources from ExtensionManager to extGKs so custom
extension policies are recognised during translation.

Signed-off-by: daum3ns <[email protected]>
…f an EnvoyGateway configuration containing a standalone extension server.

Signed-off-by: daum3ns <[email protected]>
yaml and it gets the default namespace

Signed-off-by: daum3ns <[email protected]>
can check custom resource definitions

Signed-off-by: daum3ns <[email protected]>
@daum3ns daum3ns force-pushed the support-custom-CRDs-for-ExtensionServer-in-Standalone-Mode branch from 1f7a84b to d66478e Compare October 24, 2025 14:29
@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

❌ Patch coverage is 86.36364% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.00%. Comparing base (fa9f9c3) to head (d66478e).
⚠️ Report is 33 commits behind head on main.

Files with missing lines Patch % Lines
internal/provider/file/store.go 40.00% 2 Missing and 1 partial ⚠️
internal/gatewayapi/runner/runner.go 0.00% 2 Missing ⚠️
internal/provider/file/file.go 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7331      +/-   ##
==========================================
+ Coverage   70.92%   72.00%   +1.07%     
==========================================
  Files         229      230       +1     
  Lines       41071    33372    -7699     
==========================================
- Hits        29131    24030    -5101     
+ Misses      10221     7592    -2629     
- Partials     1719     1750      +31     

☔ 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.

Signed-off-by: daum3ns <[email protected]>
ExtensionManager.resources and ExtensionManager.backendResources, use
assertions

Signed-off-by: daum3ns <[email protected]>
@daum3ns
Copy link
Author

daum3ns commented Oct 30, 2025

@shawnh2 i have added a test scenario which shows we have the same problem for the other 2 resources fields in the extension manager in standalone mode....
f996f5a

i think i will address this in this PR as well.. (or would you prefer a separate Issue/PR ?)
Can you answer this question here?
https://github.com/daum3ns/envoy-gateway/blob/support-custom-CRDs-for-ExtensionServer-in-Standalone-Mode/internal/gatewayapi/resource/load.go#L454
Im not sure whether all extensions should go in the same field or wether there are dedicated fields for the different types...

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.

Support custom CRDs for ExtensionServer in Standalone Mode

2 participants