File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ import (
3030
3131 v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3232 "k8s.io/apimachinery/pkg/labels"
33+ "k8s.io/apimachinery/pkg/runtime"
3334 coreinformers "k8s.io/client-go/informers"
3435 "k8s.io/client-go/kubernetes"
3536 "k8s.io/client-go/kubernetes/scheme"
@@ -123,7 +124,9 @@ func main() {
123124 config .QPS = (float32 )(* kubeAPIQPS )
124125 config .Burst = * kubeAPIBurst
125126
126- kubeClient , err := kubernetes .NewForConfig (config )
127+ coreConfig := rest .CopyConfig (config )
128+ coreConfig .ContentType = runtime .ContentTypeProtobuf
129+ kubeClient , err := kubernetes .NewForConfig (coreConfig )
127130 if err != nil {
128131 klog .Error (err .Error ())
129132 os .Exit (1 )
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import (
3636 "k8s.io/client-go/util/workqueue"
3737
3838 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
39+ "k8s.io/apimachinery/pkg/runtime"
3940 "k8s.io/apimachinery/pkg/util/wait"
4041
4142 klog "k8s.io/klog/v2"
@@ -166,7 +167,9 @@ func main() {
166167 config .QPS = (float32 )(* kubeAPIQPS )
167168 config .Burst = * kubeAPIBurst
168169
169- kubeClient , err := kubernetes .NewForConfig (config )
170+ coreConfig := rest .CopyConfig (config )
171+ coreConfig .ContentType = runtime .ContentTypeProtobuf
172+ kubeClient , err := kubernetes .NewForConfig (coreConfig )
170173 if err != nil {
171174 klog .Error (err .Error ())
172175 os .Exit (1 )
You can’t perform that action at this time.
0 commit comments