Handle UpdateContainerResources for Windows in v1alpha2

This commit is contained in:
Vinay Kulkarni 2022-08-02 15:31:00 -07:00
parent 0ef263c3b0
commit 007d93ad08
2 changed files with 5 additions and 0 deletions

View File

@ -113,6 +113,10 @@ func v1alpha2LinuxContainerResources(from *runtimeapi.LinuxContainerResources) *
return (*v1alpha2.LinuxContainerResources)(unsafe.Pointer(from))
}
func v1alpha2WindowsContainerResources(from *runtimeapi.WindowsContainerResources) *v1alpha2.WindowsContainerResources {
return (*v1alpha2.WindowsContainerResources)(unsafe.Pointer(from))
}
func v1alpha2ExecRequest(from *runtimeapi.ExecRequest) *v1alpha2.ExecRequest {
// If this function changes, also adapt the corresponding Exec code in
// pkg/kubelet/cri/remote/remote_runtime.go

View File

@ -656,6 +656,7 @@ func (r *remoteRuntimeService) UpdateContainerResources(containerID string, reso
_, err = r.runtimeClientV1alpha2.UpdateContainerResources(ctx, &runtimeapiV1alpha2.UpdateContainerResourcesRequest{
ContainerId: containerID,
Linux: v1alpha2LinuxContainerResources(resources.GetLinux()),
Windows: v1alpha2WindowsContainerResources(resources.GetWindows()),
})
}
if err != nil {