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 (
30
30
31
31
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
32
32
"k8s.io/apimachinery/pkg/labels"
33
+ "k8s.io/apimachinery/pkg/runtime"
33
34
coreinformers "k8s.io/client-go/informers"
34
35
"k8s.io/client-go/kubernetes"
35
36
"k8s.io/client-go/kubernetes/scheme"
@@ -123,7 +124,9 @@ func main() {
123
124
config .QPS = (float32 )(* kubeAPIQPS )
124
125
config .Burst = * kubeAPIBurst
125
126
126
- kubeClient , err := kubernetes .NewForConfig (config )
127
+ coreConfig := rest .CopyConfig (config )
128
+ coreConfig .ContentType = runtime .ContentTypeProtobuf
129
+ kubeClient , err := kubernetes .NewForConfig (coreConfig )
127
130
if err != nil {
128
131
klog .Error (err .Error ())
129
132
os .Exit (1 )
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import (
36
36
"k8s.io/client-go/util/workqueue"
37
37
38
38
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
39
+ "k8s.io/apimachinery/pkg/runtime"
39
40
"k8s.io/apimachinery/pkg/util/wait"
40
41
41
42
klog "k8s.io/klog/v2"
@@ -166,7 +167,9 @@ func main() {
166
167
config .QPS = (float32 )(* kubeAPIQPS )
167
168
config .Burst = * kubeAPIBurst
168
169
169
- kubeClient , err := kubernetes .NewForConfig (config )
170
+ coreConfig := rest .CopyConfig (config )
171
+ coreConfig .ContentType = runtime .ContentTypeProtobuf
172
+ kubeClient , err := kubernetes .NewForConfig (coreConfig )
170
173
if err != nil {
171
174
klog .Error (err .Error ())
172
175
os .Exit (1 )
You can’t perform that action at this time.
0 commit comments