CRI: Pass sandbox annotations to _other platforms#8060
Conversation
|
Skipping CI for Draft Pull Request. |
|
LGTM. Does it make sense to add checks to unit tests like in containerd/pkg/cri/server/sandbox_run_linux_test.go Lines 71 to 88 in d5ae2c1 and containerd/pkg/cri/server/container_create_linux_test.go Lines 174 to 191 in d5ae2c1 |
cpuguy83
left a comment
There was a problem hiding this comment.
Change LGTM although it seems like this could be extracted out so every platform can reuse the same code (maybe? I didn't peak through the other paltform files but I assume it's the same).
|
@ruiwen-zhao Let me take a look later today. @cpuguy83 it likely can, these should get passed on all platforms so this was the lazy approach thinking about it. I'll make a generic func that'll return these all and have all the platforms call it. |
|
Needs a rebase; conflict in |
0aef2c0 to
ff86019
Compare
!windows and !linux weren't getting passed the sandbox annotations. Signed-off-by: Danny Canter <[email protected]>
All of the CRI sandbox and container specs all get assigned almost the exact same default annotations (sandboxID, name, metadata, container type etc.) so lets make a helper to return the right set for a sandbox or regular workload container. Signed-off-by: Danny Canter <[email protected]>
ff86019 to
646bc3a
Compare
!windows and !linux weren't getting passed the sandbox annotations.
This additionally adds in a commit on top to refactor how these annotations were getting passed. All of the CRI sandbox and container specs all get assigned almost the exact same default annotations (sandboxID, name, metadata, container type etc.) so I added a helper to return the right set for a sandbox or regular workload container.