mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Merge pull request #81419 from mgdevstack/checkServiceReachability
Update e2e testing nodePort service listening on same port but different protocols
This commit is contained in:
@@ -859,7 +859,7 @@ func (j *TestJig) CheckServiceReachability(namespace string, svc *v1.Service, po
|
||||
}
|
||||
}
|
||||
|
||||
// CreateServicePods creates a replication controller with the label same as service
|
||||
// CreateServicePods creates a replication controller with the label same as service. Service listens to HTTP.
|
||||
func (j *TestJig) CreateServicePods(c clientset.Interface, ns string, replica int) {
|
||||
config := testutils.RCConfig{
|
||||
Client: c,
|
||||
@@ -875,3 +875,20 @@ func (j *TestJig) CreateServicePods(c clientset.Interface, ns string, replica in
|
||||
err := framework.RunRC(config)
|
||||
framework.ExpectNoError(err, "Replica must be created")
|
||||
}
|
||||
|
||||
// CreateTCPUDPServicePods creates a replication controller with the label same as service. Service listens to TCP and UDP.
|
||||
func (j *TestJig) CreateTCPUDPServicePods(c clientset.Interface, ns string, replica int) {
|
||||
config := testutils.RCConfig{
|
||||
Client: c,
|
||||
Name: j.Name,
|
||||
Image: framework.ServeHostnameImage,
|
||||
Command: []string{"/agnhost", "serve-hostname", "--http=false", "--tcp", "--udp"},
|
||||
Namespace: ns,
|
||||
Labels: j.Labels,
|
||||
PollInterval: 3 * time.Second,
|
||||
Timeout: framework.PodReadyBeforeTimeout,
|
||||
Replicas: replica,
|
||||
}
|
||||
err := framework.RunRC(config)
|
||||
framework.ExpectNoError(err, "Replica must be created")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user