refactor: generated

This commit is contained in:
Clayton Coleman
2016-12-09 13:16:33 -05:00
parent 596d9de8fa
commit c52d510a24
83 changed files with 11705 additions and 27639 deletions

View File

@@ -90,7 +90,7 @@ func TestNodePreferAvoidPriority(t *testing.T) {
pod: &v1.Pod{
ObjectMeta: v1.ObjectMeta{
Namespace: "default",
OwnerReferences: []v1.OwnerReference{
OwnerReferences: []metav1.OwnerReference{
{Kind: "ReplicationController", Name: "foo", UID: "abcdef123456", Controller: &trueVar},
},
},
@@ -103,7 +103,7 @@ func TestNodePreferAvoidPriority(t *testing.T) {
pod: &v1.Pod{
ObjectMeta: v1.ObjectMeta{
Namespace: "default",
OwnerReferences: []v1.OwnerReference{
OwnerReferences: []metav1.OwnerReference{
{Kind: "RandomController", Name: "foo", UID: "abcdef123456", Controller: &trueVar},
},
},
@@ -116,7 +116,7 @@ func TestNodePreferAvoidPriority(t *testing.T) {
pod: &v1.Pod{
ObjectMeta: v1.ObjectMeta{
Namespace: "default",
OwnerReferences: []v1.OwnerReference{
OwnerReferences: []metav1.OwnerReference{
{Kind: "ReplicationController", Name: "foo", UID: "abcdef123456"},
},
},
@@ -129,7 +129,7 @@ func TestNodePreferAvoidPriority(t *testing.T) {
pod: &v1.Pod{
ObjectMeta: v1.ObjectMeta{
Namespace: "default",
OwnerReferences: []v1.OwnerReference{
OwnerReferences: []metav1.OwnerReference{
{Kind: "ReplicaSet", Name: "foo", UID: "qwert12345", Controller: &trueVar},
},
},

View File

@@ -29,11 +29,11 @@ import (
"k8s.io/kubernetes/plugin/pkg/scheduler/schedulercache"
)
func controllerRef(kind, name, uid string) []v1.OwnerReference {
func controllerRef(kind, name, uid string) []metav1.OwnerReference {
// TODO: When ControllerRef will be implemented uncomment code below.
return nil
//trueVar := true
//return []v1.OwnerReference{
//return []metav1.OwnerReference{
// {Kind: kind, Name: name, UID: types.UID(uid), Controller: &trueVar},
//}
}
@@ -300,7 +300,7 @@ func TestSelectorSpreadPriority(t *testing.T) {
}
}
func buildPod(nodeName string, labels map[string]string, ownerRefs []v1.OwnerReference) *v1.Pod {
func buildPod(nodeName string, labels map[string]string, ownerRefs []metav1.OwnerReference) *v1.Pod {
return &v1.Pod{
ObjectMeta: v1.ObjectMeta{Labels: labels, OwnerReferences: ownerRefs},
Spec: v1.PodSpec{NodeName: nodeName},

View File

@@ -20,6 +20,7 @@ go_library(
tags = ["automanaged"],
deps = [
"//pkg/api/v1:go_default_library",
"//pkg/apis/meta/v1:go_default_library",
"//pkg/labels:go_default_library",
"//pkg/util/sets:go_default_library",
],

View File

@@ -21,7 +21,7 @@ import (
metav1 "k8s.io/kubernetes/pkg/apis/meta/v1"
)
func GetControllerRef(pod *v1.Pod) *v1.OwnerReference {
func GetControllerRef(pod *v1.Pod) *metav1.OwnerReference {
if len(pod.OwnerReferences) == 0 {
return nil
}