remove duplicated import and wrong alias name of api package

This commit is contained in:
supereagle
2017-07-15 13:25:54 +08:00
parent d368afd845
commit adc0eef43e
57 changed files with 166 additions and 211 deletions

View File

@@ -24,7 +24,6 @@ import (
autoscaling "k8s.io/api/autoscaling/v2alpha1"
"k8s.io/api/core/v1"
clientv1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -72,7 +71,7 @@ func (c *resourceMetricsClient) GetResourceMetric(resource v1.ResourceName, name
podSum := int64(0)
missing := len(m.Containers) == 0
for _, c := range m.Containers {
resValue, found := c.Usage[clientv1.ResourceName(resource)]
resValue, found := c.Usage[v1.ResourceName(resource)]
if !found {
missing = true
glog.V(2).Infof("missing resource metric %v for container %s in pod %s/%s", resource, c.Name, namespace, m.Name)