From c48f741e66ac582f681a892b4cf6ba3cdb2f7a6d Mon Sep 17 00:00:00 2001 From: Bhavitha Koduru Date: Sun, 20 Oct 2024 22:34:57 +0000 Subject: [PATCH] use protobuf content type instead of json for k8s client --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index 51c070c1..7afc068a 100644 --- a/main.go +++ b/main.go @@ -256,6 +256,8 @@ func main() { // add root health ping on manager in general healthzHandler.AddControllerHealthChecker("health-root-manager-ping", rcHealthz.SimplePing("root manager", setupLog)) + kubeConfig.AcceptContentTypes = "application/vnd.kubernetes.protobuf,application/json" + kubeConfig.ContentType = "application/vnd.kubernetes.protobuf" clientSet, err := kubernetes.NewForConfig(kubeConfig) if err != nil { setupLog.Error(err, "failed to create client set")