cri: Expose userns in PodSandboxStatus rpc

We added support for userns but we weren't showing it in the
podSandboxStatus.

Let's just show the whole nsOpts, so we don't forget in the future
either if something else inside there changes.

Please note that this will expose the content of nsOpts.TargetId that we
weren't exposing before. But that seemed like a bug to me.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>

Maybe this is better?
This commit is contained in:
Rodrigo Campos 2024-02-07 10:54:53 +01:00
parent ff464f3687
commit 6c356a5c75

View File

@ -134,11 +134,7 @@ func toCRISandboxStatus(meta sandboxstore.Metadata, status string, createdAt tim
}, },
Linux: &runtime.LinuxPodSandboxStatus{ Linux: &runtime.LinuxPodSandboxStatus{
Namespaces: &runtime.Namespace{ Namespaces: &runtime.Namespace{
Options: &runtime.NamespaceOption{ Options: nsOpts,
Network: nsOpts.GetNetwork(),
Pid: nsOpts.GetPid(),
Ipc: nsOpts.GetIpc(),
},
}, },
}, },
Labels: meta.Config.GetLabels(), Labels: meta.Config.GetLabels(),