Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/kops/util/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"strings"
"sync"

"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/validation/field"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/client-go/dynamic"
Expand Down Expand Up @@ -200,6 +201,8 @@ func configureRESTConfig(restConfig *rest.Config) {
restConfig.UserAgent = "kops"
restConfig.Burst = 50
restConfig.QPS = 20
restConfig.AcceptContentTypes = runtime.ContentTypeProtobuf
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker, but should we specify a list (e.g. proto then json)? I thought the server was only allowed to send a type that was in the Accept header?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect it would be more compliant with HTTP standard, however it will work with K8s API Server as it will fallback itself to JSON.

restConfig.ContentType = runtime.ContentTypeProtobuf
}

func (f *Factory) HTTPClient(restConfig *rest.Config) (*http.Client, error) {
Expand Down
Loading