@@ -96,9 +96,9 @@ type PostUpdatePodInterface interface {
9696// PodSandboxStatusInterface handles PodSandboxStatus API requests.
9797type PodSandboxStatusInterface interface {
9898 // PodSandboxStatus relays a PodSandboxStatus request to the plugin.
99- // The plugin can return modified IP addresses for the pod sandbox.
100- // Returns: primary IP, additional IPs, error
101- PodSandboxStatus (context.Context , * api.PodSandbox ) (string , [] string , error )
99+ // The plugin can return modified IP addresses for the pod sandbox
100+ // in a PodSandboxStatusResponse.
101+ PodSandboxStatus (context.Context , * api.PodSandbox ) (* api. PodSandboxStatusResponse , error )
102102}
103103
104104// CreateContainerInterface handles CreateContainer API requests.
@@ -324,7 +324,7 @@ type handlers struct {
324324 StopPodSandbox func (context.Context , * api.PodSandbox ) error
325325 RemovePodSandbox func (context.Context , * api.PodSandbox ) error
326326 PostUpdatePodSandbox func (context.Context , * api.PodSandbox ) error
327- PodSandboxStatus func (context.Context , * api.PodSandbox ) (string , [] string , error )
327+ PodSandboxStatus func (context.Context , * api.PodSandbox ) (* api. PodSandboxStatusResponse , error )
328328 CreateContainer func (context.Context , * api.PodSandbox , * api.Container ) (* api.ContainerAdjustment , []* api.ContainerUpdate , error )
329329 StartContainer func (context.Context , * api.PodSandbox , * api.Container ) error
330330 UpdateContainer func (context.Context , * api.PodSandbox , * api.Container , * api.LinuxResources ) ([]* api.ContainerUpdate , error )
@@ -797,11 +797,8 @@ func (stub *stub) PodSandboxStatus(ctx context.Context, req *api.PodSandboxStatu
797797 if handler == nil {
798798 return & api.PodSandboxStatusResponse {}, nil
799799 }
800- ip , additionalIPs , err := handler (ctx , req .Pod )
801- return & api.PodSandboxStatusResponse {
802- Ip : ip ,
803- AdditionalIps : additionalIPs ,
804- }, err
800+
801+ return handler (ctx , req .Pod )
805802}
806803
807804// StateChange event handler.
0 commit comments