Skip to content

Commit

Permalink
use protobuf content type instead of json for k8s client
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavi-koduru committed Dec 5, 2024
1 parent 21961a7 commit c48f741
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit c48f741

Please sign in to comment.