mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 03:03:59 +00:00
Revert "Fix comparison between FQDN and hostname"
This reverts commit 752a532c3d
.
This commit is contained in:
parent
25697c4812
commit
5f809703a6
@ -2214,8 +2214,7 @@ var _ = common.SIGDescribe("Services", func() {
|
|||||||
}
|
}
|
||||||
node0 := nodes.Items[0]
|
node0 := nodes.Items[0]
|
||||||
node1 := nodes.Items[1]
|
node1 := nodes.Items[1]
|
||||||
// split node name to ensure only hostname (and not FQDN) is compared with return from agnhost's /hostname endpoint.
|
|
||||||
node0Hostname := strings.Split(node0.Name, ".")[0]
|
|
||||||
serviceName := "svc-itp"
|
serviceName := "svc-itp"
|
||||||
ns := f.Namespace.Name
|
ns := f.Namespace.Name
|
||||||
servicePort := 80
|
servicePort := 80
|
||||||
@ -2266,7 +2265,7 @@ var _ = common.SIGDescribe("Services", func() {
|
|||||||
for i := 0; i < 5; i++ {
|
for i := 0; i < 5; i++ {
|
||||||
// the first pause pod should be on the same node as the webserver, so it can connect to the local pod using clusterIP
|
// the first pause pod should be on the same node as the webserver, so it can connect to the local pod using clusterIP
|
||||||
// note that the expected hostname is the node name because the backend pod is on host network
|
// note that the expected hostname is the node name because the backend pod is on host network
|
||||||
execHostnameTest(*pausePod0, serviceAddress, node0Hostname)
|
execHostnameTest(*pausePod0, serviceAddress, node0.Name)
|
||||||
|
|
||||||
// the second pause pod is on a different node, so it should see a connection error every time
|
// the second pause pod is on a different node, so it should see a connection error every time
|
||||||
cmd := fmt.Sprintf(`curl -q -s --connect-timeout 5 %s/hostname`, serviceAddress)
|
cmd := fmt.Sprintf(`curl -q -s --connect-timeout 5 %s/hostname`, serviceAddress)
|
||||||
@ -2295,7 +2294,7 @@ var _ = common.SIGDescribe("Services", func() {
|
|||||||
for i := 0; i < 5; i++ {
|
for i := 0; i < 5; i++ {
|
||||||
// the first pause pod should be on the same node as the webserver, so it can connect to the local pod using clusterIP
|
// the first pause pod should be on the same node as the webserver, so it can connect to the local pod using clusterIP
|
||||||
// note that the expected hostname is the node name because the backend pod is on host network
|
// note that the expected hostname is the node name because the backend pod is on host network
|
||||||
execHostnameTest(*pausePod2, serviceAddress, node0Hostname)
|
execHostnameTest(*pausePod2, serviceAddress, node0.Name)
|
||||||
|
|
||||||
// the second pause pod is on a different node, so it should see a connection error every time
|
// the second pause pod is on a different node, so it should see a connection error every time
|
||||||
cmd := fmt.Sprintf(`curl -q -s --connect-timeout 5 %s/hostname`, serviceAddress)
|
cmd := fmt.Sprintf(`curl -q -s --connect-timeout 5 %s/hostname`, serviceAddress)
|
||||||
|
Loading…
Reference in New Issue
Block a user