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 authored and kodurub committed Sep 18, 2024
1 parent ed7005b commit 68ef820
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/aws-iam-authenticator/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ func createClient() client.Client {
os.Exit(1)
}
}
kcfg.AcceptContentTypes = "application/vnd.kubernetes.protobuf,application/json"
kcfg.ContentType = "application/vnd.kubernetes.protobuf"
clientset, err := kubernetes.NewForConfig(kcfg)
if err != nil {
fmt.Println(err)
Expand Down
2 changes: 2 additions & 0 deletions pkg/mapper/configmap/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ func New(masterURL, kubeConfig string) (*MapStore, error) {
if err != nil {
return nil, err
}
clientconfig.AcceptContentTypes = "application/vnd.kubernetes.protobuf,application/json"
clientconfig.ContentType = "application/vnd.kubernetes.protobuf"
clientset, err := kubernetes.NewForConfig(clientconfig)
if err != nil {
return nil, err
Expand Down

0 comments on commit 68ef820

Please sign in to comment.