Merge pull request #10740 from zouyee/event

Add timestamp to PodSandboxStatusResponse for kubernetes Evented PLEG
This commit is contained in:
Maksym Pavlenko 2024-09-28 00:11:16 +00:00 committed by GitHub
commit 86e0f52e17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
@ -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
}