emissary-ingress / emissary

open source Kubernetes-native API gateway for microservices built on the Envoy Proxy
https://www.getambassador.io
Apache License 2.0
4.34k stars 681 forks source link

Gzip compression || Configuration Issue #5278

Open anoopmash opened 1 year ago

anoopmash commented 1 year ago

Describe the bug After updating the module as per the emissary documentation emissary pods are not starting.

To Reproduce Steps to reproduce the behavior: Update the module as below image Ref: https://www.getambassador.io/docs/emissary/latest/topics/running/gzip#the-gzip-api

  1. See error 2023-09-01 12:21:07 diagd 3.5.0 [P17TAEW] INFO: no update performed (invalid envoy configuration generated), continuing with current configuration... time="2023-09-01 12:21:07.1279" level=info msg="error notifying diagd: 500 INTERNAL SERVER ERROR, ignoring (invalid envoy configuration generated) in snapshot snapshot" func=github.com/emissary-ingress/emissary/v3/cmd/entrypoint.notifyWebhookUrl file="/go/cmd/entrypoint/notify.go:141" CMD=entrypoint PID=1 THREAD=/watcher/notifyCh

Versions (please complete the following information):

anoopmash commented 1 year ago

Working fine when we used the minimum configuration. image

cindymullins-dw commented 1 year ago

Thanks for reporting, @anoopmash . Wonder if enabled: true is missing from the code block for the more detailed example. Could you try adding that?

anoopmash commented 1 year ago

@cindymullins-dw Tried with enabled: true as well but unsuccessful.

cindymullins-dw commented 1 year ago

Thanks for trying that. Can you also try BEST_COMPRESSION for the compression_level? Given that error, it might be some deprecated spec within that block that doesn't pass. Here's the Envoy page for reference.

sanilsanta commented 11 months ago

@cindymullins-dw Thanks , Configuration worked when we change the compression_level: BEST_COMPRESSION. Currently we struck with another issue when we have multiple hosts, the gzip functionality is not getting applied, But the gzip got worked when there is only a single host. We verified by checking the envoy.json under http_filters, when there is multiple hosts this section is not added.

sanilsanta commented 11 months ago

This was a config issue from our side where we had multiple modules for same AMBASSADOR_ID. Thanks @cindymullins-dw for the support. For enabling gzip we only need to update the following. compression_level: BEST_COMPRESSION

Requesting to update the public document as well. https://www.getambassador.io/docs/emissary/latest/topics/running/gzip#example