After a bit of work, I was able to do this by:
- editing the istio proxy repo to include the envoy filter I wanted to add.*
- Building the repo inside the
envoyproxy/envoy docker image.
- Copying the resulting envoy binary out, and dropping it into the
/usr/local/bin/envoy of the istio proxyv2 image, found at this dockerfile: https://github.com/istio/istio/blob/085e01c8e4dfd165fce77af8df3e56882f69210b/pilot/docker/Dockerfile.proxyv2
To deploy the istio bookinfo app with your custom envoy:
- Turn off auto sidecar injection.
istioctl kube-inject samples/bookinfo/platform/kube/bookinfo.yaml > out.yaml
out.yaml by replacing every occurrence of
docker.io/istio/proxyv2:X.X.X with the name of the image you created in the previous section. Also, replace
imagePullPolicy: Always to
imagePullPolicy: IfNotPresent throughout the file.
kubectl apply -f out.yaml
You should now have your filter running.
* you need to specifically edit the istio-proxy repo because istio has written some custom filters without which istio doesn’t work.