mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Handle UpdateContainerResources for Windows in v1alpha2
This commit is contained in:
parent
0ef263c3b0
commit
007d93ad08
@ -113,6 +113,10 @@ func v1alpha2LinuxContainerResources(from *runtimeapi.LinuxContainerResources) *
|
|||||||
return (*v1alpha2.LinuxContainerResources)(unsafe.Pointer(from))
|
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 {
|
func v1alpha2ExecRequest(from *runtimeapi.ExecRequest) *v1alpha2.ExecRequest {
|
||||||
// If this function changes, also adapt the corresponding Exec code in
|
// If this function changes, also adapt the corresponding Exec code in
|
||||||
// pkg/kubelet/cri/remote/remote_runtime.go
|
// pkg/kubelet/cri/remote/remote_runtime.go
|
||||||
|
@ -656,6 +656,7 @@ func (r *remoteRuntimeService) UpdateContainerResources(containerID string, reso
|
|||||||
_, err = r.runtimeClientV1alpha2.UpdateContainerResources(ctx, &runtimeapiV1alpha2.UpdateContainerResourcesRequest{
|
_, err = r.runtimeClientV1alpha2.UpdateContainerResources(ctx, &runtimeapiV1alpha2.UpdateContainerResourcesRequest{
|
||||||
ContainerId: containerID,
|
ContainerId: containerID,
|
||||||
Linux: v1alpha2LinuxContainerResources(resources.GetLinux()),
|
Linux: v1alpha2LinuxContainerResources(resources.GetLinux()),
|
||||||
|
Windows: v1alpha2WindowsContainerResources(resources.GetWindows()),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user