How to get PodSandboxConfig object in PullImageRequest on container runtime interface interface

11/15/2018

I'm working on a new CRI for Kubernetes and I would like to have information about the pod configuration in the PullImage method, but PullImageRequest always contains the sandbox configuration with nil value.

As you can see, PullImageRequest contains a PodSanboxConfig object:

type PullImageRequest struct {
    // Spec of the image.
    Image *ImageSpec `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"`
    // Authentication configuration for pulling the image.
    Auth *AuthConfig `protobuf:"bytes,2,opt,name=auth" json:"auth,omitempty"`
    // Config of the PodSandbox, which is used to pull image in PodSandbox context.
    SandboxConfig *PodSandboxConfig `protobuf:"bytes,3,opt,name=sandbox_config,json=sandboxConfig" json:"sandbox_config,omitempty"`
}

I'm working with

Kubernetes 1.11.3

and

cri/runtime/v1alpha2

How can I do to get the PodSandboxConfig object?

Thanks

-- Jorgese
containers
interface
kubernetes
runtime

1 Answer

12/11/2018

I have created an issue about it on Kubernetes github and they are working on it in this pull request.

-- Jorgese
Source: StackOverflow