Basic Question Concerning Extending Envoy

114 views
Skip to first unread message

Danny

unread,
Apr 28, 2021, 4:48:30 PM4/28/21
to envoy-dev
Hi,

I've been trying to extend the Envoy proxy utilizing C++ rather than web assembly. My project uses Istio and I've plugged in my Envoy version. However, the big problem I have been having is that I am receiving errors that point to the empty Http filter not being able to be found. For reference, I am using this blog as a reference: [https://medium.com/@alishananda/implementing-filters-in-envoy-dcd8fc2d8fda]

I also used the paradigms that are discussed in the repo following repo... [https://github.com/envoyproxy/envoy/blob/main/DEVELOPER.md]. However, I am missing the fundamental understanding to be able to do the following. I create a directory, called a_filter, I create the supporting files a_filter.cc, a_filter.h, and a BUILD file. The Protobuf file is in a subdirectory v2 with its appropriate BUILD file. I need to know what changes have to be made to the Envoy static files so that when I apply the CRD:

---
kind: EnvoyFilter
metadata:
  name: trial
spec:
  workloadLabels: { app: my_app }
  filters:
  - filterType: HTTP
    filterName: "a_filter"
    insertPosition: {index: FIRST }
    listernerMatch: { listenerProtocol: HTTP, listenerType: ANY, portNumber: 5678 }
    filterConfig:
       destination: "my manager"
       header: "header-name"

---

I do not get the following failure: 
10.0.67.96_42422: Didn't find a registered implementation for name: ‘a_filter'


Any help on this matter would be greatly appreciated. 

Zizon Qiu

unread,
Apr 28, 2021, 9:51:43 PM4/28/21
to Danny, envoy-dev
1. To make bazel aware of your custom filter, you need to list it in extensions_build_config.bzl,
under source/extensions or your standalone project root.

2.  Register it explicitly like 


--
You received this message because you are subscribed to the Google Groups "envoy-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to envoy-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/envoy-dev/e5dbdd76-3445-479e-b549-f34edd493da9n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages