Documentation ¶
Index ¶
Constants ¶
View Source
const ( PublicInterfaceName = "enp0s10" PrivateInterfaceName = "enp0s8" )
Variables ¶
View Source
var (
ExpectedResultFromNode1 = map[string]map[string]EntryTestArgs{
"svc-a-external-ips-k8s1-public": {
"svc-a-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-a-external-ips-svc-port",
IP: "192.0.2.233",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-b-external-ips-svc-port",
IP: "192.0.2.233",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-c-node-port-svc-port",
IP: "192.0.2.233",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-d-node-port-svc-port",
IP: "192.0.2.233",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-e-node-port-svc-port",
IP: "192.0.2.233",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-public:svc-c-node-port-node-port",
IP: "192.0.2.233",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-public:svc-d-node-port-node-port",
IP: "192.0.2.233",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-public:svc-e-node-port-node-port",
IP: "192.0.2.233",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-a-external-ips-k8s1-host-public": {
"svc-a-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-a-external-ips-svc-port",
IP: "192.168.34.11",
Port: "82",
Expected: "app1",
},
"svc-b-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-b-external-ips-svc-port",
IP: "192.168.34.11",
Port: "30002",
Expected: "app1",
},
"svc-c-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-c-node-port-svc-port",
IP: "192.168.34.11",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-d-node-port-svc-port",
IP: "192.168.34.11",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-e-node-port-svc-port",
IP: "192.168.34.11",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-c-node-port-node-port",
IP: "192.168.34.11",
Port: "30003",
Expected: "app2",
},
"svc-d-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-d-node-port-node-port",
IP: "192.168.34.11",
Port: "30004",
Expected: "app4",
},
"svc-e-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-e-node-port-node-port",
IP: "192.168.34.11",
Port: "30005",
Expected: "app6",
},
},
"svc-a-external-ips-k8s1-host-private": {
"svc-a-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-a-external-ips-svc-port",
IP: "192.168.33.11",
Port: "82",
Expected: "app1",
},
"svc-b-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-b-external-ips-svc-port",
IP: "192.168.33.11",
Port: "30002",
Expected: "app1",
},
"svc-c-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-c-node-port-svc-port",
IP: "192.168.33.11",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-d-node-port-svc-port",
IP: "192.168.33.11",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-e-node-port-svc-port",
IP: "192.168.33.11",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-c-node-port-node-port",
IP: "192.168.33.11",
Port: "30003",
Expected: "app2",
},
"svc-d-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-d-node-port-node-port",
IP: "192.168.33.11",
Port: "30004",
Expected: "app4",
},
"svc-e-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-e-node-port-node-port",
IP: "192.168.33.11",
Port: "30005",
Expected: "app6",
},
},
"svc-b-external-ips-k8s1-public": {
"svc-a-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-a-external-ips-svc-port",
IP: "192.0.2.233",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-b-external-ips-svc-port",
IP: "192.0.2.233",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-c-node-port-svc-port",
IP: "192.0.2.233",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-d-node-port-svc-port",
IP: "192.0.2.233",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-e-node-port-svc-port",
IP: "192.0.2.233",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-public:svc-c-node-port-node-port",
IP: "192.0.2.233",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-public:svc-d-node-port-node-port",
IP: "192.0.2.233",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-public:svc-e-node-port-node-port",
IP: "192.0.2.233",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-b-external-ips-k8s1-host-public": {
"svc-a-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-a-external-ips-svc-port",
IP: "192.168.34.11",
Port: "82",
Expected: "app1",
},
"svc-b-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-b-external-ips-svc-port",
IP: "192.168.34.11",
Port: "30002",
Expected: "app1",
},
"svc-c-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-c-node-port-svc-port",
IP: "192.168.34.11",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-d-node-port-svc-port",
IP: "192.168.34.11",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-e-node-port-svc-port",
IP: "192.168.34.11",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-c-node-port-node-port",
IP: "192.168.34.11",
Port: "30003",
Expected: "app2",
},
"svc-d-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-d-node-port-node-port",
IP: "192.168.34.11",
Port: "30004",
Expected: "app4",
},
"svc-e-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-e-node-port-node-port",
IP: "192.168.34.11",
Port: "30005",
Expected: "app6",
},
},
"svc-b-external-ips-k8s1-host-private": {
"svc-a-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-a-external-ips-svc-port",
IP: "192.168.33.11",
Port: "82",
Expected: "app1",
},
"svc-b-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-b-external-ips-svc-port",
IP: "192.168.33.11",
Port: "30002",
Expected: "app1",
},
"svc-c-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-c-node-port-svc-port",
IP: "192.168.33.11",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-d-node-port-svc-port",
IP: "192.168.33.11",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-e-node-port-svc-port",
IP: "192.168.33.11",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-c-node-port-node-port",
IP: "192.168.33.11",
Port: "30003",
Expected: "app2",
},
"svc-d-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-d-node-port-node-port",
IP: "192.168.33.11",
Port: "30004",
Expected: "app4",
},
"svc-e-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-e-node-port-node-port",
IP: "192.168.33.11",
Port: "30005",
Expected: "app6",
},
},
"localhost": {
"svc-a-external-ips-svc-port": {
Description: "localhost:svc-a-external-ips-svc-port",
IP: "127.0.0.1",
Port: "82",
Expected: "connection refused",
},
"svc-b-external-ips-svc-port": {
Description: "localhost:svc-b-external-ips-svc-port",
IP: "127.0.0.1",
Port: "30002",
Expected: "connection refused",
},
"svc-c-node-port-svc-port": {
Description: "localhost:svc-c-node-port-svc-port",
IP: "127.0.0.1",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "localhost:svc-d-node-port-svc-port",
IP: "127.0.0.1",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "localhost:svc-e-node-port-svc-port",
IP: "127.0.0.1",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "localhost:svc-c-node-port-node-port",
IP: "127.0.0.1",
Port: "30003",
Expected: "app2",
},
"svc-d-node-port-node-port": {
Description: "localhost:svc-d-node-port-node-port",
IP: "127.0.0.1",
Port: "30004",
Expected: "app4",
},
"svc-e-node-port-node-port": {
Description: "localhost:svc-e-node-port-node-port",
IP: "127.0.0.1",
Port: "30005",
Expected: "app6",
},
},
"svc-a-external-ips-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.223",
Port: "82",
Expected: "app1",
},
"svc-b-external-ips-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.223",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.223",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.223",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.223",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-a-external-ips-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.223",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-a-external-ips-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.223",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-a-external-ips-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.223",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-b-external-ips-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.111",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.111",
Port: "30002",
Expected: "app1",
},
"svc-c-node-port-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.111",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.111",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.111",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-b-external-ips-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.111",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-b-external-ips-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.111",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-b-external-ips-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.111",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-c-node-port-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.141",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.141",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.141",
Port: "83",
Expected: "app2",
},
"svc-d-node-port-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.141",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.141",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-c-node-port-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.141",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-c-node-port-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.141",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-c-node-port-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.141",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-d-node-port-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.101",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.101",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.101",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.101",
Port: "84",
Expected: "app4",
},
"svc-e-node-port-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.101",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-d-node-port-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.101",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-d-node-port-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.101",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-d-node-port-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.101",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-e-node-port-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.80",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.80",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.80",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.80",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.80",
Port: "85",
Expected: "app6",
},
"svc-c-node-port-node-port": {
Description: "svc-e-node-port-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.80",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-e-node-port-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.80",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-e-node-port-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.80",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
}
)
View Source
var (
ExpectedResultFromNode2 = map[string]map[string]EntryTestArgs{
"svc-a-external-ips-k8s1-public": {
"svc-a-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-a-external-ips-svc-port",
IP: "192.0.2.233",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-b-external-ips-svc-port",
IP: "192.0.2.233",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-c-node-port-svc-port",
IP: "192.0.2.233",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-d-node-port-svc-port",
IP: "192.0.2.233",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-e-node-port-svc-port",
IP: "192.0.2.233",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-public:svc-c-node-port-node-port",
IP: "192.0.2.233",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-public:svc-d-node-port-node-port",
IP: "192.0.2.233",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-public:svc-e-node-port-node-port",
IP: "192.0.2.233",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-a-external-ips-k8s1-host-public": {
"svc-a-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-a-external-ips-svc-port",
IP: "192.168.34.11",
Port: "82",
Expected: "app1",
},
"svc-b-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-b-external-ips-svc-port",
IP: "192.168.34.11",
Port: "30002",
Expected: "app1",
},
"svc-c-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-c-node-port-svc-port",
IP: "192.168.34.11",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-d-node-port-svc-port",
IP: "192.168.34.11",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-e-node-port-svc-port",
IP: "192.168.34.11",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-c-node-port-node-port",
IP: "192.168.34.11",
Port: "30003",
Expected: "app2",
},
"svc-d-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-d-node-port-node-port",
IP: "192.168.34.11",
Port: "30004",
Expected: "app4",
},
"svc-e-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-e-node-port-node-port",
IP: "192.168.34.11",
Port: "30005",
Expected: "app6",
SkipReason: "Because we SNAT the request. @dborkmann will fix it",
},
},
"svc-a-external-ips-k8s1-host-private": {
"svc-a-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-a-external-ips-svc-port",
IP: "192.168.33.11",
Port: "82",
Expected: "app1",
SkipReason: "on the receiving node we only install a BPF program " +
"on the interface with the IP 192.168.34.11 so we can't translate " +
"traffic incoming into this interface",
},
"svc-b-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-b-external-ips-svc-port",
IP: "192.168.33.11",
Port: "30002",
Expected: "app1",
SkipReason: "on the receiving node we only install a BPF program " +
"on the interface with the IP 192.168.34.11 so we can't translate " +
"traffic incoming into this interface",
},
"svc-c-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-c-node-port-svc-port",
IP: "192.168.33.11",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-d-node-port-svc-port",
IP: "192.168.33.11",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-e-node-port-svc-port",
IP: "192.168.33.11",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-c-node-port-node-port",
IP: "192.168.33.11",
Port: "30003",
Expected: "app2",
SkipReason: "on the receiving node we only install a BPF program " +
"on the interface with the IP 192.168.34.11 so we can't translate " +
"traffic incoming into this interface",
},
"svc-d-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-d-node-port-node-port",
IP: "192.168.33.11",
Port: "30004",
Expected: "app4",
SkipReason: "on the receiving node we only install a BPF program " +
"on the interface with the IP 192.168.34.11 so we can't translate " +
"traffic incoming into this interface",
},
"svc-e-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-e-node-port-node-port",
IP: "192.168.33.11",
Port: "30005",
Expected: "app6",
SkipReason: "on the receiving node we only install a BPF program " +
"on the interface with the IP 192.168.34.11 so we can't translate " +
"traffic incoming into this interface",
},
},
"svc-b-external-ips-k8s1-public": {
"svc-a-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-a-external-ips-svc-port",
IP: "192.0.2.233",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-b-external-ips-svc-port",
IP: "192.0.2.233",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-c-node-port-svc-port",
IP: "192.0.2.233",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-d-node-port-svc-port",
IP: "192.0.2.233",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-e-node-port-svc-port",
IP: "192.0.2.233",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-public:svc-c-node-port-node-port",
IP: "192.0.2.233",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-public:svc-d-node-port-node-port",
IP: "192.0.2.233",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-public:svc-e-node-port-node-port",
IP: "192.0.2.233",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-b-external-ips-k8s1-host-public": {
"svc-a-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-a-external-ips-svc-port",
IP: "192.168.34.11",
Port: "82",
Expected: "app1",
},
"svc-b-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-b-external-ips-svc-port",
IP: "192.168.34.11",
Port: "30002",
Expected: "app1",
},
"svc-c-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-c-node-port-svc-port",
IP: "192.168.34.11",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-d-node-port-svc-port",
IP: "192.168.34.11",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-e-node-port-svc-port",
IP: "192.168.34.11",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-c-node-port-node-port",
IP: "192.168.34.11",
Port: "30003",
Expected: "app2",
},
"svc-d-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-d-node-port-node-port",
IP: "192.168.34.11",
Port: "30004",
Expected: "app4",
},
"svc-e-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-e-node-port-node-port",
IP: "192.168.34.11",
Port: "30005",
Expected: "app6",
SkipReason: "Because we SNAT the request. @dborkmann will fix it",
},
},
"svc-b-external-ips-k8s1-host-private": {
"svc-a-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-a-external-ips-svc-port",
IP: "192.168.33.11",
Port: "82",
Expected: "app1",
SkipReason: "on the receiving node we only install a BPF program " +
"on the interface with the IP 192.168.34.11 so we can't translate " +
"traffic incoming into this interface",
},
"svc-b-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-b-external-ips-svc-port",
IP: "192.168.33.11",
Port: "30002",
Expected: "app1",
SkipReason: "on the receiving node we only install a BPF program " +
"on the interface with the IP 192.168.34.11 so we can't translate " +
"traffic incoming into this interface",
},
"svc-c-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-c-node-port-svc-port",
IP: "192.168.33.11",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-d-node-port-svc-port",
IP: "192.168.33.11",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-e-node-port-svc-port",
IP: "192.168.33.11",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-c-node-port-node-port",
IP: "192.168.33.11",
Port: "30003",
Expected: "app2",
SkipReason: "on the receiving node we only install a BPF program " +
"on the interface with the IP 192.168.34.11 so we can't translate " +
"traffic incoming into this interface",
},
"svc-d-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-d-node-port-node-port",
IP: "192.168.33.11",
Port: "30004",
Expected: "app4",
SkipReason: "on the receiving node we only install a BPF program " +
"on the interface with the IP 192.168.34.11 so we can't translate " +
"traffic incoming into this interface",
},
"svc-e-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-e-node-port-node-port",
IP: "192.168.33.11",
Port: "30005",
Expected: "app6",
SkipReason: "on the receiving node we only install a BPF program " +
"on the interface with the IP 192.168.34.11 so we can't translate " +
"traffic incoming into this interface",
},
},
"localhost": {
"svc-a-external-ips-svc-port": {
Description: "localhost:svc-a-external-ips-svc-port",
IP: "127.0.0.1",
Port: "82",
Expected: "connection refused",
},
"svc-b-external-ips-svc-port": {
Description: "localhost:svc-b-external-ips-svc-port",
IP: "127.0.0.1",
Port: "30002",
Expected: "connection refused",
},
"svc-c-node-port-svc-port": {
Description: "localhost:svc-c-node-port-svc-port",
IP: "127.0.0.1",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "localhost:svc-d-node-port-svc-port",
IP: "127.0.0.1",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "localhost:svc-e-node-port-svc-port",
IP: "127.0.0.1",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "localhost:svc-c-node-port-node-port",
IP: "127.0.0.1",
Port: "30003",
Expected: "app2",
},
"svc-d-node-port-node-port": {
Description: "localhost:svc-d-node-port-node-port",
IP: "127.0.0.1",
Port: "30004",
Expected: "app4",
},
"svc-e-node-port-node-port": {
Description: "localhost:svc-e-node-port-node-port",
IP: "127.0.0.1",
Port: "30005",
Expected: "app6",
SkipReason: "needs kernel changes as we can't distinguish between pod traffic and host traffic",
},
},
"svc-a-external-ips-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.223",
Port: "82",
Expected: "app1",
},
"svc-b-external-ips-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.223",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.223",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.223",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.223",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-a-external-ips-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.223",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-a-external-ips-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.223",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-a-external-ips-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.223",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-b-external-ips-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.111",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.111",
Port: "30002",
Expected: "app1",
},
"svc-c-node-port-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.111",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.111",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.111",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-b-external-ips-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.111",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-b-external-ips-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.111",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-b-external-ips-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.111",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-c-node-port-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.141",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.141",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.141",
Port: "83",
Expected: "app2",
},
"svc-d-node-port-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.141",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.141",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-c-node-port-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.141",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-c-node-port-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.141",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-c-node-port-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.141",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-d-node-port-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.101",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.101",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.101",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.101",
Port: "84",
Expected: "app4",
},
"svc-e-node-port-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.101",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-d-node-port-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.101",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-d-node-port-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.101",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-d-node-port-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.101",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-e-node-port-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.80",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.80",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.80",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.80",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.80",
Port: "85",
Expected: "app6",
SkipReason: "Because we SNAT the request. @dborkmann will fix it",
},
"svc-c-node-port-node-port": {
Description: "svc-e-node-port-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.80",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-e-node-port-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.80",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-e-node-port-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.80",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
}
)
View Source
var (
ExpectedResultFromPodInNode1 = map[string]map[string]EntryTestArgs{
"svc-a-external-ips-k8s1-public": {
"svc-a-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-a-external-ips-svc-port",
IP: "192.0.2.233",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-b-external-ips-svc-port",
IP: "192.0.2.233",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-c-node-port-svc-port",
IP: "192.0.2.233",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-d-node-port-svc-port",
IP: "192.0.2.233",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-e-node-port-svc-port",
IP: "192.0.2.233",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-public:svc-c-node-port-node-port",
IP: "192.0.2.233",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-public:svc-d-node-port-node-port",
IP: "192.0.2.233",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-public:svc-e-node-port-node-port",
IP: "192.0.2.233",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-a-external-ips-k8s1-host-public": {
"svc-a-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-a-external-ips-svc-port",
IP: "192.168.34.11",
Port: "82",
Expected: "app1",
},
"svc-b-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-b-external-ips-svc-port",
IP: "192.168.34.11",
Port: "30002",
Expected: "app1",
},
"svc-c-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-c-node-port-svc-port",
IP: "192.168.34.11",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-d-node-port-svc-port",
IP: "192.168.34.11",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-e-node-port-svc-port",
IP: "192.168.34.11",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-c-node-port-node-port",
IP: "192.168.34.11",
Port: "30003",
Expected: "app2",
},
"svc-d-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-d-node-port-node-port",
IP: "192.168.34.11",
Port: "30004",
Expected: "app4",
},
"svc-e-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-e-node-port-node-port",
IP: "192.168.34.11",
Port: "30005",
Expected: "app6",
},
},
"svc-a-external-ips-k8s1-host-private": {
"svc-a-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-a-external-ips-svc-port",
IP: "192.168.33.11",
Port: "82",
Expected: "app1",
},
"svc-b-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-b-external-ips-svc-port",
IP: "192.168.33.11",
Port: "30002",
Expected: "app1",
},
"svc-c-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-c-node-port-svc-port",
IP: "192.168.33.11",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-d-node-port-svc-port",
IP: "192.168.33.11",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-e-node-port-svc-port",
IP: "192.168.33.11",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-c-node-port-node-port",
IP: "192.168.33.11",
Port: "30003",
Expected: "app2",
},
"svc-d-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-d-node-port-node-port",
IP: "192.168.33.11",
Port: "30004",
Expected: "app4",
},
"svc-e-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-e-node-port-node-port",
IP: "192.168.33.11",
Port: "30005",
Expected: "app6",
},
},
"svc-b-external-ips-k8s1-public": {
"svc-a-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-a-external-ips-svc-port",
IP: "192.0.2.233",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-b-external-ips-svc-port",
IP: "192.0.2.233",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-c-node-port-svc-port",
IP: "192.0.2.233",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-d-node-port-svc-port",
IP: "192.0.2.233",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-e-node-port-svc-port",
IP: "192.0.2.233",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-public:svc-c-node-port-node-port",
IP: "192.0.2.233",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-public:svc-d-node-port-node-port",
IP: "192.0.2.233",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-public:svc-e-node-port-node-port",
IP: "192.0.2.233",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-b-external-ips-k8s1-host-public": {
"svc-a-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-a-external-ips-svc-port",
IP: "192.168.34.11",
Port: "82",
Expected: "app1",
},
"svc-b-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-b-external-ips-svc-port",
IP: "192.168.34.11",
Port: "30002",
Expected: "app1",
},
"svc-c-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-c-node-port-svc-port",
IP: "192.168.34.11",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-d-node-port-svc-port",
IP: "192.168.34.11",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-e-node-port-svc-port",
IP: "192.168.34.11",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-c-node-port-node-port",
IP: "192.168.34.11",
Port: "30003",
Expected: "app2",
},
"svc-d-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-d-node-port-node-port",
IP: "192.168.34.11",
Port: "30004",
Expected: "app4",
},
"svc-e-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-e-node-port-node-port",
IP: "192.168.34.11",
Port: "30005",
Expected: "app6",
},
},
"svc-b-external-ips-k8s1-host-private": {
"svc-a-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-a-external-ips-svc-port",
IP: "192.168.33.11",
Port: "82",
Expected: "app1",
},
"svc-b-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-b-external-ips-svc-port",
IP: "192.168.33.11",
Port: "30002",
Expected: "app1",
},
"svc-c-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-c-node-port-svc-port",
IP: "192.168.33.11",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-d-node-port-svc-port",
IP: "192.168.33.11",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-e-node-port-svc-port",
IP: "192.168.33.11",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-c-node-port-node-port",
IP: "192.168.33.11",
Port: "30003",
Expected: "app2",
},
"svc-d-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-d-node-port-node-port",
IP: "192.168.33.11",
Port: "30004",
Expected: "app4",
},
"svc-e-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-e-node-port-node-port",
IP: "192.168.33.11",
Port: "30005",
Expected: "app6",
},
},
"localhost": {
"svc-a-external-ips-svc-port": {
Description: "localhost:svc-a-external-ips-svc-port",
IP: "127.0.0.1",
Port: "82",
Expected: "connection refused",
},
"svc-b-external-ips-svc-port": {
Description: "localhost:svc-b-external-ips-svc-port",
IP: "127.0.0.1",
Port: "30002",
Expected: "connection refused",
},
"svc-c-node-port-svc-port": {
Description: "localhost:svc-c-node-port-svc-port",
IP: "127.0.0.1",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "localhost:svc-d-node-port-svc-port",
IP: "127.0.0.1",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "localhost:svc-e-node-port-svc-port",
IP: "127.0.0.1",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "localhost:svc-c-node-port-node-port",
IP: "127.0.0.1",
Port: "30003",
Expected: "connection refused",
SkipReason: "needs kernel changes as we can't distinguish between pod traffic and host traffic",
},
"svc-d-node-port-node-port": {
Description: "localhost:svc-d-node-port-node-port",
IP: "127.0.0.1",
Port: "30004",
Expected: "connection refused",
SkipReason: "needs kernel changes as we can't distinguish between pod traffic and host traffic",
},
"svc-e-node-port-node-port": {
Description: "localhost:svc-e-node-port-node-port",
IP: "127.0.0.1",
Port: "30005",
Expected: "connection refused",
SkipReason: "needs kernel changes as we can't distinguish between pod traffic and host traffic",
},
},
"svc-a-external-ips-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.223",
Port: "82",
Expected: "app1",
},
"svc-b-external-ips-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.223",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.223",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.223",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.223",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-a-external-ips-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.223",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-a-external-ips-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.223",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-a-external-ips-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.223",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-b-external-ips-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.111",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.111",
Port: "30002",
Expected: "app1",
},
"svc-c-node-port-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.111",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.111",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.111",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-b-external-ips-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.111",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-b-external-ips-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.111",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-b-external-ips-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.111",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-c-node-port-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.141",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.141",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.141",
Port: "83",
Expected: "app2",
},
"svc-d-node-port-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.141",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.141",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-c-node-port-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.141",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-c-node-port-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.141",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-c-node-port-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.141",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-d-node-port-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.101",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.101",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.101",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.101",
Port: "84",
Expected: "app4",
},
"svc-e-node-port-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.101",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-d-node-port-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.101",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-d-node-port-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.101",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-d-node-port-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.101",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-e-node-port-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.80",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.80",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.80",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.80",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.80",
Port: "85",
Expected: "app6",
},
"svc-c-node-port-node-port": {
Description: "svc-e-node-port-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.80",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-e-node-port-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.80",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-e-node-port-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.80",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
}
)
View Source
var (
ExpectedResultFromPodInNode2 = map[string]map[string]EntryTestArgs{
"svc-a-external-ips-k8s1-public": {
"svc-a-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-a-external-ips-svc-port",
IP: "192.0.2.233",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-b-external-ips-svc-port",
IP: "192.0.2.233",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-c-node-port-svc-port",
IP: "192.0.2.233",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-d-node-port-svc-port",
IP: "192.0.2.233",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-public:svc-e-node-port-svc-port",
IP: "192.0.2.233",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-public:svc-c-node-port-node-port",
IP: "192.0.2.233",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-public:svc-d-node-port-node-port",
IP: "192.0.2.233",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-public:svc-e-node-port-node-port",
IP: "192.0.2.233",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-a-external-ips-k8s1-host-public": {
"svc-a-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-a-external-ips-svc-port",
IP: "192.168.34.11",
Port: "82",
Expected: "app1",
},
"svc-b-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-b-external-ips-svc-port",
IP: "192.168.34.11",
Port: "30002",
Expected: "app1",
},
"svc-c-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-c-node-port-svc-port",
IP: "192.168.34.11",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-d-node-port-svc-port",
IP: "192.168.34.11",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-e-node-port-svc-port",
IP: "192.168.34.11",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-c-node-port-node-port",
IP: "192.168.34.11",
Port: "30003",
Expected: "app2",
},
"svc-d-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-d-node-port-node-port",
IP: "192.168.34.11",
Port: "30004",
Expected: "app4",
},
"svc-e-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-public:svc-e-node-port-node-port",
IP: "192.168.34.11",
Port: "30005",
Expected: "app6",
SkipReason: "Because we SNAT the request. @dborkmann will fix it",
},
},
"svc-a-external-ips-k8s1-host-private": {
"svc-a-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-a-external-ips-svc-port",
IP: "192.168.33.11",
Port: "82",
Expected: "app1",
},
"svc-b-external-ips-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-b-external-ips-svc-port",
IP: "192.168.33.11",
Port: "30002",
Expected: "app1",
},
"svc-c-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-c-node-port-svc-port",
IP: "192.168.33.11",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-d-node-port-svc-port",
IP: "192.168.33.11",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-e-node-port-svc-port",
IP: "192.168.33.11",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-c-node-port-node-port",
IP: "192.168.33.11",
Port: "30003",
Expected: "app2",
SkipReason: "on the receiving node we only install a BPF program " +
"on the interface with the IP 192.168.34.11 so we can't translate " +
"traffic incoming into this interface",
},
"svc-d-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-d-node-port-node-port",
IP: "192.168.33.11",
Port: "30004",
Expected: "app4",
SkipReason: "on the receiving node we only install a BPF program " +
"on the interface with the IP 192.168.34.11 so we can't translate " +
"traffic incoming into this interface",
},
"svc-e-node-port-node-port": {
Description: "svc-a-external-ips-k8s1-host-private:svc-e-node-port-node-port",
IP: "192.168.33.11",
Port: "30005",
Expected: "app6",
SkipReason: "on the receiving node we only install a BPF program " +
"on the interface with the IP 192.168.34.11 so we can't translate " +
"traffic incoming into this interface",
},
},
"svc-b-external-ips-k8s1-public": {
"svc-a-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-a-external-ips-svc-port",
IP: "192.0.2.233",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-b-external-ips-svc-port",
IP: "192.0.2.233",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-c-node-port-svc-port",
IP: "192.0.2.233",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-d-node-port-svc-port",
IP: "192.0.2.233",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-public:svc-e-node-port-svc-port",
IP: "192.0.2.233",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-public:svc-c-node-port-node-port",
IP: "192.0.2.233",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-public:svc-d-node-port-node-port",
IP: "192.0.2.233",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-public:svc-e-node-port-node-port",
IP: "192.0.2.233",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-b-external-ips-k8s1-host-public": {
"svc-a-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-a-external-ips-svc-port",
IP: "192.168.34.11",
Port: "82",
Expected: "app1",
},
"svc-b-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-b-external-ips-svc-port",
IP: "192.168.34.11",
Port: "30002",
Expected: "app1",
},
"svc-c-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-c-node-port-svc-port",
IP: "192.168.34.11",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-d-node-port-svc-port",
IP: "192.168.34.11",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-e-node-port-svc-port",
IP: "192.168.34.11",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-c-node-port-node-port",
IP: "192.168.34.11",
Port: "30003",
Expected: "app2",
},
"svc-d-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-d-node-port-node-port",
IP: "192.168.34.11",
Port: "30004",
Expected: "app4",
},
"svc-e-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-public:svc-e-node-port-node-port",
IP: "192.168.34.11",
Port: "30005",
Expected: "app6",
SkipReason: "Because we SNAT the request. @dborkmann will fix it",
},
},
"svc-b-external-ips-k8s1-host-private": {
"svc-a-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-a-external-ips-svc-port",
IP: "192.168.33.11",
Port: "82",
Expected: "app1",
},
"svc-b-external-ips-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-b-external-ips-svc-port",
IP: "192.168.33.11",
Port: "30002",
Expected: "app1",
},
"svc-c-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-c-node-port-svc-port",
IP: "192.168.33.11",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-d-node-port-svc-port",
IP: "192.168.33.11",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-e-node-port-svc-port",
IP: "192.168.33.11",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-c-node-port-node-port",
IP: "192.168.33.11",
Port: "30003",
Expected: "app2",
SkipReason: "on the receiving node we only install a BPF program " +
"on the interface with the IP 192.168.34.11 so we can't translate " +
"traffic incoming into this interface",
},
"svc-d-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-d-node-port-node-port",
IP: "192.168.33.11",
Port: "30004",
Expected: "app4",
SkipReason: "on the receiving node we only install a BPF program " +
"on the interface with the IP 192.168.34.11 so we can't translate " +
"traffic incoming into this interface",
},
"svc-e-node-port-node-port": {
Description: "svc-b-external-ips-k8s1-host-private:svc-e-node-port-node-port",
IP: "192.168.33.11",
Port: "30005",
Expected: "app6",
SkipReason: "on the receiving node we only install a BPF program " +
"on the interface with the IP 192.168.34.11 so we can't translate " +
"traffic incoming into this interface",
},
},
"localhost": {
"svc-a-external-ips-svc-port": {
Description: "localhost:svc-a-external-ips-svc-port",
IP: "127.0.0.1",
Port: "82",
Expected: "connection refused",
},
"svc-b-external-ips-svc-port": {
Description: "localhost:svc-b-external-ips-svc-port",
IP: "127.0.0.1",
Port: "30002",
Expected: "connection refused",
},
"svc-c-node-port-svc-port": {
Description: "localhost:svc-c-node-port-svc-port",
IP: "127.0.0.1",
Port: "83",
Expected: "connection refused",
},
"svc-d-node-port-svc-port": {
Description: "localhost:svc-d-node-port-svc-port",
IP: "127.0.0.1",
Port: "84",
Expected: "connection refused",
},
"svc-e-node-port-svc-port": {
Description: "localhost:svc-e-node-port-svc-port",
IP: "127.0.0.1",
Port: "85",
Expected: "connection refused",
},
"svc-c-node-port-node-port": {
Description: "localhost:svc-c-node-port-node-port",
IP: "127.0.0.1",
Port: "30003",
Expected: "connection refused",
SkipReason: "needs kernel changes as we can't distinguish between pod traffic and host traffic",
},
"svc-d-node-port-node-port": {
Description: "localhost:svc-d-node-port-node-port",
IP: "127.0.0.1",
Port: "30004",
Expected: "connection refused",
SkipReason: "needs kernel changes as we can't distinguish between pod traffic and host traffic",
},
"svc-e-node-port-node-port": {
Description: "localhost:svc-e-node-port-node-port",
IP: "127.0.0.1",
Port: "30005",
Expected: "connection refused",
SkipReason: "needs kernel changes as we can't distinguish between pod traffic and host traffic",
},
},
"svc-a-external-ips-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.223",
Port: "82",
Expected: "app1",
},
"svc-b-external-ips-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.223",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.223",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.223",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-a-external-ips-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.223",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-a-external-ips-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.223",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-a-external-ips-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.223",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-a-external-ips-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.223",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-b-external-ips-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.111",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.111",
Port: "30002",
Expected: "app1",
},
"svc-c-node-port-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.111",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.111",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-b-external-ips-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.111",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-b-external-ips-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.111",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-b-external-ips-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.111",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-b-external-ips-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.111",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-c-node-port-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.141",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.141",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.141",
Port: "83",
Expected: "app2",
},
"svc-d-node-port-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.141",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-c-node-port-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.141",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-c-node-port-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.141",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-c-node-port-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.141",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-c-node-port-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.141",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-d-node-port-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.101",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.101",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.101",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.101",
Port: "84",
Expected: "app4",
},
"svc-e-node-port-svc-port": {
Description: "svc-d-node-port-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.101",
Port: "85",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-node-port": {
Description: "svc-d-node-port-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.101",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-d-node-port-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.101",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-d-node-port-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.101",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
"svc-e-node-port-cluster-ip": {
"svc-a-external-ips-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-a-external-ips-svc-port",
IP: "172.20.0.80",
Port: "82",
Expected: "No route to host / connection timed out",
},
"svc-b-external-ips-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-b-external-ips-svc-port",
IP: "172.20.0.80",
Port: "30002",
Expected: "No route to host / connection timed out",
},
"svc-c-node-port-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-c-node-port-svc-port",
IP: "172.20.0.80",
Port: "83",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-d-node-port-svc-port",
IP: "172.20.0.80",
Port: "84",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-svc-port": {
Description: "svc-e-node-port-cluster-ip:svc-e-node-port-svc-port",
IP: "172.20.0.80",
Port: "85",
Expected: "app6",
SkipReason: "Because we SNAT the request. @dborkmann will fix it",
},
"svc-c-node-port-node-port": {
Description: "svc-e-node-port-cluster-ip:svc-c-node-port-node-port",
IP: "172.20.0.80",
Port: "30003",
Expected: "No route to host / connection timed out",
},
"svc-d-node-port-node-port": {
Description: "svc-e-node-port-cluster-ip:svc-d-node-port-node-port",
IP: "172.20.0.80",
Port: "30004",
Expected: "No route to host / connection timed out",
},
"svc-e-node-port-node-port": {
Description: "svc-e-node-port-cluster-ip:svc-e-node-port-node-port",
IP: "172.20.0.80",
Port: "30005",
Expected: "No route to host / connection timed out",
},
},
}
)
View Source
var NetDevTranslation = map[string]string{ "svc-a-external-ips-k8s1-host-public": PublicInterfaceName, "svc-b-external-ips-k8s1-host-public": PublicInterfaceName, "svc-a-external-ips-k8s1-host-private": PrivateInterfaceName, "svc-b-external-ips-k8s1-host-private": PrivateInterfaceName, }
On both dev and CI VMs the public interface, i.e., an interface that has a network shared with the host is the 'enp0s10'. The private interface, i.e., an interface that has a network shared with all VMs is the 'enp0s8'
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.