diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index eb31af75..8c39e84a 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -184,11 +184,11 @@ }, { "ImportPath": "k8s.io/api", - "Rev": "b8e4ab4b136a" + "Rev": "c5cad27821f6" }, { "ImportPath": "k8s.io/apimachinery", - "Rev": "b3683fe6b520" + "Rev": "b874eabb9a4e" }, { "ImportPath": "k8s.io/klog", diff --git a/go.mod b/go.mod index 917c08dd..3d21e8ab 100644 --- a/go.mod +++ b/go.mod @@ -27,8 +27,8 @@ require ( golang.org/x/oauth2 v0.0.0-20170412232759-a6bd8cefa181 golang.org/x/time v0.0.0-20161028155119-f51c12702a4d google.golang.org/appengine v1.5.0 // indirect - k8s.io/api v0.0.0-20190418212532-b8e4ab4b136a - k8s.io/apimachinery v0.0.0-20190418212431-b3683fe6b520 + k8s.io/api v0.0.0-20190419092548-c5cad27821f6 + k8s.io/apimachinery v0.0.0-20190419212445-b874eabb9a4e k8s.io/klog v0.3.0 k8s.io/utils v0.0.0-20190221042446-c2654d5206da sigs.k8s.io/yaml v1.1.0 @@ -37,6 +37,6 @@ require ( replace ( golang.org/x/sys => golang.org/x/sys v0.0.0-20190209173611-3b5209105503 golang.org/x/tools => golang.org/x/tools v0.0.0-20190313210603-aa82965741a9 - k8s.io/api => k8s.io/api v0.0.0-20190418212532-b8e4ab4b136a - k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190418212431-b3683fe6b520 + k8s.io/api => k8s.io/api v0.0.0-20190419092548-c5cad27821f6 + k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190419212445-b874eabb9a4e ) diff --git a/go.sum b/go.sum index ff52b48f..cefbd101 100644 --- a/go.sum +++ b/go.sum @@ -87,8 +87,8 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -k8s.io/api v0.0.0-20190418212532-b8e4ab4b136a/go.mod h1:B0cvvXrD9UkqARVdlFhdZB9SNL0TzJ13UB/p410skE4= -k8s.io/apimachinery v0.0.0-20190418212431-b3683fe6b520/go.mod h1:tXkZEnPhecLuffcJcEuO/iNpM8w0n42dM5fNrr9OVVE= +k8s.io/api v0.0.0-20190419092548-c5cad27821f6/go.mod h1:B0cvvXrD9UkqARVdlFhdZB9SNL0TzJ13UB/p410skE4= +k8s.io/apimachinery v0.0.0-20190419212445-b874eabb9a4e/go.mod h1:tXkZEnPhecLuffcJcEuO/iNpM8w0n42dM5fNrr9OVVE= k8s.io/klog v0.3.0 h1:0VPpR+sizsiivjIfIAQH/rl8tan6jvWkS7lU+0di3lE= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30 h1:TRb4wNWoBVrH9plmkp2q86FIDppkbrEXdXlxU3a3BMI= diff --git a/scale/client.go b/scale/client.go index ddf0d4ac..00e59752 100644 --- a/scale/client.go +++ b/scale/client.go @@ -30,10 +30,6 @@ import ( var scaleConverter = NewScaleConverter() var codecs = serializer.NewCodecFactory(scaleConverter.Scheme()) -// restInterfaceProvider turns a restclient.Config into a restclient.Interface. -// It's overridable for the purposes of testing. -type restInterfaceProvider func(*restclient.Config) (restclient.Interface, error) - // scaleClient is an implementation of ScalesGetter // which makes use of a RESTMapper and a generic REST // client to support an discoverable resource. diff --git a/tools/cache/reflector.go b/tools/cache/reflector.go index 4b5daeed..72a69ea6 100644 --- a/tools/cache/reflector.go +++ b/tools/cache/reflector.go @@ -25,7 +25,6 @@ import ( "net" "net/url" "reflect" - "strings" "sync" "syscall" "time" @@ -113,11 +112,6 @@ func NewNamedReflector(name string, lw ListerWatcher, expectedType interface{}, return r } -func makeValidPrometheusMetricLabel(in string) string { - // this isn't perfect, but it removes our common characters - return strings.NewReplacer("/", "_", ".", "_", "-", "_", ":", "_").Replace(in) -} - // internalPackages are packages that ignored when creating a default reflector name. These packages are in the common // call chains to NewReflector, so they'd be low entropy names for reflectors var internalPackages = []string{"client-go/tools/cache/"} diff --git a/tools/cache/reflector_metrics.go b/tools/cache/reflector_metrics.go index 0945e5c3..dd849c8f 100644 --- a/tools/cache/reflector_metrics.go +++ b/tools/cache/reflector_metrics.go @@ -94,23 +94,6 @@ var metricsFactory = struct { metricsProvider: noopMetricsProvider{}, } -func newReflectorMetrics(name string) *reflectorMetrics { - var ret *reflectorMetrics - if len(name) == 0 { - return ret - } - return &reflectorMetrics{ - numberOfLists: metricsFactory.metricsProvider.NewListsMetric(name), - listDuration: metricsFactory.metricsProvider.NewListDurationMetric(name), - numberOfItemsInList: metricsFactory.metricsProvider.NewItemsInListMetric(name), - numberOfWatches: metricsFactory.metricsProvider.NewWatchesMetric(name), - numberOfShortWatches: metricsFactory.metricsProvider.NewShortWatchesMetric(name), - watchDuration: metricsFactory.metricsProvider.NewWatchDurationMetric(name), - numberOfItemsInWatch: metricsFactory.metricsProvider.NewItemsInWatchMetric(name), - lastResourceVersion: metricsFactory.metricsProvider.NewLastResourceVersionMetric(name), - } -} - // SetReflectorMetricsProvider sets the metrics provider func SetReflectorMetricsProvider(metricsProvider MetricsProvider) { metricsFactory.setProviders.Do(func() { diff --git a/tools/clientcmd/client_config.go b/tools/clientcmd/client_config.go index a7b8c1c6..878e0df7 100644 --- a/tools/clientcmd/client_config.go +++ b/tools/clientcmd/client_config.go @@ -296,16 +296,6 @@ func makeUserIdentificationConfig(info clientauth.Info) *restclient.Config { return config } -// makeUserIdentificationFieldsConfig returns a client.Config capable of being merged using mergo for only server identification information -func makeServerIdentificationConfig(info clientauth.Info) restclient.Config { - config := restclient.Config{} - config.CAFile = info.CAFile - if info.Insecure != nil { - config.Insecure = *info.Insecure - } - return config -} - func canIdentifyUser(config restclient.Config) bool { return len(config.Username) > 0 || (len(config.CertFile) > 0 || len(config.CertData) > 0) || diff --git a/util/certificate/certificate_store.go b/util/certificate/certificate_store.go index d2666615..9b008084 100644 --- a/util/certificate/certificate_store.go +++ b/util/certificate/certificate_store.go @@ -23,7 +23,6 @@ import ( "fmt" "os" "path/filepath" - "strings" "time" "k8s.io/klog" @@ -289,12 +288,6 @@ func (s *fileStore) filename(qualifier string) string { return s.pairNamePrefix + "-" + qualifier + pemExtension } -// withoutExt returns the given filename after removing the extension. The -// extension to remove will be the result of filepath.Ext(). -func withoutExt(filename string) string { - return strings.TrimSuffix(filename, filepath.Ext(filename)) -} - func loadX509KeyPair(certFile, keyFile string) (*tls.Certificate, error) { cert, err := tls.LoadX509KeyPair(certFile, keyFile) if err != nil {