Update deps for Kubernetes 1.8

This updates the dependencies to be compatible with Kubernetes 1.8,
including the new custom.metrics.k8s.io/v1beta1 API group and the
corresponding custom-metrics-apiserver changes.
This commit is contained in:
Solly Ross 2017-09-28 17:10:11 -04:00
parent cc94ef4068
commit 43bd4798b5
6 changed files with 155 additions and 92 deletions

View file

@ -35,8 +35,6 @@ import (
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/pkg/api"
_ "k8s.io/client-go/pkg/api/install"
"k8s.io/metrics/pkg/apis/custom_metrics"
prom "github.com/directxman12/k8s-prometheus-adapter/pkg/client"
@ -86,7 +84,7 @@ func (p *prometheusProvider) metricFor(value pmodel.SampleValue, groupResource s
}
return &custom_metrics.MetricValue{
DescribedObject: api.ObjectReference{
DescribedObject: custom_metrics.ObjectReference{
APIVersion: groupResource.Group + "/" + runtime.APIVersionInternal,
Kind: kind.Kind,
Name: name,