From 9ae2897e22a496f5527d55e13af60bbceae70a4e Mon Sep 17 00:00:00 2001 From: Bhavitha <106284071+bhavi-koduru@users.noreply.github.com> Date: Fri, 11 Oct 2024 14:43:36 -0700 Subject: [PATCH] use protobuf content type instead of json for k8s client (#232) Co-authored-by: Bhavitha Koduru --- internal/aws/k8s/k8sclient/clientset.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/aws/k8s/k8sclient/clientset.go b/internal/aws/k8s/k8sclient/clientset.go index 9739c18caf8b..6d0211e7e5e4 100644 --- a/internal/aws/k8s/k8sclient/clientset.go +++ b/internal/aws/k8s/k8sclient/clientset.go @@ -280,6 +280,8 @@ func (c *K8sClient) init(logger *zap.Logger, options ...Option) error { return err } } + config.AcceptContentTypes = "application/vnd.kubernetes.protobuf,application/json" + config.ContentType = "application/vnd.kubernetes.protobuf" client, err := kubernetes.NewForConfig(config) if err != nil { c.logger.Error("failed to build ClientSet", zap.Error(err))