mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
add user-agent defaulting for discovery
This commit is contained in:
parent
aca37830b1
commit
7fdbea8a53
@ -212,6 +212,9 @@ func setDiscoveryDefaults(config *restclient.Config) error {
|
||||
config.APIPath = ""
|
||||
config.GroupVersion = nil
|
||||
config.Codec = runtime.NoopEncoder{api.Codecs.UniversalDecoder()}
|
||||
if len(config.UserAgent) == 0 {
|
||||
config.UserAgent = restclient.DefaultKubernetesUserAgent()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user