Skip to content

xds: enable udpa.TypeStruct#6311

Merged
zirain merged 1 commit intoenvoyproxy:mainfrom
zirain:udpa-typed-struct
Jun 16, 2025
Merged

xds: enable udpa.TypeStruct#6311
zirain merged 1 commit intoenvoyproxy:mainfrom
zirain:udpa-typed-struct

Conversation

@zirain
Copy link
Member

@zirain zirain commented Jun 14, 2025

This patch enable us to use configuration as following:

apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyPatchPolicy
metadata:
  name: envoy-lua-filter
spec:
  targetRef:
    group: gateway.networking.k8s.io
    kind: Gateway
    name: eg
  type: JSONPatch
  jsonPatches:
    - type: "type.googleapis.com/envoy.config.listener.v3.Listener"
      # The listener name is of the form <GatewayNamespace>/<GatewayName>/<GatewayListenerName>
      name: default/eg/http
      operation:
        op: add
        path: "/default_filter_chain/filters/0/typed_config/http_filters/0"
        value:
          name: "envoy.lua"
          typedConfig:
            "@type": type.googleapis.com/udpa.type.v1.TypedStruct
            typeUrl: type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua
            value:
              inline_code: |
                function envoy_on_request(request_handle)
                  -- Make an HTTP call to an upstream host with the following headers, body, and timeout.
                  val = request_handle:headers():get("key1")
                  request_handle:logWarn("get result: " .. val)
                end

Signed-off-by: zirain <zirain2009@gmail.com>
@zirain zirain requested a review from a team as a code owner June 14, 2025 15:00
@codecov
Copy link

codecov bot commented Jun 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.59%. Comparing base (9219f82) to head (76d4008).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6311      +/-   ##
==========================================
+ Coverage   70.56%   70.59%   +0.03%     
==========================================
  Files         220      220              
  Lines       36829    36829              
==========================================
+ Hits        25989    26001      +12     
+ Misses       9302     9295       -7     
+ Partials     1538     1533       -5     

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

Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

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

LGTM thanks !

@arkodg arkodg requested review from a team June 16, 2025 02:22
@zirain zirain merged commit 8d6d423 into envoyproxy:main Jun 16, 2025
45 of 47 checks passed
@zirain zirain deleted the udpa-typed-struct branch June 16, 2025 06:35
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.

3 participants