Skip to content

Commit

Permalink
cri: Expose userns in PodSandboxStatus rpc
Browse files Browse the repository at this point in the history
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 6c356a5)
  • Loading branch information
rata committed Feb 28, 2024
1 parent 8d849a2 commit 6e809ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions pkg/cri/sbserver/sandbox_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
6 changes: 1 addition & 5 deletions pkg/cri/server/sandbox_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 6e809ef

Please sign in to comment.