From 4e6999785ba613f9b9dce95fafbd4c354f56eac4 Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Tue, 14 Jan 2025 21:56:20 +0000 Subject: [PATCH] Disable s3 transport transparent compression/decompression Signed-off-by: Brad Davidson --- pkg/etcd/s3/s3.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/etcd/s3/s3.go b/pkg/etcd/s3/s3.go index 39ffecd2bc2e..9f727b5785eb 100644 --- a/pkg/etcd/s3/s3.go +++ b/pkg/etcd/s3/s3.go @@ -168,6 +168,12 @@ func (c *Controller) GetClient(ctx context.Context, etcdS3 *config.EtcdS3) (*Cli } tr := http.DefaultTransport.(*http.Transport).Clone() + // Set this value so that the underlying transport round-tripper + // doesn't try to auto decode the body of objects with + // content-encoding set to `gzip`. + // Ref: /~https://github.com/minio/minio-go/pull/752 + tr.DisableCompression = true + // You can either disable SSL verification or use a custom CA bundle, // it doesn't make sense to do both - if verification is disabled, // the CA is not checked!