Skip to content

Commit b529072

Browse files
committed
Add timestamp to PodSandboxStatusResponse for kubernetes Evented PLEG
Signed-off-by: zouyee <[email protected]>
1 parent 3df2cc1 commit b529072

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/cri/server/sandbox_status.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ func (c *criService) PodSandboxStatus(ctx context.Context, r *runtime.PodSandbox
4646
state string
4747
info map[string]string
4848
)
49+
timestamp := time.Now().UnixNano()
4950
cstatus, err := c.sandboxService.SandboxStatus(ctx, sandbox.Sandboxer, sandbox.ID, r.GetVerbose())
5051
if err != nil {
5152
// If the shim died unexpectedly (segfault etc.) let's set the state as
@@ -83,8 +84,9 @@ func (c *criService) PodSandboxStatus(ctx context.Context, r *runtime.PodSandbox
8384
}
8485

8586
return &runtime.PodSandboxStatusResponse{
86-
Status: status,
87-
Info: info,
87+
Status: status,
88+
Info: info,
89+
Timestamp: timestamp,
8890
}, nil
8991
}
9092

0 commit comments

Comments
 (0)