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 Sep 16, 2024
1 parent 90beff7 commit b42a421
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 @@ -193,6 +193,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 b42a421

Please sign in to comment.