-
Notifications
You must be signed in to change notification settings - Fork 3.7k
feat add sandbox controler port forward #7509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hi @lengrongfu. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
5aacf02
to
9b4a8d2
Compare
/ok-to-test |
/test pull-containerd-sandboxed-node-e2e |
|
||
package podsandbox | ||
|
||
import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have window platform to test this.
And I am not sure that ENABLE_CRI_SANDBOXES
is working.
Hopefully, we can make sure that Test is working before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok.
sandbox/controller.go
Outdated
@@ -41,3 +42,8 @@ type Controller interface { | |||
// Delete deletes and cleans all tasks and sandbox instance. | |||
Delete(ctx context.Context, sandboxID string) (*sandbox.ControllerDeleteResponse, error) | |||
} | |||
|
|||
// PortForward is an interface to port forward sandboxes at runtime | |||
type PortForward interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to have this interface exposed under the sandbox
package? New functionality should be defined where they are used or in a package that owns the interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't need, use podsandbox.Controller imple PortForward method.
pkg/cri/sbserver/streaming.go
Outdated
@@ -158,7 +160,10 @@ func (s *streamRuntime) PortForward(podSandboxID string, port int32, stream io.R | |||
return fmt.Errorf("invalid port %d", port) | |||
} | |||
ctx := ctrdutil.NamespacedContext() | |||
return s.c.portForward(ctx, podSandboxID, port, stream) | |||
if pf, ok := s.c.sandboxController.(sandbox.PortForward); ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be updated.
We use c.getSandboxController
to obtain controller interface.
Also shim controllers go throught containerd backend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok.
46fce43
to
6eaf711
Compare
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
6eaf711
to
06e76eb
Compare
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This pr is Sansbox API work in #7312. implemented an optional
PortForward
interface