From 59fd9fb0e3dc18d3a77013a92d9bd839ee5945e5 Mon Sep 17 00:00:00 2001 From: Bhavitha Koduru Date: Thu, 12 Sep 2024 05:58:54 +0000 Subject: [PATCH] use protobuf content type instead of json for k8s client --- cmd/main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/main.go b/cmd/main.go index 95577b3..2872540 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -78,6 +78,8 @@ func main() { setupLog.Error(err, "unable to build REST config") os.Exit(1) } + restCFG.AcceptContentTypes = "application/vnd.kubernetes.protobuf,application/json" + restCFG.ContentType = "application/vnd.kubernetes.protobuf" clientSet, err := kubernetes.NewForConfig(restCFG) if err != nil { setupLog.Error(err, "unable to obtain clientSet")