mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #76443 from mgdevstack/promote-service-sessionaffinity
Promote e2e "verifying service's sessionAffinity for ClusterIP and NodePort services" to Conformance
This commit is contained in:
commit
53ffaa7175
94
test/conformance/testdata/conformance.yaml
vendored
94
test/conformance/testdata/conformance.yaml
vendored
@ -1644,6 +1644,40 @@
|
||||
the NodePort.
|
||||
release: v1.16
|
||||
file: test/e2e/network/service.go
|
||||
- testname: Service, NodePort type, session affinity to None
|
||||
codename: '[sig-network] Services should be able to switch session affinity for
|
||||
NodePort service [LinuxOnly] [Conformance]'
|
||||
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.
|
||||
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.
|
||||
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. 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. Service MUST be reachable over serviceName and the ClusterIP on servicePort.
|
||||
Service MUST also be reachable over node''s IP on NodePort. [LinuxOnly]: Windows
|
||||
does not support session affinity.'
|
||||
release: v1.19
|
||||
file: test/e2e/network/service.go
|
||||
- testname: Service, ClusterIP type, session affinity to None
|
||||
codename: '[sig-network] Services should be able to switch session affinity for
|
||||
service with type clusterIP [LinuxOnly] [Conformance]'
|
||||
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. 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. 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. 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. Service MUST be reachable over serviceName and the ClusterIP on servicePort.
|
||||
[LinuxOnly]: Windows does not support session affinity.'
|
||||
release: v1.19
|
||||
file: test/e2e/network/service.go
|
||||
- testname: Find Kubernetes Service in default Namespace
|
||||
codename: '[sig-network] Services should find a service from listing all namespaces
|
||||
[Conformance]'
|
||||
@ -1651,6 +1685,66 @@
|
||||
named Kubernetes with the Namespace of default.
|
||||
release: v1.18
|
||||
file: test/e2e/network/service.go
|
||||
- testname: Service, NodePort type, session affinity to ClientIP with timeout
|
||||
codename: '[sig-network] Services should have session affinity timeout work for
|
||||
NodePort service [LinuxOnly] [Conformance]'
|
||||
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. Service creation MUST be successful by assigning a "ClusterIP" to service
|
||||
and allocating NodePort on all nodes. 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. 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. After
|
||||
timeout, requests MUST be served from different pods of the replica. Service MUST
|
||||
be reachable over serviceName and the ClusterIP on servicePort. Service MUST also
|
||||
be reachable over node''s IP on NodePort. [LinuxOnly]: Windows does not support
|
||||
session affinity.'
|
||||
release: v1.19
|
||||
file: test/e2e/network/service.go
|
||||
- testname: Service, ClusterIP type, session affinity to ClientIP with timeout
|
||||
codename: '[sig-network] Services should have session affinity timeout work for
|
||||
service with type clusterIP [LinuxOnly] [Conformance]'
|
||||
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. 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. 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. After timeout, requests MUST
|
||||
be served from different pods of the replica. Service MUST be reachable over serviceName
|
||||
and the ClusterIP on servicePort. [LinuxOnly]: Windows does not support session
|
||||
affinity.'
|
||||
release: v1.19
|
||||
file: test/e2e/network/service.go
|
||||
- testname: Service, NodePort type, session affinity to ClientIP
|
||||
codename: '[sig-network] Services should have session affinity work for NodePort
|
||||
service [LinuxOnly] [Conformance]'
|
||||
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. 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.
|
||||
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. Service MUST be reachable over serviceName and the ClusterIP on servicePort.
|
||||
Service MUST also be reachable over node''s IP on NodePort. [LinuxOnly]: Windows
|
||||
does not support session affinity.'
|
||||
release: v1.19
|
||||
file: test/e2e/network/service.go
|
||||
- testname: Service, ClusterIP type, session affinity to ClientIP
|
||||
codename: '[sig-network] Services should have session affinity work for service
|
||||
with type clusterIP [LinuxOnly] [Conformance]'
|
||||
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. 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. 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.
|
||||
Service MUST be reachable over serviceName and the ClusterIP on servicePort. [LinuxOnly]:
|
||||
Windows does not support session affinity.'
|
||||
release: v1.19
|
||||
file: test/e2e/network/service.go
|
||||
- testname: Kubernetes Service
|
||||
codename: '[sig-network] Services should provide secure master service [Conformance]'
|
||||
description: By default when a kubernetes cluster is running there MUST be a 'kubernetes'
|
||||
|
@ -2355,43 +2355,96 @@ var _ = SIGDescribe("Services", func() {
|
||||
}
|
||||
})
|
||||
|
||||
// [LinuxOnly]: Windows does not support session affinity.
|
||||
ginkgo.It("should have session affinity work for service with type clusterIP [LinuxOnly]", func() {
|
||||
/*
|
||||
Release: v1.19
|
||||
Testname: Service, ClusterIP type, session affinity to ClientIP
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
Service MUST be reachable over serviceName and the ClusterIP on servicePort.
|
||||
[LinuxOnly]: Windows does not support session affinity.
|
||||
*/
|
||||
framework.ConformanceIt("should have session affinity work for service with type clusterIP [LinuxOnly]", func() {
|
||||
svc := getServeHostnameService("affinity-clusterip")
|
||||
svc.Spec.Type = v1.ServiceTypeClusterIP
|
||||
execAffinityTestForNonLBService(f, cs, svc)
|
||||
})
|
||||
|
||||
// [LinuxOnly]: Windows does not support session affinity.
|
||||
ginkgo.It("should have session affinity timeout work for service with type clusterIP [LinuxOnly]", func() {
|
||||
/*
|
||||
Release: v1.19
|
||||
Testname: Service, ClusterIP type, session affinity to ClientIP with timeout
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
After timeout, requests MUST be served from different pods of the replica.
|
||||
Service MUST be reachable over serviceName and the ClusterIP on servicePort.
|
||||
[LinuxOnly]: Windows does not support session affinity.
|
||||
*/
|
||||
framework.ConformanceIt("should have session affinity timeout work for service with type clusterIP [LinuxOnly]", func() {
|
||||
svc := getServeHostnameService("affinity-clusterip-timeout")
|
||||
svc.Spec.Type = v1.ServiceTypeClusterIP
|
||||
execAffinityTestForSessionAffinityTimeout(f, cs, svc)
|
||||
})
|
||||
|
||||
// [LinuxOnly]: Windows does not support session affinity.
|
||||
ginkgo.It("should be able to switch session affinity for service with type clusterIP [LinuxOnly]", func() {
|
||||
/*
|
||||
Release: v1.19
|
||||
Testname: Service, ClusterIP type, session affinity to None
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
Service MUST be reachable over serviceName and the ClusterIP on servicePort.
|
||||
[LinuxOnly]: Windows does not support session affinity.
|
||||
*/
|
||||
framework.ConformanceIt("should be able to switch session affinity for service with type clusterIP [LinuxOnly]", func() {
|
||||
svc := getServeHostnameService("affinity-clusterip-transition")
|
||||
svc.Spec.Type = v1.ServiceTypeClusterIP
|
||||
execAffinityTestForNonLBServiceWithTransition(f, cs, svc)
|
||||
})
|
||||
|
||||
// [LinuxOnly]: Windows does not support session affinity.
|
||||
ginkgo.It("should have session affinity work for NodePort service [LinuxOnly]", func() {
|
||||
/*
|
||||
Release: v1.19
|
||||
Testname: Service, NodePort type, session affinity to ClientIP
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
Service MUST be reachable over serviceName and the ClusterIP on servicePort. Service MUST also be reachable over node's IP on NodePort.
|
||||
[LinuxOnly]: Windows does not support session affinity.
|
||||
*/
|
||||
framework.ConformanceIt("should have session affinity work for NodePort service [LinuxOnly]", func() {
|
||||
svc := getServeHostnameService("affinity-nodeport")
|
||||
svc.Spec.Type = v1.ServiceTypeNodePort
|
||||
execAffinityTestForNonLBService(f, cs, svc)
|
||||
})
|
||||
|
||||
// [LinuxOnly]: Windows does not support session affinity.
|
||||
ginkgo.It("should have session affinity timeout work for NodePort service [LinuxOnly]", func() {
|
||||
/*
|
||||
Release: v1.19
|
||||
Testname: Service, NodePort type, session affinity to ClientIP with timeout
|
||||
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.
|
||||
Service creation MUST be successful by assigning a "ClusterIP" to service and allocating NodePort on all nodes.
|
||||
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.
|
||||
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.
|
||||
After timeout, requests MUST be served from different pods of the replica.
|
||||
Service MUST be reachable over serviceName and the ClusterIP on servicePort. Service MUST also be reachable over node's IP on NodePort.
|
||||
[LinuxOnly]: Windows does not support session affinity.
|
||||
*/
|
||||
framework.ConformanceIt("should have session affinity timeout work for NodePort service [LinuxOnly]", func() {
|
||||
svc := getServeHostnameService("affinity-nodeport-timeout")
|
||||
svc.Spec.Type = v1.ServiceTypeNodePort
|
||||
execAffinityTestForSessionAffinityTimeout(f, cs, svc)
|
||||
})
|
||||
|
||||
// [LinuxOnly]: Windows does not support session affinity.
|
||||
ginkgo.It("should be able to switch session affinity for NodePort service [LinuxOnly]", func() {
|
||||
/*
|
||||
Release: v1.19
|
||||
Testname: Service, NodePort type, session affinity to None
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
Service MUST be reachable over serviceName and the ClusterIP on servicePort. Service MUST also be reachable over node's IP on NodePort.
|
||||
[LinuxOnly]: Windows does not support session affinity.
|
||||
*/
|
||||
framework.ConformanceIt("should be able to switch session affinity for NodePort service [LinuxOnly]", func() {
|
||||
svc := getServeHostnameService("affinity-nodeport-transition")
|
||||
svc.Spec.Type = v1.ServiceTypeNodePort
|
||||
execAffinityTestForNonLBServiceWithTransition(f, cs, svc)
|
||||
|
Loading…
Reference in New Issue
Block a user