Correct import statements
This commit is contained in:
@@ -28,12 +28,12 @@ import (
|
||||
|
||||
"github.com/golang/glog"
|
||||
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
kubeschema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/util/yaml"
|
||||
"k8s.io/apiserver/pkg/util/cache"
|
||||
"k8s.io/apiserver/pkg/webhook"
|
||||
apierrors "k8s.io/client-go/pkg/api/errors"
|
||||
"k8s.io/client-go/pkg/apis/imagepolicy/v1alpha1"
|
||||
"k8s.io/client-go/rest"
|
||||
"k8s.io/kubernetes/pkg/admission"
|
||||
|
@@ -173,7 +173,7 @@ func ClusterRoles() []rbac.ClusterRole {
|
||||
},
|
||||
{
|
||||
// a role to use for heapster's connections back to the API server
|
||||
ObjectMeta: api.ObjectMeta{Name: "system:heapster"},
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "system:heapster"},
|
||||
Rules: []rbac.PolicyRule{
|
||||
rbac.NewRule(Read...).Groups(legacyGroup).Resources("events", "pods", "nodes", "namespaces").RuleOrDie(),
|
||||
},
|
||||
@@ -232,7 +232,7 @@ func ClusterRoles() []rbac.ClusterRole {
|
||||
},
|
||||
{
|
||||
// a role to use for bootstrapping a node's client certificates
|
||||
ObjectMeta: api.ObjectMeta{Name: "system:node-bootstrapper"},
|
||||
ObjectMeta: metav1.ObjectMeta{Name: "system:node-bootstrapper"},
|
||||
Rules: []rbac.PolicyRule{
|
||||
// used to check if the node already exists
|
||||
rbac.NewRule("get").Groups(legacyGroup).Resources("nodes").RuleOrDie(),
|
||||
|
@@ -2824,7 +2824,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) {
|
||||
},
|
||||
{
|
||||
pod: &v1.Pod{
|
||||
ObjectMeta: v1.ObjectMeta{Labels: map[string]string{"foo": "123"}},
|
||||
ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{"foo": "123"}},
|
||||
Spec: v1.PodSpec{
|
||||
Affinity: &v1.Affinity{
|
||||
PodAntiAffinity: &v1.PodAntiAffinity{
|
||||
@@ -2847,7 +2847,7 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) {
|
||||
},
|
||||
},
|
||||
pods: []*v1.Pod{
|
||||
{Spec: v1.PodSpec{NodeName: "nodeA"}, ObjectMeta: v1.ObjectMeta{Labels: map[string]string{"foo": "bar"}}},
|
||||
{Spec: v1.PodSpec{NodeName: "nodeA"}, ObjectMeta: metav1.ObjectMeta{Labels: map[string]string{"foo": "bar"}}},
|
||||
{
|
||||
Spec: v1.PodSpec{
|
||||
NodeName: "nodeC",
|
||||
@@ -2873,10 +2873,10 @@ func TestInterPodAffinityWithMultipleNodes(t *testing.T) {
|
||||
},
|
||||
},
|
||||
nodes: []v1.Node{
|
||||
{ObjectMeta: v1.ObjectMeta{Name: "nodeA", Labels: labelRgChina}},
|
||||
{ObjectMeta: v1.ObjectMeta{Name: "nodeB", Labels: labelRgChinaAzAz1}},
|
||||
{ObjectMeta: v1.ObjectMeta{Name: "nodeC", Labels: labelRgIndia}},
|
||||
{ObjectMeta: v1.ObjectMeta{Name: "nodeD", Labels: labelRgUS}},
|
||||
{ObjectMeta: metav1.ObjectMeta{Name: "nodeA", Labels: labelRgChina}},
|
||||
{ObjectMeta: metav1.ObjectMeta{Name: "nodeB", Labels: labelRgChinaAzAz1}},
|
||||
{ObjectMeta: metav1.ObjectMeta{Name: "nodeC", Labels: labelRgIndia}},
|
||||
{ObjectMeta: metav1.ObjectMeta{Name: "nodeD", Labels: labelRgUS}},
|
||||
},
|
||||
fits: map[string]bool{
|
||||
"nodeA": false,
|
||||
@@ -3214,7 +3214,7 @@ func TestPodToleratesTaints(t *testing.T) {
|
||||
},
|
||||
{
|
||||
pod: &v1.Pod{
|
||||
ObjectMeta: v1.ObjectMeta{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "pod2",
|
||||
},
|
||||
Spec: v1.PodSpec{
|
||||
@@ -3222,7 +3222,7 @@ func TestPodToleratesTaints(t *testing.T) {
|
||||
},
|
||||
},
|
||||
node: v1.Node{
|
||||
ObjectMeta: v1.ObjectMeta{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Annotations: map[string]string{
|
||||
v1.TaintsAnnotationKey: `
|
||||
[{
|
||||
|
Reference in New Issue
Block a user