Skip to content

Commit 6e809ef

Browse files
committed
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 <[email protected]> (cherry picked from commit 6c356a5)
1 parent 8d849a2 commit 6e809ef

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

pkg/cri/sbserver/sandbox_status.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,7 @@ func toCRISandboxStatus(meta sandboxstore.Metadata, status string, createdAt tim
104104
},
105105
Linux: &runtime.LinuxPodSandboxStatus{
106106
Namespaces: &runtime.Namespace{
107-
Options: &runtime.NamespaceOption{
108-
Network: nsOpts.GetNetwork(),
109-
Pid: nsOpts.GetPid(),
110-
Ipc: nsOpts.GetIpc(),
111-
},
107+
Options: nsOpts,
112108
},
113109
},
114110
Labels: meta.Config.GetLabels(),

pkg/cri/server/sandbox_status.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,7 @@ func toCRISandboxStatus(meta sandboxstore.Metadata, status sandboxstore.Status,
107107
},
108108
Linux: &runtime.LinuxPodSandboxStatus{
109109
Namespaces: &runtime.Namespace{
110-
Options: &runtime.NamespaceOption{
111-
Network: nsOpts.GetNetwork(),
112-
Pid: nsOpts.GetPid(),
113-
Ipc: nsOpts.GetIpc(),
114-
},
110+
Options: nsOpts,
115111
},
116112
},
117113
Labels: meta.Config.GetLabels(),

0 commit comments

Comments
 (0)