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.

The cherry-pick has been amended to do the change in cri/sbserver and
cri/server.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
(cherry picked from commit 6c356a5c75)
This commit is contained in:
Rodrigo Campos
2024-02-07 10:54:53 +01:00
committed by Rodrigo Campos
parent 8d849a2f3f
commit 6e809ef13a
2 changed files with 2 additions and 10 deletions

View File

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

View File

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