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
@@ -2355,43 +2355,96 @@ var _ = SIGDescribe("Services", func() {
2355
2355
}
2356
2356
})
2357
2357
2358
-
// [LinuxOnly]: Windows does not support session affinity.
2359
-
ginkgo.It("should have session affinity work for service with type clusterIP [LinuxOnly]", func() {
2358
+
/*
2359
+
Release: v1.19
2360
+
Testname: Service, ClusterIP type, session affinity to ClientIP
2361
+
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.
2362
+
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.
2363
+
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.
2364
+
Service MUST be reachable over serviceName and the ClusterIP on servicePort.
2365
+
[LinuxOnly]: Windows does not support session affinity.
2366
+
*/
2367
+
framework.ConformanceIt("should have session affinity work for service with type clusterIP [LinuxOnly]", func() {
// [LinuxOnly]: Windows does not support session affinity.
2366
-
ginkgo.It("should have session affinity timeout work for service with type clusterIP [LinuxOnly]", func() {
2373
+
/*
2374
+
Release: v1.19
2375
+
Testname: Service, ClusterIP type, session affinity to ClientIP with timeout
2376
+
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.
2377
+
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.
2378
+
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.
2379
+
After timeout, requests MUST be served from different pods of the replica.
2380
+
Service MUST be reachable over serviceName and the ClusterIP on servicePort.
2381
+
[LinuxOnly]: Windows does not support session affinity.
2382
+
*/
2383
+
framework.ConformanceIt("should have session affinity timeout work for service with type clusterIP [LinuxOnly]", func() {
// [LinuxOnly]: Windows does not support session affinity.
2373
-
ginkgo.It("should be able to switch session affinity for service with type clusterIP [LinuxOnly]", func() {
2389
+
/*
2390
+
Release: v1.19
2391
+
Testname: Service, ClusterIP type, session affinity to None
2392
+
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.
2393
+
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.
2394
+
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.
2395
+
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.
2396
+
Service MUST be reachable over serviceName and the ClusterIP on servicePort.
2397
+
[LinuxOnly]: Windows does not support session affinity.
2398
+
*/
2399
+
framework.ConformanceIt("should be able to switch session affinity for service with type clusterIP [LinuxOnly]", func() {
// [LinuxOnly]: Windows does not support session affinity.
2380
-
ginkgo.It("should have session affinity work for NodePort service [LinuxOnly]", func() {
2405
+
/*
2406
+
Release: v1.19
2407
+
Testname: Service, NodePort type, session affinity to ClientIP
2408
+
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.
2409
+
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.
2410
+
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.
2411
+
Service MUST be reachable over serviceName and the ClusterIP on servicePort. Service MUST also be reachable over node's IP on NodePort.
2412
+
[LinuxOnly]: Windows does not support session affinity.
2413
+
*/
2414
+
framework.ConformanceIt("should have session affinity work for NodePort service [LinuxOnly]", func() {
2381
2415
svc:=getServeHostnameService("affinity-nodeport")
2382
2416
svc.Spec.Type=v1.ServiceTypeNodePort
2383
2417
execAffinityTestForNonLBService(f, cs, svc)
2384
2418
})
2385
2419
2386
-
// [LinuxOnly]: Windows does not support session affinity.
2387
-
ginkgo.It("should have session affinity timeout work for NodePort service [LinuxOnly]", func() {
2420
+
/*
2421
+
Release: v1.19
2422
+
Testname: Service, NodePort type, session affinity to ClientIP with timeout
2423
+
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.
2424
+
Service creation MUST be successful by assigning a "ClusterIP" to service and allocating NodePort on all nodes.
2425
+
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.
2426
+
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.
2427
+
After timeout, requests MUST be served from different pods of the replica.
2428
+
Service MUST be reachable over serviceName and the ClusterIP on servicePort. Service MUST also be reachable over node's IP on NodePort.
2429
+
[LinuxOnly]: Windows does not support session affinity.
2430
+
*/
2431
+
framework.ConformanceIt("should have session affinity timeout work for NodePort service [LinuxOnly]", func() {
// [LinuxOnly]: Windows does not support session affinity.
2394
-
ginkgo.It("should be able to switch session affinity for NodePort service [LinuxOnly]", func() {
2437
+
/*
2438
+
Release: v1.19
2439
+
Testname: Service, NodePort type, session affinity to None
2440
+
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.
2441
+
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.
2442
+
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.
2443
+
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.
2444
+
Service MUST be reachable over serviceName and the ClusterIP on servicePort. Service MUST also be reachable over node's IP on NodePort.
2445
+
[LinuxOnly]: Windows does not support session affinity.
2446
+
*/
2447
+
framework.ConformanceIt("should be able to switch session affinity for NodePort service [LinuxOnly]", func() {
0 commit comments