You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/e2e/network/service.go
+65-12Lines changed: 65 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -2356,43 +2356,96 @@ var _ = SIGDescribe("Services", func() {
2356
2356
}
2357
2357
})
2358
2358
2359
-
// [LinuxOnly]: Windows does not support session affinity.
2360
-
ginkgo.It("should have session affinity work for service with type clusterIP [LinuxOnly]", func() {
2359
+
/*
2360
+
Release: v1.19
2361
+
Testname: Service, ClusterIP type, session affinity to ClientIP
2362
+
Description: Create a service of type "ClusterIP". Service's sessionAffinity is set to "ClientIP". Service creation MUST be successful by assigning "ClusterIP" to the service.
2363
+
Create a Replication Controller to ensure that 3 pods are running and are targeted by the service to serve hostname of the pod when requests are sent to the service.
2364
+
Create another pod to make requests to the service. Service MUST serve the hostname from the same pod of the replica for all consecutive requests.
2365
+
Service MUST be reachable over serviceName and the ClusterIP on servicePort.
2366
+
[LinuxOnly]: Windows does not support session affinity.
2367
+
*/
2368
+
framework.ConformanceIt("should have session affinity work for service with type clusterIP [LinuxOnly]", func() {
// [LinuxOnly]: Windows does not support session affinity.
2367
-
ginkgo.It("should have session affinity timeout work for service with type clusterIP [LinuxOnly]", func() {
2374
+
/*
2375
+
Release: v1.19
2376
+
Testname: Service, ClusterIP type, session affinity to ClientIP with timeout
2377
+
Description: Create a service of type "ClusterIP". Service's sessionAffinity is set to "ClientIP" and session affinity timeout is set. Service creation MUST be successful by assigning "ClusterIP" to the service.
2378
+
Create a Replication Controller to ensure that 3 pods are running and are targeted by the service to serve hostname of the pod when requests are sent to the service.
2379
+
Create another pod to make requests to the service. Service MUST serve the hostname from the same pod of the replica for all consecutive requests until timeout expires.
2380
+
After timeout, requests MUST be served from different pods of the replica.
2381
+
Service MUST be reachable over serviceName and the ClusterIP on servicePort.
2382
+
[LinuxOnly]: Windows does not support session affinity.
2383
+
*/
2384
+
framework.ConformanceIt("should have session affinity timeout work for service with type clusterIP [LinuxOnly]", func() {
// [LinuxOnly]: Windows does not support session affinity.
2374
-
ginkgo.It("should be able to switch session affinity for service with type clusterIP [LinuxOnly]", func() {
2390
+
/*
2391
+
Release: v1.19
2392
+
Testname: Service, ClusterIP type, session affinity to None
2393
+
Description: Create a service of type "ClusterIP". Service's sessionAffinity is set to "ClientIP". Service creation MUST be successful by assigning "ClusterIP" to the service.
2394
+
Create a Replication Controller to ensure that 3 pods are running and are targeted by the service to serve hostname of the pod when requests are sent to the service.
2395
+
Create another pod to make requests to the service. Update the service's sessionAffinity to "None". Service update MUST be successful. When a requests are made to the service, it MUST be able serve the hostname from any pod of the replica.
2396
+
When service's sessionAffinily is updated back to "ClientIP", service MUST serve the hostname from the same pod of the replica for all consecutive requests.
2397
+
Service MUST be reachable over serviceName and the ClusterIP on servicePort.
2398
+
[LinuxOnly]: Windows does not support session affinity.
2399
+
*/
2400
+
framework.ConformanceIt("should be able to switch session affinity for service with type clusterIP [LinuxOnly]", func() {
// [LinuxOnly]: Windows does not support session affinity.
2381
-
ginkgo.It("should have session affinity work for NodePort service [LinuxOnly]", func() {
2406
+
/*
2407
+
Release: v1.19
2408
+
Testname: Service, NodePort type, session affinity to ClientIP
2409
+
Description: Create a service of type "NodePort" and provide service port and protocol. Service's sessionAffinity is set to "ClientIP". Service creation MUST be successful by assigning a "ClusterIP" to service and allocating NodePort on all nodes.
2410
+
Create a Replication Controller to ensure that 3 pods are running and are targeted by the service to serve hostname of the pod when a requests are sent to the service.
2411
+
Create another pod to make requests to the service on node's IP and NodePort. Service MUST serve the hostname from the same pod of the replica for all consecutive requests.
2412
+
Service MUST be reachable over serviceName and the ClusterIP on servicePort. Service MUST also be reachable over node's IP on NodePort.
2413
+
[LinuxOnly]: Windows does not support session affinity.
2414
+
*/
2415
+
framework.ConformanceIt("should have session affinity work for NodePort service [LinuxOnly]", func() {
2382
2416
svc:=getServeHostnameService("affinity-nodeport")
2383
2417
svc.Spec.Type=v1.ServiceTypeNodePort
2384
2418
execAffinityTestForNonLBService(f, cs, svc)
2385
2419
})
2386
2420
2387
-
// [LinuxOnly]: Windows does not support session affinity.
2388
-
ginkgo.It("should have session affinity timeout work for NodePort service [LinuxOnly]", func() {
2421
+
/*
2422
+
Release: v1.19
2423
+
Testname: Service, NodePort type, session affinity to ClientIP with timeout
2424
+
Description: Create a service of type "NodePort" and provide service port and protocol. Service's sessionAffinity is set to "ClientIP" and session affinity timeout is set.
2425
+
Service creation MUST be successful by assigning a "ClusterIP" to service and allocating NodePort on all nodes.
2426
+
Create a Replication Controller to ensure that 3 pods are running and are targeted by the service to serve hostname of the pod when requests are sent to the service.
2427
+
Create another pod to make requests to the service on node's IP and NodePort. Service MUST serve the hostname from the same pod of the replica for all consecutive requests until timeout.
2428
+
After timeout, requests MUST be served from different pods of the replica.
2429
+
Service MUST be reachable over serviceName and the ClusterIP on servicePort. Service MUST also be reachable over node's IP on NodePort.
2430
+
[LinuxOnly]: Windows does not support session affinity.
2431
+
*/
2432
+
framework.ConformanceIt("should have session affinity timeout work for NodePort service [LinuxOnly]", func() {
// [LinuxOnly]: Windows does not support session affinity.
2395
-
ginkgo.It("should be able to switch session affinity for NodePort service [LinuxOnly]", func() {
2438
+
/*
2439
+
Release: v1.19
2440
+
Testname: Service, NodePort type, session affinity to None
2441
+
Description: Create a service of type "NodePort" and provide service port and protocol. Service's sessionAffinity is set to "ClientIP". Service creation MUST be successful by assigning a "ClusterIP" to the service and allocating NodePort on all the nodes.
2442
+
Create a Replication Controller to ensure that 3 pods are running and are targeted by the service to serve hostname of the pod when requests are sent to the service.
2443
+
Create another pod to make requests to the service. Update the service's sessionAffinity to "None". Service update MUST be successful. When a requests are made to the service on node's IP and NodePort, service MUST be able serve the hostname from any pod of the replica.
2444
+
When service's sessionAffinily is updated back to "ClientIP", service MUST serve the hostname from the same pod of the replica for all consecutive requests.
2445
+
Service MUST be reachable over serviceName and the ClusterIP on servicePort. Service MUST also be reachable over node's IP on NodePort.
2446
+
[LinuxOnly]: Windows does not support session affinity.
2447
+
*/
2448
+
framework.ConformanceIt("should be able to switch session affinity for NodePort service [LinuxOnly]", func() {
0 commit comments