diff --git a/server/sandbox_run.go b/server/sandbox_run.go index 88797343..a43bd55f 100644 --- a/server/sandbox_run.go +++ b/server/sandbox_run.go @@ -265,6 +265,7 @@ func (s *Server) RunPodSandbox(ctx context.Context, req *pb.RunPodSandboxRequest g.AddAnnotation("ocid/privileged_runtime", fmt.Sprintf("%v", privileged)) g.AddAnnotation("ocid/resolv_path", resolvPath) g.AddAnnotation("ocid/hostname", hostname) + g.AddAnnotation("ocid/kube_name", kubeName) sb := &sandbox{ id: id, diff --git a/server/server.go b/server/server.go index ff265197..2fe7e3ee 100644 --- a/server/server.go +++ b/server/server.go @@ -203,6 +203,7 @@ func (s *Server) loadSandbox(id string) error { sb := &sandbox{ id: id, name: name, + kubeName: m.Annotations["ocid/kube_name"], logDir: filepath.Dir(m.Annotations["ocid/log_path"]), labels: labels, containers: oci.NewMemoryStore(),