Skip to content

Commit

Permalink
Merge pull request #23 from DirectXMan12/deps/kube-1.8
Browse files Browse the repository at this point in the history
Update deps for Kubernetes 1.8
  • Loading branch information
DirectXMan12 authored Oct 11, 2017
2 parents cc94ef4 + 43bd479 commit 8dd527d
Show file tree
Hide file tree
Showing 6 changed files with 155 additions and 92 deletions.
6 changes: 3 additions & 3 deletions cmd/adapter/app/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"time"

"github.com/spf13/cobra"
apimeta "k8s.io/apimachinery/pkg/api/meta"
"k8s.io/client-go/discovery"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/pkg/api"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"

Expand Down Expand Up @@ -112,7 +112,7 @@ func (o PrometheusAdapterServerOptions) RunCustomMetricsAdapterServer(stopCh <-c
return fmt.Errorf("unable to construct discovery client for dynamic client: %v", err)
}

dynamicMapper, err := dynamicmapper.NewRESTMapper(discoveryClient, api.Registry.InterfacesFor, o.DiscoveryInterval)
dynamicMapper, err := dynamicmapper.NewRESTMapper(discoveryClient, apimeta.InterfacesForUnstructured, o.DiscoveryInterval)
if err != nil {
return fmt.Errorf("unable to construct dynamic discovery mapper: %v", err)
}
Expand All @@ -133,7 +133,7 @@ func (o PrometheusAdapterServerOptions) RunCustomMetricsAdapterServer(stopCh <-c

cmProvider := cmprov.NewPrometheusProvider(dynamicMapper, clientPool, promClient, o.MetricsRelistInterval, o.RateInterval, stopCh)

server, err := config.Complete().New(cmProvider)
server, err := config.Complete().New("prometheus-custom-metrics-adapter", cmProvider)
if err != nil {
return err
}
Expand Down
Loading

0 comments on commit 8dd527d

Please sign in to comment.