From 7fdbea8a53d4d50eae175ad16ff9f779d6b7d969 Mon Sep 17 00:00:00 2001 From: deads2k Date: Wed, 9 Mar 2016 10:52:08 -0500 Subject: [PATCH] add user-agent defaulting for discovery --- pkg/client/typed/discovery/discovery_client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/client/typed/discovery/discovery_client.go b/pkg/client/typed/discovery/discovery_client.go index 50e508e8fd9ea..fa4d94a348fa3 100644 --- a/pkg/client/typed/discovery/discovery_client.go +++ b/pkg/client/typed/discovery/discovery_client.go @@ -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 }