Skip to content

Commit

Permalink
Merge pull request containerd#10740 from zouyee/event
Browse files Browse the repository at this point in the history
Add timestamp to PodSandboxStatusResponse for kubernetes Evented PLEG
  • Loading branch information
mxpv committed Sep 28, 2024
2 parents db97449 + b529072 commit 86e0f52
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/cri/server/sandbox_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func (c *criService) PodSandboxStatus(ctx context.Context, r *runtime.PodSandbox
state string
info map[string]string
)
timestamp := time.Now().UnixNano()
cstatus, err := c.sandboxService.SandboxStatus(ctx, sandbox.Sandboxer, sandbox.ID, r.GetVerbose())
if err != nil {
// If the shim died unexpectedly (segfault etc.) let's set the state as
Expand Down Expand Up @@ -83,8 +84,9 @@ func (c *criService) PodSandboxStatus(ctx context.Context, r *runtime.PodSandbox
}

return &runtime.PodSandboxStatusResponse{
Status: status,
Info: info,
Status: status,
Info: info,
Timestamp: timestamp,
}, nil
}

Expand Down

0 comments on commit 86e0f52

Please sign in to comment.