@@ -44,8 +44,6 @@ import (
44
44
e2edeployment "k8s.io/kubernetes/test/e2e/framework/deployment"
45
45
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
46
46
e2epodoutput "k8s.io/kubernetes/test/e2e/framework/pod/output"
47
- e2erc "k8s.io/kubernetes/test/e2e/framework/rc"
48
- testutils "k8s.io/kubernetes/test/utils"
49
47
imageutils "k8s.io/kubernetes/test/utils/image"
50
48
netutils "k8s.io/utils/net"
51
49
"k8s.io/utils/ptr"
@@ -1025,18 +1023,20 @@ func (j *TestJig) CheckServiceReachability(ctx context.Context, svc *v1.Service,
1025
1023
1026
1024
// CreateServicePods creates a replication controller with the label same as service. Service listens to TCP and UDP.
1027
1025
func (j * TestJig ) CreateServicePods (ctx context.Context , replica int ) error {
1028
- config := testutils.RCConfig {
1029
- Client : j .Client ,
1030
- Name : j .Name ,
1031
- Image : imageutils .GetE2EImage (imageutils .Agnhost ),
1032
- Command : []string {"/agnhost" , "serve-hostname" , "--http=false" , "--tcp" , "--udp" },
1033
- Namespace : j .Namespace ,
1034
- Labels : j .Labels ,
1035
- PollInterval : 3 * time .Second ,
1036
- Timeout : framework .PodReadyBeforeTimeout ,
1037
- Replicas : replica ,
1038
- }
1039
- return e2erc .RunRC (ctx , config )
1026
+ deploymentConfig := e2edeployment .NewDeployment (j .Name ,
1027
+ int32 (replica ),
1028
+ j .Labels ,
1029
+ j .Name ,
1030
+ imageutils .GetE2EImage (imageutils .Agnhost ),
1031
+ appsv1 .RecreateDeploymentStrategyType )
1032
+ deploymentConfig .Spec .Template .Spec .Containers [0 ].Command = []string {"/agnhost" , "serve-hostname" , "--http=false" , "--tcp" , "--udp" }
1033
+
1034
+ deployment , err := j .Client .AppsV1 ().Deployments (j .Namespace ).Create (ctx , deploymentConfig , metav1.CreateOptions {})
1035
+ if err != nil {
1036
+ return err
1037
+ }
1038
+
1039
+ return e2edeployment .WaitForDeploymentComplete (j .Client , deployment )
1040
1040
}
1041
1041
1042
1042
// CreateSCTPServiceWithPort creates a new SCTP Service with given port based on the
0 commit comments