mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
CRI Portforward needs to forward websocket ports
- adjust ports to int32 - CRI flows the websocket ports as query params - Do not validate ports since the protocol is unknown SPDY flows the ports as headers and websockets uses query params - Only flow query params if there is at least one port query param
This commit is contained in:
@@ -363,16 +363,21 @@ func TestPortForwardLocation(t *testing.T) {
|
||||
},
|
||||
{
|
||||
in: &api.Pod{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Namespace: "ns",
|
||||
Name: "pod1",
|
||||
},
|
||||
Spec: api.PodSpec{
|
||||
NodeName: "node1",
|
||||
},
|
||||
},
|
||||
info: &client.ConnectionInfo{},
|
||||
opts: &api.PodPortForwardOptions{},
|
||||
expectedErr: errors.NewBadRequest("at least one port must be specified"),
|
||||
expectedURL: &url.URL{Host: ":", Path: "/portForward/ns/pod1"},
|
||||
},
|
||||
{
|
||||
in: &api.Pod{
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Namespace: "ns",
|
||||
Name: "pod1",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user