@@ -17,7 +17,6 @@ import (
17
17
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
18
18
kubelabels "k8s.io/apimachinery/pkg/labels"
19
19
"k8s.io/client-go/kubernetes"
20
- clientset "k8s.io/client-go/kubernetes"
21
20
"k8s.io/client-go/rest"
22
21
"k8s.io/kubernetes/test/e2e/framework"
23
22
testutil "k8s.io/kubernetes/test/utils"
@@ -932,7 +931,7 @@ func newClientWithRole(cluster *types.Cluster, assumeRole string) (*kubernetes.C
932
931
if err != nil {
933
932
return nil , err
934
933
}
935
- clientset , err := kubernetes .NewForConfig (
934
+ kubernetes , err := kubernetes .NewForConfig (
936
935
& rest.Config {
937
936
Host : aws .ToString (cluster .Endpoint ),
938
937
BearerToken : tok .Token ,
@@ -944,7 +943,7 @@ func newClientWithRole(cluster *types.Cluster, assumeRole string) (*kubernetes.C
944
943
if err != nil {
945
944
return nil , err
946
945
}
947
- return clientset , nil
946
+ return kubernetes , nil
948
947
}
949
948
950
949
// getEKSCluster returns the EKS cluster where its Endpoint matches the given config's Host.
@@ -989,7 +988,7 @@ func examplePod(namespace string, labels map[string]string) *corev1.Pod {
989
988
}
990
989
991
990
// createPod starts a Pod in the specified namespace and with the specific labels.
992
- func createPod (ctx context.Context , client clientset .Interface , namespace string , labels map [string ]string ) (* corev1.Pod , error ) {
991
+ func createPod (ctx context.Context , client kubernetes .Interface , namespace string , labels map [string ]string ) (* corev1.Pod , error ) {
993
992
pod , err := client .CoreV1 ().Pods (namespace ).Create (ctx , examplePod (namespace , labels ), metav1.CreateOptions {})
994
993
if err != nil {
995
994
return nil , err
@@ -1003,7 +1002,7 @@ func createPod(ctx context.Context, client clientset.Interface, namespace string
1003
1002
}
1004
1003
1005
1004
// createClusterRole creates a ClusterRole with the specified labels.
1006
- func createClusterRole (ctx context.Context , client clientset .Interface , labels map [string ]string ) (* rbacv1.ClusterRole , error ) {
1005
+ func createClusterRole (ctx context.Context , client kubernetes .Interface , labels map [string ]string ) (* rbacv1.ClusterRole , error ) {
1007
1006
clusterRole := & rbacv1.ClusterRole {
1008
1007
ObjectMeta : metav1.ObjectMeta {
1009
1008
GenerateName : "test-cluster-role-" ,
0 commit comments