Resolve "Add missing `envoyFilters` templating"
General MR
Summary
This MR adds the ability to deploy EnvoyFilter
resources with istiod
via additionalEnvoyFilters
.
Testing Procedure
- Deploy Big Bang with this overlay:
istio:
enabled: false
istioOperator:
enabled: false
istioCRDs:
enabled: true
istiod:
enabled: true
git:
tag: null
branch: 27-add-missing-envoyfilters-templating
values:
additionalEnvoyFilters:
- name: hello-world
labels:
hello: world
annotations:
hello/world: "true"
spec:
configPatches:
- applyTo: HTTP_FILTER
match:
context: SIDECAR_INBOUND
listener:
filterChain:
filter:
name: envoy.filters.network.http_connection_manager
subFilter:
name: envoy.filters.http.router
patch:
operation: INSERT_BEFORE
value:
name: envoy.filters.http.lua.hello-world
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua
inlineCode: |
function envoy_on_response(response_handle)
response_handle:headers():add("x-hello", "world")
end
istioGateway:
enabled: true
- Verify the
EnvoyFilter
gets created:
❯ kubectl get envoyfilters -n istio-system hello-world
NAME AGE
hello-world 28m
- Verify the
EnvoyFilter
gets pushed to your workload:
❯ istioctl pc all -n monitoring prometheus-monitoring-monitoring-kube-prometheus-0 -o yaml | grep hello-world
- name: envoy.filters.http.lua.hello-world
- name: envoy.filters.http.lua.hello-world
- name: envoy.filters.http.lua.hello-world
- Verify the
EnvoyFilter
does the thing:
❯ curl -v https://prometheus.dev.bigbang.mil/ 2>&1 | grep x-hello
< x-hello: world
Linked Issue
Upgrade Notices
N/A
Edited by Zach Callahan