-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allowing matching a filterchain when applying EnvoyPatchPolicy #1686
Comments
thanks for surfacing this limitation where today with the
|
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
Close this as we don't need it anymore. We can reopen if someone else asks for this feature. |
Hi @zhaohuabing, I would like to restart the discussion on that topic. I stumbled upon several limitations, which are not yet addressed or merged etc. As I said its a great feature, but array element selection is essential. Can we move away from JSON Patch or provide an additional option? And maybe use something like that: This would allow to manipulate the json doc like this: json:
jq expression:
result:
full command to reproduce:
BTW: Happy to create a PR for that, if we can agree on something like that |
@denniskniep Thanks for proposing this solution. It looks promising. @arkodg How do you think about supporting jq style matching within the |
Essentially what we discussed on eg community meeting:
To bring up an additionally point: that lib is released under MIT License, is that fine for eg project? cc: @zhaohuabing, @arkodg, @guydc Anything further that needs to be mentioned? |
From my point of view it would be simply another |
thanks for bringing it up in the community meeting today @denniskniep |
Hi,
I did a small PoC here: https://github.com/denniskniep/json-patch-by-path-demo The core logic is:
In this PoC I used the following JsonPath lib: https://github.com/ohler55/ojg What do you think @zhaohuabing @arkodg ? Is that conceptionally something we can aim for? |
hey @denniskniep thanks for digging deeper, I'd be a +1 for this approach wdyt @envoyproxy/gateway-maintainers |
@denniskniep brilliant! +1 for this. |
thanks for bringing this up in the community meeting today @denniskniep, there were no objections for this approach yet, please feel free to continue with this. |
Seems to be that kubectl is using its own implementation from k8s client-go lib Client-Go Lib parser is called from the get command here I dont think that it makes sense to include the entire client-go lib only for that json path. Furthermore it has no implementation to resolve the path to location strings. That would make the jsonPath to Pointer conversion even harder. Therefore my vote for https://github.com/ohler55/ojg Once we agreed on the lib, I can start the implementation |
https://cburgmer.github.io/json-path-comparison/ is a great view, please go ahead with https://github.com/ohler55/ojg |
@arkodg can we add this again to milestone v1.1.0-rc1 ? |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. |
@zhaohuabing is it possible to share the EnvoyPatchPolicy CR file which you are using to allow your domain. I am stuck up with an issue on envoy-gateway i hope it might help me |
@meektechie Not sure that I got what you meant :-) What |
Thanks for the response @zhaohuabing . I am trying to configure SNI for listener and found this can be achieved through EnvoyPatchPolicy. But unable to get the sample for it. With that approach i hope we might setup ssl certificate for the explicit subdomains. So requesting to share that. Also, is it possible to refer certificate from the secret instead of filename/path
|
EnvoyPatchPolicy utilities JSON Patch for applying patches to XDS resources, but JSON Patch lacks the ability to select a specific member in an array based on conditions other than its index.
For example: assuming there're two filter chains in a listener, there's no way that we could target the second filter chain based on its serverName
www.bar.com
when applying a patch.We won't be able to know the index of the targeted filter chain without inspecting the generated Envoy configuration, which is impossible when we want to use a controller to generate the patch. We could possibly create that patch manually, but it's cumbersome and unreliable, and the index might change with updates to the EG releases.
The text was updated successfully, but these errors were encountered: