envoyproxy

Is it possible to rewrite HOST header in k8s Ingress Controller?

我只是一个虾纸丫 提交于 2021-02-18 10:20:41
问题 Due to some legacy application that relies on Host header to function correctly, I need to have an Ingress (proxy, etc) that capable of rewrite Host header and pass that to downstream (backend). Is there any Ingress Controller that supports this functionality? Example: End user access our website through foo.com/a for backend a and foo.com/b for backend b . But since a and b are legacy app, it only accept: a accepts connection when Host: a.foo.com b accepts connection when Host: b.foo.com 回答1

Adding custom response headers using Istio's (1.6.0) envoy lua filter

时光怂恿深爱的人放手 提交于 2021-02-15 07:37:46
问题 I am running Istio 1.6.0. I wanted to add some custom headers to all the outbound responses originating from my service. So I was trying to use lua envoyfilter to achieve that. However, I don't see my proxy getting properly configured. The envoy filter config that I'm trying to use is kind: EnvoyFilter metadata: name: lua-filter namespace: istio-system spec: workloadSelector: labels: istio: ingressgateway configPatches: - applyTo: HTTP_FILTER match: context: GATEWAY listener: filterChain:

Adding custom response headers using Istio's (1.6.0) envoy lua filter

女生的网名这么多〃 提交于 2021-02-15 07:36:25
问题 I am running Istio 1.6.0. I wanted to add some custom headers to all the outbound responses originating from my service. So I was trying to use lua envoyfilter to achieve that. However, I don't see my proxy getting properly configured. The envoy filter config that I'm trying to use is kind: EnvoyFilter metadata: name: lua-filter namespace: istio-system spec: workloadSelector: labels: istio: ingressgateway configPatches: - applyTo: HTTP_FILTER match: context: GATEWAY listener: filterChain:

Pass json string to environment variable in a k8s deployment for Envoy

时光毁灭记忆、已成空白 提交于 2021-02-11 09:52:15
问题 I have a K8s deployment with one pod running among others a container with Envoy sw. I have defined image in such way that if there is an Environment variable EXTRA_OPTS defined it will be appended to the command line to start Envoy. I want to use that variable to override default configuration as explained in https://www.envoyproxy.io/docs/envoy/latest/operations/cli#cmdoption-config-yaml Environment variable works ok for other command options such as "-l debug" for example. Also, I have

istio somehow overriding default access logging format of envoy

為{幸葍}努か 提交于 2021-02-11 08:28:09
问题 As is very well explained in this elaborate answer, you can customise istio 's logging format in IstioOperator . In my case, IstioOperator (when it comes to access logging configuration) looks like this meshConfig: accessLogEncoding: JSON accessLogFile: /dev/stdout i.e. no accessLogFormat specified. However, in StackDriver , when seeing my istio-proxy logs, I see some fields NOT defined in the default format., e.g. here is a corresponding istio-proxy log entry response_code: "200" bytes

Unable to reach an external mongo db server from istio

只愿长相守 提交于 2021-01-29 09:37:22
问题 I am trying to implement service mesh using istio and envoy for a service which requires connecting to external mongodB server but for some reasons, my service is unable to reach the external mongodB server from istio proxy Below is the gateway and virtual service configuration for my service apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata: name: gtreviews spec: selector: istio: ingressgateway servers: - port: number: 7890 name: http protocol: GRPC hosts: - "*" --- apiVersion:

Enable http header logging for envoy in istio

那年仲夏 提交于 2021-01-28 01:38:03
问题 I want to be able to capture (log) (at least some of) envoy 's HTTP headers on my istio service mesh. I have gone through envoy 's docs, and in the log levels' section, it does not mention any header-specific information. Currently, my istio-proxy log is like this (this is from a stern output): mysvc-69c46fbc75-d9v8j istio-proxy {"bytes_sent":"124","upstream_cluster":"inbound|80|http|mysvc.default.svc.cluster.local","downstream_remote_address":"10.11.11.1:0","authority":"some.url.com","path":

istio-proxy closing long running TCP connection after 1 hour

与世无争的帅哥 提交于 2021-01-27 06:42:50
问题 TL;DR: How can we configure istio sidecar injection/istio-proxy/envoy-proxy/istio egressgateway to allow long living (>3 hours), possibly idle, TCP connections? Some details: We're trying to perform a database migration to PostgreSQL which is being triggered by one application which has Spring Boot + Flyway configured, this migration is expected to last ~3 hours. Our application is deployed inside our kubernetes cluster, which has configured istio sidecar injection. After exactly one hour of

istio: VirtualService rewrite to the root url

↘锁芯ラ 提交于 2021-01-04 17:03:52
问题 I have an Istio 1.4.6 VirtualService with a match and a url rewrite defined as follows: match: - authority: prefix: example.com uri: prefix: /foo/bar rewrite: uri: / route: - destination: host: some-service port: number: 80 I would like a rewrite like follows: Traffic directed to /foo/bar or any subpath of that should be rewritten to / plus any subpath on some-service . i.e. example.com/foo/bar -> some-service example.com/foo/bar/subpath -> some-service/subpath example.com/foo/bar/subpath

What is istio-proxy access log mean?

社会主义新天地 提交于 2020-01-23 02:45:12
问题 I am trying to troubleshoot my service by looking at the istio-proxy access log (it logs every access). However, I can't find any documentation that explains the meaning of each entry in the log. For example [2018-12-20T11:09:42.302Z] "GET / HTTP/1.1" 200 - 0 614 0 0 "10.32.96.32" "curl/7.54.0" "17b8f245-af00-4379-9f8f-a4dcd2f38c01" "foo.com" "127.0.0.1:8080" What does log above mean? Updated I've tried Vadim's answer, but I couldn't find the log format data. Here's the output json file. Is