Skip to content

Commit e6b3fb6

Browse files
committed
add containerd annotation support for checkpoint metadata parsing
Signed-off-by: slashexx <dhruvpuri.35@gmail.com>
1 parent d56a9c3 commit e6b3fb6

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

internal/controller/checkpointrestoreoperator_controller.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,15 @@ func getCheckpointArchiveInformation(log logr.Logger, checkpointPath string) (*c
331331
if err != nil {
332332
return nil, err
333333
}
334+
335+
if dumpSpec.Annotations["io.kubernetes.cri.sandbox-namespace"] != "" {
336+
return &checkpointDetails{
337+
namespace: dumpSpec.Annotations["io.kubernetes.cri.sandbox-namespace"],
338+
pod: dumpSpec.Annotations["io.kubernetes.cri.sandbox-name"],
339+
container: dumpSpec.Annotations["io.kubernetes.cri.container-name"],
340+
}, nil
341+
}
342+
334343
labels := make(map[string]string)
335344

336345
if err := json.Unmarshal([]byte(dumpSpec.Annotations["io.kubernetes.cri-o.Labels"]), &labels); err != nil {

0 commit comments

Comments
 (0)