kubelet: add CheckpointContainer() on the service level

Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
Adrian Reber 2020-12-08 07:57:11 +00:00
parent 1ac7d78296
commit 3e6f50683f
No known key found for this signature in database
GPG Key ID: 82C9378ED3C4906A
2 changed files with 11 additions and 0 deletions

View File

@ -324,3 +324,12 @@ func (in instrumentedImageManagerService) ImageFsInfo() ([]*runtimeapi.Filesyste
recordError(operation, err)
return fsInfo, nil
}
func (in instrumentedRuntimeService) CheckpointContainer(options *runtimeapi.CheckpointContainerRequest) error {
const operation = "checkpoint_container"
defer recordOperation(operation, time.Now())
err := in.service.CheckpointContainer(options)
recordError(operation, err)
return err
}

View File

@ -76,6 +76,8 @@ type PodSandboxManager interface {
ListPodSandbox(filter *runtimeapi.PodSandboxFilter) ([]*runtimeapi.PodSandbox, error)
// PortForward prepares a streaming endpoint to forward ports from a PodSandbox, and returns the address.
PortForward(*runtimeapi.PortForwardRequest) (*runtimeapi.PortForwardResponse, error)
// CheckpointContainer checkpoints a container
CheckpointContainer(containerID, checkpointDir string) error
}
// ContainerStatsManager contains methods for retrieving the container