Revert dockershim CRI v1 changes

We should not touch the dockershim ahead of removal and therefore
default to `v1alpha2` CRI instead of `v1`.

Partially reverts changes from https://github.com/kubernetes/kubernetes/pull/106501

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
This commit is contained in:
Sascha Grunert
2021-12-03 14:39:09 +01:00
parent 555623c07e
commit a063a2ba3e
39 changed files with 250 additions and 41 deletions

View File

@@ -44,14 +44,20 @@ func fromV1alpha2ContainerStatus(from *v1alpha2.ContainerStatus) *runtimeapi.Con
}
func fromV1alpha2ExecResponse(from *v1alpha2.ExecResponse) *runtimeapi.ExecResponse {
// If this function changes, also adapt the corresponding Exec dockershim code in
// pkg/kubelet/dockershim/docker_streaming.go
return (*runtimeapi.ExecResponse)(unsafe.Pointer(from))
}
func fromV1alpha2AttachResponse(from *v1alpha2.AttachResponse) *runtimeapi.AttachResponse {
// If this function changes, also adapt the corresponding Attach dockershim code in
// pkg/kubelet/dockershim/docker_streaming.go
return (*runtimeapi.AttachResponse)(unsafe.Pointer(from))
}
func fromV1alpha2PortForwardResponse(from *v1alpha2.PortForwardResponse) *runtimeapi.PortForwardResponse {
// If this function changes, also adapt the corresponding PortForward dockershim code in
// pkg/kubelet/dockershim/docker_streaming.go
return (*runtimeapi.PortForwardResponse)(unsafe.Pointer(from))
}
@@ -108,14 +114,20 @@ func v1alpha2LinuxContainerResources(from *runtimeapi.LinuxContainerResources) *
}
func v1alpha2ExecRequest(from *runtimeapi.ExecRequest) *v1alpha2.ExecRequest {
// If this function changes, also adapt the corresponding Exec dockershim code in
// pkg/kubelet/dockershim/docker_streaming.go
return (*v1alpha2.ExecRequest)(unsafe.Pointer(from))
}
func v1alpha2AttachRequest(from *runtimeapi.AttachRequest) *v1alpha2.AttachRequest {
// If this function changes, also adapt the corresponding Attach dockershim code in
// pkg/kubelet/dockershim/docker_streaming.go
return (*v1alpha2.AttachRequest)(unsafe.Pointer(from))
}
func v1alpha2PortForwardRequest(from *runtimeapi.PortForwardRequest) *v1alpha2.PortForwardRequest {
// If this function changes, also adapt the corresponding PortForward dockershim code in
// pkg/kubelet/dockershim/docker_streaming.go
return (*v1alpha2.PortForwardRequest)(unsafe.Pointer(from))
}