refactor: move ListOptions references to metav1

This commit is contained in:
Clayton Coleman
2017-01-21 22:36:02 -05:00
parent 245b592fac
commit 469df12038
364 changed files with 1519 additions and 1554 deletions

View File

@@ -21,10 +21,10 @@ import (
"errors"
"fmt"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime/schema"
metricsapi "k8s.io/heapster/metrics/apis/metrics/v1alpha1"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/validation"
coreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion"
)
@@ -68,7 +68,7 @@ func DefaultHeapsterMetricsClient(svcClient coreclient.ServicesGetter) *Heapster
}
func podMetricsUrl(namespace string, name string) (string, error) {
if namespace == api.NamespaceAll {
if namespace == metav1.NamespaceAll {
return fmt.Sprintf("%s/pods", metricsRoot), nil
}
errs := validation.ValidateNamespaceName(namespace, false)
@@ -128,7 +128,7 @@ func (cli *HeapsterMetricsClient) GetNodeMetrics(nodeName string, selector label
func (cli *HeapsterMetricsClient) GetPodMetrics(namespace string, podName string, allNamespaces bool, selector labels.Selector) ([]metricsapi.PodMetrics, error) {
if allNamespaces {
namespace = api.NamespaceAll
namespace = metav1.NamespaceAll
}
path, err := podMetricsUrl(namespace, podName)
if err != nil {